on 09-18-2018 7:49 AM
Hello Team,
Client is saving .CSV file in SFTP server on daily basis. we need to fetch it from ABAP custom program and need to do some required data operations.
Could you please help me to fetch that file from SFTP server.? is FM-SXPG_COMMAND_EXECUTE is the right FM to solve this issue? If Yes, then what will be the 'Actual parameters value' needs to pass?. is there any sample ABAP program code?
Note : 1. This is SFTP related issue not FTP.
2. I have created a command using SM69.
3. I am using to connect SFTP server using FM- 'SXPG_COMMAND_EXECUTE'.
Yes it is possible with SFTP (or others, for example LFTP) "command line" command.
You need to explore how to use your selected command and its parameters (it is not ABAP related) and you can then call it with SXPG_COMMAND_EXECUTE in ABAP.
I used LFTP command + SXPG_COMMAND_EXECUTE to upload files to SFTP server in one ABAP class for SFTP and it works OK.
Example bash for upload:
lftp sftp://login:password@host:port -e "cd dir; put filename.csv; ls; bye"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can check the where-used of this function module to see how SAP fills the parameters.
Kind regards, Rob Dielemans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.