2006 Jul 24 11:41 AM
Hi alll
I want month wise summary total. How can i calculate.my datas r in internal table. how can i calculate. Internal table structre
date
amount,
sales organisation,
etc.
Hi alll
I want month wise summary total. How can i calculate.my datas r in internal table. how can i calculate. Internal table structre
date
amount,
sales organisation,
etc.
2006 Jul 24 11:43 AM
hello,
Take one more int table.
it_sum >>
month(2),
amount
Loop at itab.
it_sum-month = itab-date+4(2).
it_sum-amount = itab-amount.
collect it_sum.
clear it_sum.
endloop.
regards,
Naimesh
2006 Jul 24 11:44 AM
Hi,
Did you try this logic.
assum your table name is itab and date format is ddmmyyyy.
loop at itab.
case itab-date+2(2).
when '01'." for month of jan
sum1 = sum1 + itab-amount. "sum 1 represent sum for jan month
"similarly do it for all the 12 months.
endcase.
endloop.
Regards,
Sumit.
2006 Jul 24 11:44 AM
HI muthu,
1. U have one internal table ITAB
with all records.
2. Make one more STAB
with
fields -
a) MONTH
b) TOTAL
(the month field and total numeric field
should be same as ITAB)
3. then just do this.
4. LOOP AT ITAB.
MOVE-CORRESPONDING ITAB TO STAB
COLLECT STAB.
ENDLOOP.
5. In STAB u will get all the TOTALS, month wise only.
regards,
amit m.