‎2010 Aug 04 12:56 PM
Hello Experts,
We have this issue in client server.One of the batch job is frequently failing while executing this function module SXPG_COMMAND_EXECUTE with error as command_not_found.This error occurs frequently on a particular application server but not all the times it fails but we find some job failures 2 to 3 times a day,as this batch job is running every 15min.Please find the sample code below and advice.Many thanks in advance.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = 'ZZ_YP_MKDIR'
additional_parameters = w_command
TABLES
exec_protocol = i_command_results
EXCEPTIONS
no_permission = 1
command_not_found = 2
parameters_too_long = 3
security_risk = 4
wrong_check_call_interface = 5
program_start_error = 6
program_termination_error = 7
x_error = 8
parameter_expected = 9
too_many_parameters = 10
illegal_command = 11
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14
OTHERS = 15.
IF sy-subrc = 0.
LOOP AT i_command_results.
WRITE: / i_command_results-length,
i_command_results-message.
IF i_command_results-message <> space.
w_error = 'X'. "AN14112002
MESSAGE i179(zv) WITH i_command_results-message
v_char_seqno.
"'Make Directory failed'
ENDIF.
‎2010 Aug 04 1:44 PM
Hi swathv
That function is used for calling Unix scripts on the application server,
You can specify a unix script as a command on transaction SM69
and than you can call this command with function 'SXPG_COMMAND_EXECUTE'
Can you find this command in SM69 and related script,
and learn what is it used for?
Maybe you are using more than 1 application server,
and script file exist on a server but doesn't exist on other.
I hope it helps.
‎2010 Aug 04 1:44 PM
Hi swathv
That function is used for calling Unix scripts on the application server,
You can specify a unix script as a command on transaction SM69
and than you can call this command with function 'SXPG_COMMAND_EXECUTE'
Can you find this command in SM69 and related script,
and learn what is it used for?
Maybe you are using more than 1 application server,
and script file exist on a server but doesn't exist on other.
I hope it helps.
‎2010 Aug 04 2:24 PM
Hi,
Yes, you're right more than 1application server is used and the script file exists on all the server.Let me mention that not all the time its failing on this server, only sometimes.Pls advice what needs to be checked with.
Thanks.
‎2010 Aug 04 2:38 PM
As you said "This error occurs frequently on a particular application server but not all the times.."
Since it occurs randomly
It seems like a file accessibility problem for that application server and sometimes only.
You can specify which server the Job runs on with transaction SM37.
Just choose your job in the list, click menu item Job > Change
and fill field "Exec.Target" with a problem-free server.
Edited by: Bulent Balci on Aug 4, 2010 3:39 PM
‎2010 Aug 04 1:44 PM
How is the command 'ZZ_YP_MKDIR' defined & what is the value passed to 'w_command' ?
‎2010 Aug 04 2:01 PM
Check in SM49 if command you trying execute thru FM exists, may be something might have got changed recently.