Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling unix file program stored in server directory

inde_singh
Explorer
0 Kudos

Hi, how do I start a unix batch program stored on the server directory from an ABAP program. I need to pass a parameter to the program as well. The unix batch program is a script program that will start an FTP file transfer process. I'm using SAP 4.6c running on Windows NT.

Thanks, Inde

7 REPLIES 7

andreas_mann3
Active Contributor
0 Kudos

Hi Inde,

1) customizing: with TA SM69

2) calling : with function SXPG_CALL_SYSTEM

regards Andreas

0 Kudos

Hi Andreas, thanks for the info. will prove to be very useful.

Would you be able to give me any guidance on the use of function module FTP_COPY. It's used in ABAP RSFTP004, RSFTP004 parameters include source and destiniation parameters. I have the destination parameters but don't where to get the source (SAP) user or password for RFC destination SAPFTP. I've asked Basis but they have not found anything yet.

Thanks, Inde

andreas_mann3
Active Contributor
0 Kudos

Hi Inde,

you need the following parameters:

1) SOURCE

a) FTP-User

b) password

c) IP-Adress

d) (source-) file

2) DESTINATION

a) FTP-User

b) password

c) IP-Adress

d) (destination-) file

3) RFC-Destination

(you'll find this in TA SM59 -> TCP/IP-connections)

- SAPFTP (on-line)

or - SAPFTPA (batch)

-> password is not required for this destination

regards Andreas

0 Kudos

Hi Andreas, thanks for the info. again, I have a problem though, I don't know what source user name or password I should use. Do you know where in the system I can find this user information. I've tried my sap logon user id and password but this does not work..I think there must be an FTP specific username and password at the operating system level which I need to use.

Thanks, Inde

0 Kudos

Hi Inde,

Have you tried using Logical Commands that are available, to execute an existing program on the server.

Regards,

Pavan

0 Kudos

Hi Pavan, could you give me some more info. on the use of Logical Commands. How to I create them and execute them.

The external command via SM69 and function module SXPG_CALL_SYSTEM works perfectly to start my server .BAT file. Infact one of the return parameters from SXPG_CALL_SYSTEM returns very detailed info. about the success/failure of the .BAT file.

It would be nice to remove the need for the .BAT file and use function module FTP_COPY to perform the FTP in an ABAP.

Thanks, Inde

0 Kudos

Hi Inde,

Sorry wrong post. I think the external commands is one of the best ways to do it.

Pavan