Skip to Content
-2

How to modify a dynamic table inside a loop without affecting the previous values

Oct 31, 2017 at 12:06 PM

66

avatar image
Former Member

I have a requirement where I need to use a Submit statement for a Standard program. This Submit statement shall be executed inside a loop and the ALV output of the Submit statement will be stored in the dynamic table.Now,for the next value of the loop statement the data got from the submit statement needs to be appended to this table based on the key fields. I am able to get the data into dynamic table for the first loop run but when it comes for appending the data during the second loop run ,I am facing the issue. Could someone help me out in this and guide for a proper approach?

10 |10000 characters needed characters left characters exceeded

Sorry, but could you please post a short code snippet that we could run so that to understand your question and issue?

0

Reema,

"This Submit statement shall be executed inside a loop"

The above statement reads like a standard program will be submitted for as many records as there are in a loop.If that is the case,then definitely this will be equivalent to suicide from programming point of view.

Kindly review your approach or share what exactly is the objective of your development so that you can get more apt replies.

K.Kiran.

1
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sandra Rossi Oct 31, 2017 at 01:46 PM
2

To insert the lines of one internal table "source" into a sorted or hashed internal table "target" (of same structure of course), use INSERT LINES OF source INTO TABLE target. Of course, you'll have to handle the case if the primary key or a secondary key of the target internal table is unique.

PS: is SUBMIT or dynamic table important in your question?

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Sandra,

Both Submit and dynamic table is important. I need to loop for different currency types entered by the user and use the submit statement for standard program RFBILA00.The data for each currency type obtained from outcome of submit statement will be stored in the dynamic table. The dynamic table will have dynamic columns for each currency type. I need to modify the dynamic table for each value of the currency type data obtained from submit statement.

0
I don't understand. Is your issue about field symbols and ASSIGN ?
0
Sathya Gunasekaran Oct 31, 2017 at 01:32 PM
0

Use a temporary internal table and append the lines to global one in each loop iteration.

Share
10 |10000 characters needed characters left characters exceeded