Application Development 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: 

ABAP statement in a fashion, the program executed

Former Member
0 Kudos
72

Experts,

How can we store ABAP program store in the internal table?

Also, I need a FM that stores the ABAP statement in a fashion, the program executed.

Do we have any FM available?

Thanks in Advance

SM

Moderator message: FAQ, please do more research before posting.

Message was edited by: Thomas Zloch

4 REPLIES 4

Former Member
0 Kudos
39

Hi SM,

   You can store the whole ABAP program into an Internal table and you can use the statement READ REPORT for it.

But i am not able to get your second part of the question (I need a FM that stores the ABAP statement in a fashion, the program executed.)

Can you please explain it.

Regards,

Praveenkumar T.

Former Member
0 Kudos
39

SM,

Try following FM

DATA:
       t_code TYPE STANDARD TABLE OF abaptext.

   CALL FUNCTION 'SWY_READ_REPORT'
     EXPORTING
       report_name = p_prog
     IMPORTING
       SOURCE      = t_code
     EXCEPTIONS
       read_error  = 1
       OTHERS      = 2.

For second part, I assume there is no such FM.

You have to manually use logic.

Regards,

nimz

0 Kudos
39

Thanks nimz.

raymond_giuseppi
Active Contributor
0 Kudos
39

Look at the following statements

- READ REPORT to read source code

- GENERATE SUBROUTINE POOL to generate a temporary program, then execute it

Regards,

Raymond