Application Development and Automation 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: 
Read only

SXPG_COMMAND_EXECUTE - transfer files to FTP

Former Member
0 Likes
3,781

Our OS is Windows NT.

I am using SXPG_COMMAND_EXECUTE to execute a script to transfer files from R/3 App Server to FTP Server. I created a command in SM69.

command name: ZZ_MOVE

Operating system: Windows NT

Type: Customer

Operating system command: cmd

Parameters for operating system command: Full path of the batch file

This batch file contain command for transfer the files. I am getting an error..Command not found.....Is this correct parameters i am passing or anything wrong....

Our OS is Windows NT.

I am using SXPG_COMMAND_EXECUTE to execute a script to transfer files from R/3 App Server to FTP Server. I created a command in SM69.

command name: ZZ_MOVE

Operating system: Windows NT

Type: Customer

Operating system command: cmd

Parameters for operating system command: Full path of the batch file

This batch file contain command for transfer the files. I am getting an error..Command not found.....Is this correct parameters i am passing or anything wrong....

6 REPLIES 6
Read only

Former Member
0 Likes
1,496

Hi,

Command should be creatd an SM49. I hope SM69 for display. From SAP end you need to call the FM SXPG_COMMAND_EXECUTE.

then reste will take care from other end. That is Unix scripting people will take car. If you get some error please check with UNXI people because they need to write some scripting file to get the command in SAP. if the scripting is not exist thet you will end up with error.

Read only

0 Likes
1,496

I created the command in SM49. I am calling FM SXPG_COMMAND_EXECUTE in my program. When i execute the program in debug mode SY-SUBRC = 0 after the FM SXPG_COMMAND_EXECUTE. But originally the command was not executed. I tested the command in DOS command mode, it is working perfectly.

Is there anyway to trace FM SXPG_COMMAND_EXECUTE to check why it is not working....

Read only

0 Likes
1,496

Hi

The command which needs to be creatd from UNIX side also. Based on the comannd they will write the scripting to get the dat from SAP. Check UNIX admin people. Sit together and close this issue.

Read only

0 Likes
1,496

It's Windows NT server, it's not Unix system. I want to move files from one folder to another folder in Application server using FM SXPG_COMMAND_EXECUTE.

I have the Script (for moving files from one folder to another in Application Server). I pasted the script in notepad and saved as .bat file and dropped in Application server source folder. I gave the Application server file path(Script file location) in command create(Parameters for operating system command) in SM49.

Operating system command

cmd

Parameters for operating system command

C:\usr\sap\work\300\testftp.bat

Does it work this way ? I executed the command without errors but the file transfer not happening.....

My question Is does it works if i pass the Script file location in Command create ? if not how can i do this.....

Edited by: fract_get on Mar 15, 2010 8:01 PM

Read only

Former Member
0 Likes
1,496

Resolved the issue myself.

Operating system command

cmd

Parameters for operating system command

/C C:\usr\sap\work\300\testftp.bat

Read only

Former Member
0 Likes
1,496

Hi,

I have faced similar problem. I have found the problem the name of operating system name defined in sm49 against the command. Please check the value of system variable sy-opsys and make the operating system name as it is in SM49. It is case sensitive.

Thanks,

Ranadev Banerjee