‎2010 Jan 21 2:31 PM
HI I have a SAP qith Unix O.S.
Is there an abap command or function module in order to execute a unix command on SAP?
example "ls - la" in order to have a list of files
or
"ren old.file new.file"
Thanks
‎2010 Jan 21 2:36 PM
SXPG_COMMAND_EXECUTE
You have to configure the command in SM69 before using this fm
‎2010 Jan 21 3:10 PM
Hi Fabrizio,
You should avoid this as possible, but if you have really to execute UNIX command, you also can use standard report RSBDCOS0.
You can also use ABAP :
CALL 'SYSTEM' ID 'COMMAND' FIELD ld_command
ID 'TAB' FIELD lt_result.
Best regards,
Samuel
‎2010 Jan 21 3:15 PM
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
COMMANDNAME = COMMANDNAME
OPERATINGSYSTEM = OPERATINGSYSTEM
ADDITIONAL_PARAMETERS = ADDITIONAL_PARAMETERS
IMPORTING
STATUS = STATUS
EXITCODE = EXITCODE
TABLES
EXEC_PROTOCOL = EXEC_PROTOCOLCheck the link:-
http://help.sap.com/saphelp_40b/helpdata/EN/fa/0971fb543b11d1898e0000e8322d00/content.htm
Hope it helps you..
Manas M.