‎2007 Sep 07 2:08 PM
Hi all,
I should access an external server(FTP) and get data which is in the form of flat file.
The Flat files are in a server. Eg:- ftp://b2b.xyz.com
Can anyone let me how I can do this in an SAP Program.
Thanks in advance.
‎2007 Sep 07 2:16 PM
User Trasaction CG3Y/CG3Z
Message was edited by:
Prashant Patil
‎2007 Sep 07 2:18 PM
Hi!
First you have to run ftp, as an external program. Make a configuration file and put it into the same dir, in your ftp exists, and make the ftp to use the config file.
Try using SXPG_COMMAND_EXECUTE fm to this.
Then you can query the content of a directory with EPS_GET_DIRECTORY_LISTING
fm.
Then use OPEN DATASET - CLOSE DATASET to manipulate the files within the directory.
Regards
Tamá
‎2007 Sep 07 2:19 PM
Hi
You can use the FMs for FTP communication.
FTP_CONNECT
FTP_COMMAND
Check the other FMs in SE37 using FTP_* SEARCH...
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 07 2:20 PM
Go to command promp(or DOS prompt).
Change directory to place where you want to store file (which you get from 3rd party machine).
Type command " FTP ipaddress"
it prompts for UserId and followed by password to login to remote machine.
Enter ftp command "get filename" to get file to your machine.
Enter command" Bye" to exit from FTP.
Let me know if you need any more details.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo