‎2008 Apr 21 6:58 AM
hi i am beginner in sap-abap
so i have a doubt so can any one clarify it.
My requirement is i have to develope a code such that user have to enter the program name (YSAMPLE) and my code should automatically read the lines of code inside the program and should display them is that possible?
‎2008 Apr 21 7:03 AM
Hi,
Try this example:
*parameters : p_report type sy-repid.
Data: begin of itab occurs 10,
line(140),
End of itab.
Read report sy-repid into itab.
itab-line = 'Write / ''Welcome Rico''.'.
append itab.
insert report from itab.
loop at itab.
write / itab.
endloop.
Regards,
Satish
‎2008 Apr 21 7:06 AM
Hi below code line will solve your query..
In that code ..p_prog is your program name...
TYPES:
BEGIN OF type_report,
field(250) TYPE c, " Line Of Report
END OF type_report.
READ REPORT p_prog INTO i_report.Just print each line of internal table..
i_report is your internal table..
thanks,
Brijesh