2008 Jul 28 10:59 AM
Hello Freinds,
I have an ALV layout in which records have some fields like
Period Fiscal_Year Profit_Center BilledRevenue
001 2008 100000 2.0
004 2008 100000 3.0
Now the user wants that instead of two records..only one record should be shown in the o/p and the Billed Revenue field should have summed up value.in this case..5.0
Please help with some sample code.
2008 Jul 28 11:09 AM
Hi,
In the Field Cat log cteation,Fill the field DO_SUM = 'X'.
Regards,
Rama.
2008 Jul 28 11:11 AM
i am assumin the Field order will be like the below//
Period
Fiscal_Year
Profit_Center
SORT IT_DATA BY Period Fiscal_Year Profit_Center .
LOOP AT IT_DATA.
at end of profit_center.
sum.
appen it_data to it-final.
enat.
ENDLOOP.Now use IT_FINAL and show the ALV output.
2008 Jul 28 11:11 AM
hi check this...
you use this in populating the records for the final internal table
loop at itab.
at last .
do sum.
endat.
endloop.
dont do anything in the layout ...