on 2007 Dec 26 9:11 AM
Hi experts ,
I am passing intermal table from program to smartforms .
but i want to calculate the Quantatiy(mseg-menge) base on the material nu (MSEG-MATNR) .
am display at end of page . if data into internal table have
matnr menge unit
mat1 30 PC
mat1 40 PC
mat2 10 Kg
mat2 30. Kg
in my smartform out put display at last .
Total
Mat1 : 70 PC
Mat2 : 40 kg
Please if any body have input , you are welcome for solve this issue.
Regards
Ajay Pandey
data: w_sum type menge, w_matnr like matnr.
loop at itab.
w_sum = w_sum + itab-menge.
w_matnr = itab-matnr.
at new matnr.
write: w_matnr, w_sum.
clear: w_matnr, w_sum.
endat.
endloop.
plzz reward if helpfull for any further quiries
my mailid is mutyalasunilkumar@gmail.com
plzz dont forget to reward.
thanks and regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thatks all of you:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your Quick reply ,
But how i can write it into Smartform in main window table node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
try this may help
create code in CELL where u want SUM
use ON CHANGE OF ITAB-MATNR.
clear ITAB-TOTMENGE.
ENDON.
ITAB-TOTMENGE = TOTMENGE + ITAB-MENGE.
reward if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
loop at itab into watab.
if wanew-matnr ne watab-matnr.
append wanew to inew.
clear wanew.
wanew-matnr = watab-matnr.
wanew-qty = watab-qty.
else.
wanew-qty = wanew-qty + watab-qty.
endif.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.