‎2007 Jun 14 5:41 AM
hi friends,
i have one requirement. to get the program in an internal table. and read it line by line how can i do it. please help as soon as possible.
‎2007 Jun 14 5:47 AM
sample code
DATA prog TYPE c LENGTH 30.
DATA itab TYPE TABLE OF string.
prog = '...'.
READ REPORT prog INTO itab.
IF sy-subrc = 0.
APPEND 'FORM subr.' TO itab.
...
APPEND 'PERFORM ...' TO itab.
APPEND 'ENDFORM.' TO itab.
GENERATE SUBROUTINE POOL itab NAME prog.
PERFORM ('SUBR') IN PROGRAM (prog).
ENDIF.
reward points if it is usefull ...
Girish
‎2007 Jun 14 5:45 AM
Hi,
Not sure if you are looking for this..
use the syntax READ REPORT to read the program code..
Ex..
DATA: GT_CODE(72) OCCURS 0 WITH HEADER LINE.
READ REPORT ZTEST INTO GT_CODE..
Thanks
Naren
‎2007 Jun 14 5:47 AM
sample code
DATA prog TYPE c LENGTH 30.
DATA itab TYPE TABLE OF string.
prog = '...'.
READ REPORT prog INTO itab.
IF sy-subrc = 0.
APPEND 'FORM subr.' TO itab.
...
APPEND 'PERFORM ...' TO itab.
APPEND 'ENDFORM.' TO itab.
GENERATE SUBROUTINE POOL itab NAME prog.
PERFORM ('SUBR') IN PROGRAM (prog).
ENDIF.
reward points if it is usefull ...
Girish
‎2007 Jun 14 7:16 AM
hi,
use the syntax READ REPORT to read the report
Ex..
types : begin of ty_t,
v_string type string,
end of ty_t.
DATA: i_t type standard table of ty_t WITH HEADER LINE.
READ REPORT ZSAMPLE INTO i_t.
‎2007 Jun 14 9:42 AM
hi friends.
i have done upto to that but i need to colour the word select and endselect commands inside the program and display the full program. give some sample codes..