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: 

SM69 error command SH

Former Member
0 Kudos

Hi ,

i have a requirement to execute application server file using abap program.


this file is like  /usr/sap....../ZZZZZ.SH



in SM69 i have defined  an external command    --> ZTEST


Operating system command = "SH"

Parameters for operating system command  =  "/usr/sap....../ZZZZZ.SH"

When i execute ZTEST i have this error --->External program terminated with exit code 6

PLEASE

HELP ME

11 REPLIES 11

venkateswaran_k
Active Contributor
0 Kudos

Hi

Can you please check your sm69 - ZTEST - using FM SXPG_COMMAND_EXECUTE

See the Exception it returns,

As per your input, the error code 6 - is program start error. 

So can you have a look at the shell script

Regards,

Venkat

0 Kudos

Hi Venkateswaran Krishnamurthy ,

thanks for your reply.

If i execute my script from  shell linux  it works correctly so I think the script is done well but  I have problems to run it from SM69

I do not understand the error.


Help

0 Kudos

okay, try to execute the command using this function


SXPG_COMMAND_EXECUTE   -   It will give you the exact exception error


Regards,

Venkat

raymond_giuseppi
Active Contributor
0 Kudos

SM69 or SXPG_COMMAND_EXECUTE can display or return a protocol, don't you see any text describing error in SM69 test ?

Also be aware that the command won't be executed with your user as with some shell on application server but with some user associated to SAP, so authority may differ, also insure the shell is accessible when command is executed, some /bin/bash /usr/bin/sh?

Regards,

Raymond

0 Kudos

Hi Raymond Giuseppi,

I do not understand what you mean...there is a specific folder where I save the file ?

0 Kudos

Please confirm the user access privileges..  read,write,execute....

0 Kudos

Yes...i have user access privilege

0 Kudos

Dear swb

Please check

1. upper/lower case - case sensitive

2. any RFC connections ?

3. is there any operating system specified in sm69  (sy-opsys)

Regards,

Venkat

0 Kudos

Hi Venkateswaran Krishnamurthy

1. upper/lower case - case sensitive  -->checked

2. any RFC connections ? What do you mean??

3. is there any operating system specified in sm69  (sy-opsys)  -->Linux

thanks

0 Kudos

Please re-define in sm69 in following way

   type = customer

   command name =  ZTEST

  operating system = UNIX

  external program = <your fill path with zzz.sh>

  parameters        =  <if any>

Acutally command should be a full path file name....  not sh only....

parameters is the input for the sh.file

Can you review and provide me the existing screenshot

Regards,

Venkat

0 Kudos

Hi ,

I deleted everything and I redefined same as before

and now its work correctly

   t ype = customer

   command name =  ZTEST

  operating system =LINUX

Operating system command = "SH"

Parameters for operating system command  =  "/usr/sap....../ZZZZZ.SH"



thanks  to all