09-26-2006 12:08 PM
friends,
there is a report that has the final format like the one below...
LGORT BWART COUNT
102S 105 230
102S 315 118
103S 105 439
103S 315 133
Now, i need to change the format of the report such that it should look like :
LGORT 105 315 TOTAL
102S 230 118 348
103S 439 133 572
i.e. there should be only one entry for each storage loc. and the final col. TOTAL should be the sum of the all the movement types...i have worked it out with a couple of logics and not able to arrive at the soln..pl suggest...thanks all..
09-26-2006 12:13 PM
are u calling /creating tables dynamically ? If not u can put like this
loop at itab.
itab-total = itab-105 + itab-315.
modify itab.
endloop.
regards
Prabhu
09-26-2006 12:15 PM
hi,
itab has three fields- lgort,bwart,count and a variable v_count.
loop at itab.
at new lgort.
write : / itab-lgort, itab-bwart.
v_count = v_count + itab-count
endat
write : itab-bwart.
at end of lgort.
write : v_count.
endat.
endloop.
hope this helps.
Regards,
Richa
09-26-2006 12:16 PM
hi,
thanks for the reply..the problem is not with the totaling..i am not able to get the corresponding entries of 105 and 315 in a single line...either they are getting appended or if i use modify, they are getting overwritten...if i use clear the itab, then only the second entry is coming...
09-26-2006 12:17 PM
hi,
Loop at itab and Use At-New of field or At-End of field.
Reward if usefull..
Regards,
Srinivas
09-26-2006 12:22 PM