Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

read

Former Member
0 Likes
569

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
553

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

4 REPLIES 4
Read only

Former Member
0 Likes
553

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

Read only

Former Member
0 Likes
554

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

Read only

Former Member
0 Likes
553

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.

Read only

Former Member
0 Likes
553

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..