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

Function Module

Former Member
0 Likes
602

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
571

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>

6 REPLIES 6
Read only

Former Member
0 Likes
571

Hai Ram

check the following F.M

RFC_ABAP_INSTALL_AND_RUN

Read only

Former Member
0 Likes
571

Yup.. you can use Function Module <b>SCWB_GET_ABAP_CODE_OF_OBJECT</b>

Enjoy Coding,

Thomas.

Read only

Former Member
0 Likes
572

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>

Read only

Former Member
0 Likes
571

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

Read only

Former Member
0 Likes
571

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.

Read only

Former Member
0 Likes
571

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.