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

SM69 issue

Former Member
0 Likes
971

Hi All,

We have written a unix shell script to do ftp from unix to some shared drive in network, which we need to run from SAP. We have tested the shell script command and it is running fine.

We have created an entry in SM69 for running this.

But when we try to run this command either by FM 'SXPG_COMMAND_EXECUTE' or by SM49 we get an error status saying <b>'Can't exec external program (Exec format error)</b> .

Can anyone help me out?

Thanks,

Santosh.

Hi All,

We have written a unix shell script to do ftp from unix to some shared drive in network, which we need to run from SAP. We have tested the shell script command and it is running fine.

We have created an entry in SM69 for running this.

But when we try to run this command either by FM 'SXPG_COMMAND_EXECUTE' or by SM49 we get an error status saying <b>'Can't exec external program (Exec format error)</b> .

Can anyone help me out?

Thanks,

Santosh.

2 REPLIES 2
Read only

Former Member
0 Likes
757

hi Santosh,

I have also faced the same problem. When you run the script in the unix environment, it runs perfectly, but when you run through SM49 or FM 'SXPG_COMMAND_EXECUTE' you may get this error. This can be resolved by giving '&' equal to the number of parameters you are passing to the script. you can give '&' in SM69, select your external command name, click on Change button. Then write '&' in the Parameter for operating system command field.

I hope this may help you out in resolving the error and get back to me if problem is not resloved. If it help then reward me with the points.

Regards,

Bahul

Read only

Former Member
0 Likes
757

Has this issue been resolved?

If not, add this line at the top to set the correct shell

#!/bin/ksh

--Prabhu.