09-28-2005 9:56 AM
I need to loop through 2 itabs in the main window.
I'm using 2 write_forms. But the contents of the 2nd itab is output below the 1st. Is there any method to make the contents of the 2nd itab to come next to the 1st entry of the first itab?
09-28-2005 10:01 AM
hi,
loop at itab1
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'P1'
WINDOW = 'MAIN'
loop at itab2
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'P2'
WINDOW = 'MAIN'
endloop
endloop
is it helpful
cheers,
sasi
09-28-2005 10:01 AM
hi,
loop at itab1
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'P1'
WINDOW = 'MAIN'
loop at itab2
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'P2'
WINDOW = 'MAIN'
endloop
endloop
is it helpful
cheers,
sasi
09-28-2005 10:14 AM
Dear sasi,
thats wot im doing. But the contents of the 2nd itab comes below the first. I Want it 2 come in the same row as the contents of the first itab in the main window.
any solutions???
regards,
Madan, Bangalore.
09-28-2005 10:26 AM
Create a big new itab in the printprogram which has the combination of the 2 itabs on 1 line. Then put the output of this to the script.
09-28-2005 10:29 AM
Dear Bas,
my 1st itab itself has 4 other itabs in it.
more ever my requirement is that i have to loop through the 2nd itab seperately.
regards madan.
09-28-2005 10:32 AM
I think this is the only way unfortunally. The only other solution I can think of is creating a second MAIN window which is located next to the original one. The second itab can put it's output there.
09-28-2005 10:44 AM
Bas,
A 2nd main window wud be like a 2nd column. also the contenets of the first will flow into the 2nd .
i tried it. but tell me , is here a way to call the 2nd main window explicitly thru write_form.
i tries window = 'MAIN 01'... but got an error. more ever the 2nd main window will take the same width of the 1st. only the height is variable.
regards,
Madan
09-28-2005 10:50 AM
Dear Madan,
I have no on-hands experience with this. There should be possibilities to do this somehow. There are several topics about it on the forum. Good luck!
09-28-2005 10:43 AM
SAP has provided since long the Smart Forms Tool. In most cases this can replace SAP Script requirements. Smart Forms provide loser integration between your extraction/processing logic and display logic. You can pass complete internal tables to the Smart Form and then display them as you like. It provides far greater control on formatting and positioning. One of the greatest advantage over SAP Script is the provision of a grid like table layout, and cells that can wrap data.
I will very strongly recommend that you move on to Smart Forms.
Regards.
09-28-2005 11:02 AM
dear Ahsan,
My friend is working on a different object with a similar requirement as mine. and he is using smart forms.
unfortunately even he is having the same problem.
regards,
madan...
09-28-2005 11:06 AM
Hi
I think the best solution would be to create a 3rd Internal Table. Let th first loop the first few columns of the internal table and the second loop fill the other remaining columns of the Internal table. Finally u can display the Internal table in just one Main Window.
Murli