‎2008 May 30 11:21 AM
Dear Friends,
I need to connect to an external non SAP server, from which i need to extract invoice files.
Invoice files are of two types:
1. .dat format files which contain invoice data
2. .PDF or .JPEG documents, which are supporting documents for those invoice.
My question are
1. How do i connect to the external server?
2. Do i have to do a FTP from SAP to that file server?
3. Do i have to fetch the .dat file using dataset statments?
4. What are the basis and network related activities involved to get connected to that external server?
Any inputs and help on this is highly appreciated and rewarded.
Thanks,
Simha
Edited by: Simha on May 30, 2008 12:21 PM
‎2008 May 30 11:39 AM
Hi!
1., 4. - Depends on the external server/operating system type.
2. You have to create an setting for your FTP program on the server. After it is working at operating system level, you can call this FTP command with the following function module: SXPG_COMMAND_EXECUTE
3. OPEN DATASET ... CLOSE DATASET commands will help you.
I just found this one:
For single files you can use EPS_FTP_PUT or EPS_FTP_GET (depending on whether you push or pull your files).
For multiple files
EPS_FTP_MPUT and EPS_FTP_MGET.
CALL FUNCTION 'EPS_FTP_PUT'
Import parameters Value
RFC_DESTINATION = NONE
LOCAL_FILE = filename
LOCAL_DIRECTORY = /dir1/dir2
REMOTE_FILE = filename
REMOTE_DIRECTORY = /dir1
OVERWRITE_MODE = F " force -> overwrite existing file
TEXT_MODE = B " binary
TRANSMISSION_MONITOR X " display transmission monitor
*RECORDS_PER_TRANSFER 10
*REQUESTED_FILE_SIZE 0
*MONITOR_TITLE
*MONITOR_TEXT1
*MONITOR_TEXT2
*PROGRESS_TEXT
*OBJECT_NAME
Regards
Tamá
‎2008 Jun 02 10:06 AM
Hi Tamás,
Thanks for your update.
Could you brief meon how to connect and the basis activity to set up the connectivity.
thanks in advance,
Simha