2007 Dec 11 1:52 PM
hi dears,
I face a problem for counter in my report.
I am developing a report for qm module for inspection lot .
This report shows the result of recording for each lot no.
The problem is that in out put the serial no. shows like this
Lot no. 1
1 a
2 b
3 c
4 d
Lot no2
5 a
6 b
7 c
8 d
But the o/p should come like this
Lot no. 1
1 a
2 b
3 c
4 d
Lot no2
1 a
2 b
3 c
4 d
And my code is as this
Loop at itab.
-
Loop at itab1.
Write: sy-tabix, itab1-kurztext.
Loop at itab2.
Write: itab2-output.
---
---
Endloop.
Endloop.
Endloop.
hi dears,
I face a problem for counter in my report.
I am developing a report for qm module for inspection lot .
This report shows the result of recording for each lot no.
The problem is that in out put the serial no. shows like this
Lot no. 1
1 a
2 b
3 c
4 d
Lot no2
5 a
6 b
7 c
8 d
But the o/p should come like this
Lot no. 1
1 a
2 b
3 c
4 d
Lot no2
1 a
2 b
3 c
4 d
And my code is as this
Loop at itab.
-
Loop at itab1.
Write: sy-tabix, itab1-kurztext.
Loop at itab2.
Write: itab2-output.
---
---
Endloop.
Endloop.
Endloop.
2007 Dec 11 2:00 PM
Hi,
Write the code as below :
itab1[] = itab[].
Sort itab by lotno.
delete adjacent duplicates from itab comparing lotno.
loop at itab.
write : lot no.
loop at itab1 where lotno = itab-lotno.
count = count + 0.
write : count, item.
endloop.
clear count.
endloop.Thanks,
Sriram Ponna.