‎2007 Nov 01 3:30 PM
Hi experts!
i have a problem in sap script.can anyone help me out.
my scenerio is that i have to use a loop in two windows.
name of first window h1 type var
name of 2nd window main type main.
when i use that loop in main it gives me required output that is
e.g.
material
s1
s2
s3
but when i use that loop in h1 window
it gives me output
material
s3
s3
s3
can anyone help me with that
‎2007 Nov 01 3:43 PM
Actually you can't use the LOOPs in the VAR windows.
So, I would suggest to take the max number variables of the lines for that window.
Assign each lines of the table to that varaible and print all variables in that window.
Like:
read table itab index 1.
mat1 = itab-matnr.
read table itab index 2.
mat2 = itab-matnr.
......
.....
and in the VAR type window
&MAT1&
&MAT2&
....
...
Regards,
Naimesh Patel
‎2007 Nov 01 3:43 PM
Actually you can't use the LOOPs in the VAR windows.
So, I would suggest to take the max number variables of the lines for that window.
Assign each lines of the table to that varaible and print all variables in that window.
Like:
read table itab index 1.
mat1 = itab-matnr.
read table itab index 2.
mat2 = itab-matnr.
......
.....
and in the VAR type window
&MAT1&
&MAT2&
....
...
Regards,
Naimesh Patel
‎2007 Nov 01 4:34 PM
Jawad,
Some where you are not clearing the work area.
clear work areas after append, modify statements.
Reward points if it helps,
Satish