Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

counter problem while lot no is being changed

Former Member
0 Likes
367

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.

1 REPLY 1
Read only

Former Member
0 Likes
352

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.