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

modifying the code of the report dynamically

Former Member
0 Likes
1,558

Hi

i have read the source of the report-X into a internal table of a program -Y and modified that internal table according to the requirement.

now i want to put the modified code in to the report X.

so can anyone let me know how can i do this.i have to write this code in Y so that it gets reflected in X.

thanks in advance.

Hi

i have read the source of the report-X into a internal table of a program -Y and modified that internal table according to the requirement.

now i want to put the modified code in to the report X.

so can anyone let me know how can i do this.i have to write this code in Y so that it gets reflected in X.

thanks in advance.

5 REPLIES 5
Read only

Former Member
0 Likes
1,022

use the INSERT REPORT statement.

Syntax - INSERT REPORT <prog> FROM <itab>.

Considering your report name to be ZREPORT_X, then the syntax becomes

INSERT REPORT ZREPORT_X FROM <itab>.

Regards,

Anirban

Read only

0 Likes
1,022

REPORT ZMASTER1.
DATA CODE(72) OCCURS 10.
DATA LIN TYPE I.

READ REPORT 'ZDYN3' INTO CODE.
SUBMIT ZDYN3 AND RETURN.
DESCRIBE TABLE CODE LINES LIN.
MODIFY CODE INDEX LIN FROM
'WRITE / ''Dynamic Program Changed!''.'.
INSERT REPORT 'ZDYN3' FROM CODE.
SUBMIT ZDYN3.

You will get more examples in BC-ABA in SAP Help

Edited by: ZAFCO ABAP on Mar 26, 2009 11:28 AM

Read only

Sm1tje
Active Contributor
0 Likes
1,022

Do F1 help on INSERT REPORT (for some additions).

Read only

Former Member
0 Likes
1,022

Hi,

REPORT ZTEST1.
DATA: code TYPE TABLE OF rssource-line.
* rssource-line is type of an editor line

READ REPORT 'ZTEST2' INTO code.

APPEND '<<any statement you want to add>>' TO code.

INSERT REPORT 'ZTEST3' FROM code.

Hope it solves your problem.

Regards.

Read only

ThomasZloch
Active Contributor
0 Likes
1,022

How did you like the answers here?

Please don't open new threads for the ever same problem, follow up on your first one.

Thomas