Application Development 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: 

Dynamic subtotal REquired

Former Member
0 Kudos

Friends,

I have a requirement where user can select (out of 18 in my case) cols in the ALV output, and i shd internally get get subtotals acc to cols selected and divide all the subtotals by one known predetermined field's subtotal and insert the new <b>subtotalled and divided</b> line .

I am able to get the cols selected by get_selected_columns method.

Now to achieve the subtotal ..i am not able to use a dynamic IF condition. I am trying dynamic read,,but thats also giving problems in logic. In short i need to get subtotals dynmically acc to cols selected by user.

Can any one please help...

Regards,

Venkat

2 REPLIES 2

kiran_k8
Active Contributor
0 Kudos

Sai,

First you have to decide based on what you want to get the subtotals.Then you select that field and click on the subtotals button(in the toolbar of alv output).

Now select all the fields for which you want the subtotals and click on the Aggregation button.This will give you the subtotals.

ALV itself provides you this option,there is no need to write any code.

K.Kiran.

Former Member
0 Kudos

But kiran i need to get subtoals divided ny one cols subtotal when user clicks a custom buttton