Friday, November 23, 2007

sap abap program for Issuing an Unix Command from ABAP

*
* Issuing an Unix Command from ABAP
*
REPORT ZUNIX.

DATA UNIXCMD(50) TYPE C.
DATA: BEGIN OF ITAB occurs 0,
LINE(200),
end of ITAB.

PARAMETERS UNIXCOMM LIKE UNIXCMD
DEFAULT 'ls -ls /usr/sap/trans/data' LOWER CASE.

* Executing the system commands witin ABAP.

call 'SYSTEM' id 'COMMAND' field UNIXCOMM
id 'TAB' field ITAB-*SYS*.

EDITOR-CALL FOR ITAB DISPLAY-MODE.

No comments:

Blog Archive