Application Development 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: 

at end of

Former Member
0 Kudos

Hi Gurus,

I am looping one internal having material mblnr and matnr.

I did write at end of for matnr(at end of matnr).

this event(at end of matnr) regardless of matnar changes.

but I sorted internal table by mblnr and matnr.

itab like:

mblnr | | field || field || matnr

100 hk j lj 1

100 lk k 1

100 lk lk 1

my itab having this type of data but at end of matnr event triggering each and every loop.

how can i solve this problem please any body knows please give the repply.

Regards,

Shashikumar.G

1 REPLY 1

Former Member
0 Kudos

Hi Sahshi,

All control break statements except on change of consider all the columns left to the mentioned one. In your case matnr is the last field so this report is comparing all the left fields and its giving totals as obviously any one of them will change.

solution. :-

If you want to have total on change of only matnr your internal table declaration should be

matnr || mblnr | | field || field

Or if you want to have sum for mblnr and material combination then your internal table declaration should be

mblnr || matnr || field || field .

Note : your program may dump be careful with select statement , use into corresponding fields of table.

Reward points if useful,

Aleem.