cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sumarise table

Former Member
0 Likes
442

Hi

I have one internal table its structure

BEGIN OF wa_data OCCURS 0,

ename LIKE pa0001-ename, 'Sales Id

mmyyyy(8) TYPE c, " Month Year

bezei LIKE tvaut-bezei, " REason

netwr LIKE vbak-netwr, "Net Value of SO inDoc Currency

pernr TYPE pa0001-pernr, "Sales ID

lcamt LIKE vbak-netwr, "Net Value of SO Local Currency

nos TYPE i,

audat LIKE vbak-audat, "Document date

vkbur LIKE vbak-vkbur,

vkorg LIKE vbak-vkorg,

END OF wa_data.

I needed to make a internal table with sum of amount for each employee for each month for each reason.

emp id Reason monthyear amount

1 aaa JAN09 1100.00

2 aaa JAN09 1200.00

3 aaa JAN09 1400.00

4 BBB JAN09 1300.00

How to get a sum from the a details table. detail table having so many records for each employee for for each reason for each month

Regards

Sebastian JOhn

View Entire Topic
alex_m
Active Contributor
0 Likes

Use COLLECT statement.