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

item wise total quantity prob

Former Member
0 Likes
715

hi experts,

i made an alv,which shows o/p like this:

truckno(likp-traid)| dono(likpvbeln)|party nm(kna1-name1)|skucode(lips-arktx)| qty(lips-lfimg)

wb03-7809 | 80000345 | msaha | frooti_pet | 40,000 cs

wb03-7809 | 80000346 | msaha | frooti_ tetra | 20,000 cs

wb03-7809 | 80000345 | msaha | appy1 ltr | 60,000 cs,

but client requirement is that,

they need item wise total ie say, frooti_pet is assigned against dono(80000345), bt this item can also be assigned against another do say(80000389) with sum qty in it.

they want total sum of a particular skucode(item) means frooti_pet(item wise) , that may be assigned in diff dono , but duff dono may be assigned in same truck

o/p will show,

like

truck no| skucode| total(partycular item wise).

how to do it?

thnx in advance.

hi experts,

i made an alv,which shows o/p like this:

truckno(likp-traid)| dono(likpvbeln)|party nm(kna1-name1)|skucode(lips-arktx)| qty(lips-lfimg)

wb03-7809 | 80000345 | msaha | frooti_pet | 40,000 cs

wb03-7809 | 80000346 | msaha | frooti_ tetra | 20,000 cs

wb03-7809 | 80000345 | msaha | appy1 ltr | 60,000 cs,

but client requirement is that,

they need item wise total ie say, frooti_pet is assigned against dono(80000345), bt this item can also be assigned against another do say(80000389) with sum qty in it.

they want total sum of a particular skucode(item) means frooti_pet(item wise) , that may be assigned in diff dono , but duff dono may be assigned in same truck

o/p will show,

like

truck no| skucode| total(partycular item wise).

how to do it?

thnx in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
682

Declare the fields in the internal table in the below order.

dono(likpvbeln)|

skucode(lips-arktx)|

truckno(likp-traid)|

party nm(kna1-name1)|

qty(lips-lfimg)

Above the loop sort the internal table as follows.

Sort itab by dono skucode.

Loop at itab.

at end of skucode.

sum.

here move the Quantity to another variable.

endat.

endloop.

Edited by: Poorna Chandrasekhar on Jan 23, 2009 12:07 PM

Read only

Former Member
0 Likes
682

You have option in ALV layout Subtotal

Sort By Line Item & Press the Subtotal By selecting the Line item.

Try it it will work.

Regards,

Madan Mohan.

Read only

kamesh_g
Contributor
0 Likes
682

hi sort by key field and item number and use collect keyword

Read only

Former Member
0 Likes
682

hello all,

i tried as u all said like this way, but i wont show as i want it item wise total , that item may be assigned in diff truck no.


sort itab3 by traid arktx.
loop at itab3.
    AT END OF arktx.
    sum." = sum + itab3-lfimg.
    itab-text = itab3-text.
    itab-arktx = itab3-arktx.
    itab-lfimg = itab3-lfimg.
    itab-vrkme = itab3-vrkme.
    append itab.
    clear itab3.
endat.
endloop.