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

ALV Layout formatting

Former Member
0 Likes
731

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.

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.

3 REPLIES 3
Read only

Former Member
0 Likes
716

Hi,

In the Field Cat log cteation,Fill the field DO_SUM = 'X'.

Regards,

Rama.

Read only

Former Member
0 Likes
716

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.

Read only

Former Member
0 Likes
716

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 ...