‎2010 Feb 03 1:31 PM
Hi All,
Client requirement is to Move File from Presentation Server to Application Server.
I am executing UNIX script on AIX OS via SM69.
But I am getting the following error:
Can't exec external program (No such file or directory)
External program terminated with exit code 1
Also getting same error with FM-SXPG_COMMAND_EXECUTE .
Below is the code..
data: l_exitcode type btcxpgexit,
l_parms type btcxpgpar,
l_status type btcxpgstat.
data: lt_protocol type standard table of btcxpm,
l_protocol type btcxpm.
concatenate 'C:\Venkat1\PARBIND.BMP'
'D:\Venkat2\PARBIND.BMP'
into l_parms
separated by space.
* External command:
* - Unix - mv
call function 'SXPG_COMMAND_EXECUTE'
exporting
commandname = 'Z_MV'
additional_parameters = l_parms
importing
status = l_status
exitcode = l_exitcode
tables
exec_protocol = lt_protocol
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 ne 0
endif.
Can any one guide what is the cause of error....
Any help will be appreciated.
Regards
Arbind
‎2010 Feb 03 3:59 PM
exception value 1, you can see on the call to SXPG_COMMAND_EXECUTE, means no permission to perform the operation.
It will attempt to move the file using the SAP system user id, which probably does not have authorisation to read/write to the required directories.
‎2010 Feb 04 6:19 AM
Hi,
I have checked all the Authorizations are given.
But still I am not able to find the solution.
I think some BASIS Settings are required but unable to find.
Please help me out.
Thanks
Arbind
‎2010 Feb 04 7:53 AM
have you checked you have execute permission on the Z_MV script ? Again it will be the SAP system user for the instance that will be trying to invoke the script. Usually <SID>adm. Where <SID> is system id.
‎2010 Feb 04 7:57 AM
Hi Paul,
I have got execute persmisson on the Z_MV script.
But Error is still there.
I am not able to fix the problem.
Thanks
Arbind
‎2010 Feb 04 8:00 AM
I would ask your Basis team to replicate the call to the script with the source and target directories, but make the call at operating system level rather than through SAP. This will define where the permission issue is.
‎2010 Feb 04 8:17 AM
Hi Paul,
Thanks.
But still Basis Consultants are telling it is correct from there side.
Is there any other way to move files from Presentaion Server to Application Server in Background Processing.
I have used CL_GUI_FRONTEND_SERVICES=>FILE_COPY
It is working fine in Foreground but in Background Proceesing, it is not working.
Can u provide any solution ?
Thanks
Arbind
‎2010 Feb 04 8:22 AM
Running in background is always going to cause probelms, as you have no presentation server if no dialogue user.