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 error command SH

Former Member
0 Likes
3,285

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
Read only

venkateswaran_k
Active Contributor
0 Likes
1,986

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

Read only

0 Likes
1,986

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

Read only

0 Likes
1,986

okay, try to execute the command using this function


SXPG_COMMAND_EXECUTE   -   It will give you the exact exception error


Regards,

Venkat

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,986

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

Read only

0 Likes
1,986

Hi Raymond Giuseppi,

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

Read only

0 Likes
1,986

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

Read only

0 Likes
1,986

Yes...i have user access privilege

Read only

0 Likes
1,986

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

Read only

0 Likes
1,986

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

Read only

0 Likes
1,986

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

Read only

0 Likes
1,986

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