/AWS1/IF_TRN=>STARTFILETRANSFER()¶
About StartFileTransfer¶
Begins a file transfer between local Amazon Web Services storage and a remote AS2 or SFTP server.
-
For an AS2 connector, you specify the
ConnectorIdand one or moreSendFilePathsto identify the files you want to transfer. -
For an SFTP connector, the file transfer can be either outbound or inbound. In both cases, you specify the
ConnectorId. Depending on the direction of the transfer, you also specify the following items:-
If you are transferring file from a partner's SFTP server to Amazon Web Services storage, you specify one or more
RetrieveFilePathsto identify the files you want to transfer, and aLocalDirectoryPathto specify the destination folder. -
If you are transferring file to a partner's SFTP server from Amazon Web Services storage, you specify one or more
SendFilePathsto identify the files you want to transfer, and aRemoteDirectoryPathto specify the destination folder.
-
Method Signature¶
METHODS /AWS1/IF_TRN~STARTFILETRANSFER
IMPORTING
!IV_CONNECTORID TYPE /AWS1/TRNCONNECTORID OPTIONAL
!IT_SENDFILEPATHS TYPE /AWS1/CL_TRNFILEPATHS_W=>TT_FILEPATHS OPTIONAL
!IT_RETRIEVEFILEPATHS TYPE /AWS1/CL_TRNFILEPATHS_W=>TT_FILEPATHS OPTIONAL
!IV_LOCALDIRECTORYPATH TYPE /AWS1/TRNFILEPATH OPTIONAL
!IV_REMOTEDIRECTORYPATH TYPE /AWS1/TRNFILEPATH OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_trnstartfilexferrsp
RAISING
/AWS1/CX_TRNINTERNALSVCERROR
/AWS1/CX_TRNINVALIDREQUESTEX
/AWS1/CX_TRNRESOURCENOTFOUNDEX
/AWS1/CX_TRNSERVICEUNAVAILEX
/AWS1/CX_TRNTHROTTLINGEX
/AWS1/CX_TRNCLIENTEXC
/AWS1/CX_TRNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_connectorid TYPE /AWS1/TRNCONNECTORID /AWS1/TRNCONNECTORID¶
The unique identifier for the connector.
Optional arguments:¶
it_sendfilepaths TYPE /AWS1/CL_TRNFILEPATHS_W=>TT_FILEPATHS TT_FILEPATHS¶
One or more source paths for the Amazon S3 storage. Each string represents a source file path for one outbound file transfer. For example,
amzn-s3-demo-bucket/myfile.txt.Replace
amzn-s3-demo-bucketwith one of your actual buckets.
it_retrievefilepaths TYPE /AWS1/CL_TRNFILEPATHS_W=>TT_FILEPATHS TT_FILEPATHS¶
One or more source paths for the partner's SFTP server. Each string represents a source file path for one inbound file transfer.
iv_localdirectorypath TYPE /AWS1/TRNFILEPATH /AWS1/TRNFILEPATH¶
For an inbound transfer, the
LocaDirectoryPathspecifies the destination for one or more files that are transferred from the partner's SFTP server.
iv_remotedirectorypath TYPE /AWS1/TRNFILEPATH /AWS1/TRNFILEPATH¶
For an outbound transfer, the
RemoteDirectoryPathspecifies the destination for one or more files that are transferred to the partner's SFTP server. If you don't specify aRemoteDirectoryPath, the destination for transferred files is the SFTP user's home directory.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_trnstartfilexferrsp /AWS1/CL_TRNSTARTFILEXFERRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->startfiletransfer(
it_retrievefilepaths = VALUE /aws1/cl_trnfilepaths_w=>tt_filepaths(
( new /aws1/cl_trnfilepaths_w( |string| ) )
)
it_sendfilepaths = VALUE /aws1/cl_trnfilepaths_w=>tt_filepaths(
( new /aws1/cl_trnfilepaths_w( |string| ) )
)
iv_connectorid = |string|
iv_localdirectorypath = |string|
iv_remotedirectorypath = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_transferid = lo_result->get_transferid( ).
ENDIF.