01-10-2007 10:11 AM
Hi gurus,
i need to execute an external command from a Sap (rel ECC.5.0) to a server UNIX (no SAP); precisely i have to write a file into a directory in unix server.
I see transaction SM49 and Sm69 but i don't know how can i use these features.
Please coul'd you help me or give me a documentation.
Thank's in advance
Maurizio Ortolani
email. maurizio.ortolani@trilog.it
01-10-2007 10:26 AM
hi,
http://help.sap.com/saphelp_47x200/helpdata/en/c4/3a606e505211d189550000e829fbbd/frameset.htm
A.
Message was edited by:
Andreas Mann
01-10-2007 10:24 AM
Hi Maurizio,
i do it in this way:
CONSTANTS: CMD_LS(50) VALUE 'ls -al /transfer/sap'.
*
DATA: BEGIN OF ITAB_LS OCCURS 0,
LINE(200),
END OF ITAB_LS.
*
CALL 'SYSTEM'
ID 'COMMAND' FIELD CMD_LS
ID 'TAB' FIELD ITAB_LS-SYS.
*
How do you write the file, via an UNIX-COMMAND than try the above call
with your command.
Another way is to write the file via OPEN DATASET ..., TRANSFER ... TO ..., CLOSE DATASET.
If you mean this i can give you an example.
Hope it helps.
Regards, Dieter
01-10-2007 10:26 AM
hi,
http://help.sap.com/saphelp_47x200/helpdata/en/c4/3a606e505211d189550000e829fbbd/frameset.htm
A.
Message was edited by:
Andreas Mann
01-10-2007 10:27 AM
apart from open dataset.. transfer... close dataset.
u can also use C3GY or C3GZ tcodes.
also the function module SXPG_COMMAND_EXECUTE
01-10-2007 10:38 AM
Hi everyone,
thank's a lot for your helpful answers.
I try to do this and when i finished i give you a feedback.
Best regards
Maurizio Ortolani
01-10-2007 10:42 AM
but u have to maintain those commands in SM69
u can execute using SM49