on 07-27-2009 12:42 PM
Hi ,
I created an internal table and assigned that to loop element and within that i created a table element and hoping to print table for n times.but it is printing only one time and i did put another code statement along with table in the loop and it is getting executed for n times but i dont understand the problem with table elements.
are there any special conditions need to be met
Let me know the solution
Thanks
Bala Duvvuri
Try to create New program lines in the loop. There write break <your username> in it. See if the loop to write the table is getting executed n times.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bala,
Lets say that we have two tables..
SFLIGHT and SBOOK
First we need to populate both the tables, assume that we have both the tables in the Global data section. Also declare work area in the same global data section.
Now, we can use a Loop and Table with in Loop.
1) Loop
IT_SFLIGHT INTO WA_SFLIGHT " Define like this in loop Data tab
Now, here you can use a template and display the data of the WA_SFLIGHT
2) TABLE
You can create a table under the loop,
IT_SBOOK INTO WA_SBOOK " Define this in TABLE DATA Tab
Add conditions in where condition of data section..
CARRID = WA_SFLIGHT-CARRID
CONNID = WA_SFLIGHT-CONNID
FLDATE = WA_SFLIGHT-FLDATE
Create line type in table and add the same in main area of a table and display the WA_SBOOK data.
I hope it helps.
Thanks,
Sreekanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
may i know what data are u assigning to the table..
i guess ur prob can be solved in this way..pls try this..
if 1 internal table..
maintain a global variable for the count..and increment it in the program lines and use it in the condition of loop.
assign the internal table to the loop field in table->data tab.
if 2 internal tables..
assign 1 internal table to the loop element.
assign second internal table to the loop field in table ->data tab.
hope this will be helpful ..
Thanks and Regards..
KC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.