‎2009 Mar 03 3:11 AM
Hello,
I have a statement like below in my program...
FORM exec_command USING cmd.
FORMAT COLOR COL_HEADING.
WRITE:/ 'Now executing:', cmd.
FORMAT COLOR OFF.
CALL 'SYSTEM' ID 'COMMAND' FIELD cmd
ID 'TAB' FIELD tabl-sys.
WRITE:/ 'Output from OS:'.
LOOP AT tabl. " <- OS-Output
WRITE: / tabl-line.
ENDLOOP.
COMMIT WORK.
REFRESH tabl.
ENDFORM.
i'm not understanding what exactly the call function do's here...
could any one help me in understanding it..
Regards,
Pavan
‎2009 Mar 03 3:17 AM
It is executing operating system command from ABAP
check this [Link|https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/issuingaUnixcommandfromABAP(se38)]
‎2009 Mar 03 3:21 AM
Hello,
thanks for the quick reply!!
but what will i get the value in tabl-sys from the below statement & how it ill be useful (with some examples will be helpful)
CALL 'SYSTEM' ID 'COMMAND' FIELD cmd
ID 'TAB' FIELD tabl-sys.
Regards,
Pavan
‎2009 Mar 03 3:23 AM
Output of the command will be stored in tabl-sys and same will be displayed as output.Go through the link provided.