‎2006 May 31 8:12 AM
Hi All,
I have a requirement, where i write an ABAP program that gets a Program Name as input and should return the source code of the program that is supplied as input.
Is there a standard Function Module that would fetch me the source code of the program name that i provide as input to my program?
Thanks in advance.
Best Regards,
Ram.
‎2006 May 31 8:17 AM
Hi Ram,
Write a report program with a parameter to accept the Program Name.
Inside the program use the following statement.
READ REPORT 'your parameter value' into internal_table.
<b>Reward points if it helps.</b>
‎2006 May 31 8:16 AM
‎2006 May 31 8:17 AM
Yup.. you can use Function Module <b>SCWB_GET_ABAP_CODE_OF_OBJECT</b>
Enjoy Coding,
Thomas.
‎2006 May 31 8:17 AM
Hi Ram,
Write a report program with a parameter to accept the Program Name.
Inside the program use the following statement.
READ REPORT 'your parameter value' into internal_table.
<b>Reward points if it helps.</b>
‎2006 May 31 8:20 AM
Hi,
you can use <b>READ REPORT</b> syntax to read the Program to an internal table from there you can display it.
Regards
vijay
‎2006 May 31 8:28 AM
Hi ram,
1. Simple.
2. Just copy paste
it will ask for program name,
and write out the source code of the same.
3.
report abc.
*----
data : begin of itab occurs 0,
line(72) type c,
end of itab.
*----
parameters : pgname(30) type c.
*----
start-of-selection.
read report pgname into itab.
loop at itab.
write 😕 itab-line.
endloop.
regards,
amit m.
‎2006 May 31 8:40 AM
Hi all,
Thanks a lot. That answered my query and i was able to get the program code.
Vijay Babu Dudla and Amit Mittal - Am sorry as i was not able to assign full points to you both, because the forum allowed me to select Solved Problem as well as Very Helpful answer only twice. I had already gave full points to the first answer that i had got.
Thanks and regards,
Ram.