REPORT z_barry_test_shell .
DATA: commtext(120) ,
itab(255) OCCURS 10 WITH HEADER LINE.
DATA: BEGIN OF itab_sh OCCURS 0 ,
line(120) TYPE c,
END OF itab_sh.
DATA: dname(120) TYPE c ,
str TYPE string .
dname = '/usr/sap/BQD/DVEBMGS00/work/test.sh'.
OPEN DATASET dname FOR INPUT IN TEXT MODE .
IF sy-subrc = 0.
DO.
READ DATASET dname INTO itab_sh.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND itab_sh.
ENDDO.
ENDIF.
CLOSE DATASET dname.
EDITOR-CALL FOR itab_sh TITLE 'Shell编写:'.
IF sy-ucomm = 'WB_SAVE'.
OPEN DATASET dname FOR OUTPUT IN TEXT MODE .
IF sy-subrc NE 0.
MESSAGE e000(z900) WITH 'ERROR!' dname……