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

Month wise Total

Former Member
0 Likes
1,271

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.

3 REPLIES 3
Read only

naimesh_patel
Active Contributor
0 Likes
794

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

Read only

0 Likes
794

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.

Read only

Former Member
0 Likes
794

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.