Ansicht
Dokumentation

04992 - FTP From SAP

04992 - FTP From SAP

ABAP Short Reference   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

FTP From SAP


Hi, Mike.

I do a lot of FTP's from our SAP server (As/400) to remote servers. I use
an external CL that I can call from SAP (with parameters if necessary). The
flow is as such:

1) In the ABAP, I can either use a direct call to an external OS command
or, the better way, raise an event which will kick off a background job
where you can specify several steps to a job, each with their own
parameters.
2) In the background job, you specify a call to a CL with parameters, e.g.
remote server name (or IP) and a file name and member which has the FTP
source commands.
3) The CL will look something like this:

PGM

OVRDBF FILE(INPUT) TOFILE(<FTP source file name>) MBR(<member with
specific FTP source commands> )
STRTCPFTP RMTSYS(<remote system>)
DLTOVR FILE(INPUT)

ENDPGM

If you had used parameters with the call, the CL could look like this:

PGM PARM(&SERVER &FTPFILE &FTPMBR)

DCL VAR(&SERVER) *CHAR 10
DCL VAR(&FTPFILE) *CHAR 10
DCL VAR(&FTPMBR) *CHAR 10

OVRDBF FILE(INPUT) TOFILE(&FTPFILE) MBR(&FTPMBR)
STRTCPFTP RMTSYS(&SERVER)
DLTOVR FILE(INPUT)

ENDPGM

4) The FTP source file member could look like this:

<user id> <password>
namefmt 1
cd <remote directory>
ascii
put <local file>
quit

5) What I have done in some cases is dynamically build the FTP source
commands in the ABAP that is calling the CL, which is also quite useful.

Let me know if you want/need more info.

Hope this helps!

Des Olwage
Snr. Systems Administrator
Goodyear South Africa
Tel. +27 41 5055441
Cell. +27 82 824 6900





"Mike Martin,

IS-NA, To: "SAP - AS/400 List (E-mail)"
<sap400Zm...>
AOSOLA" cc:

<MMartinZaoso Subject: FTP From
SAP
la.com>



08/02/2002

00:05

Please

respond to

SAP on System i









SAPers,

What methodology do you recommend to move files from SAP to an NT server?
Thus far, we use an external command to handle this: external command in
SAP, setup to run BATCHFTP command on the AS/400. This uses FTP to move
the
file to the remote system. The biggest limitation is that we must setup a
new external command (with correct params.) for each transfer.

So, my questions are:
1. Is there a better way to accomplish moving files from the IFS to an NT
server?
2. Is there an ABAP program that FTPs from the 400 to remote systems that
allows directory specifications, etc., so that new variants can be made for
each transfer?
3. Is there a way to call an external command through ABAP where variants
can be used for each transfer which will pass the values to a 'generic'
external command?

We have many new transfers starting, and any advice you can provide would
be
greatly appreciated.

Thanks in advance,
Mike D. Martin
SAP Basis Administrator
AO * SOLA
707-763-9911 x6106
email: <mailto:mmartinZs...>





[Non-text portions of this message have been removed]


consolut Sponsor












Have a look to our homepage at: http://www.consolut.net
DoNotReply@consolut.eu







Durban Tours - Südafrika Safari

General Data in Customer Master   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 4275 Date: 20240621 Time: 041946     sap01-206 ( 3 ms )