10-31-2017 12:06 PM
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-31-2017 1:32 PM
Use a temporary internal table and append the lines to global one in each loop iteration.
10-31-2017 1:46 PM
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?
11-02-2017 9:23 AM
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.
11-02-2017 12:35 PM
11-02-2017 12:33 PM
Sorry, but could you please post a short code snippet that we could run so that to understand your question and issue?
11-02-2017 1:59 PM
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.