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 Grids

Former Member
0 Likes
890

Hi ,

I have one screen and have placed two ALV Grids (using OOPS ALV) on it. The two ALV Grids has two operational fields each.I should sum up all the values corresponding for each field and display at the totals section below the ALV grids. The totals section is not a ALV Grid. How can I do it?

Thanks,

Pavan.

Hi ,

I have one screen and have placed two ALV Grids (using OOPS ALV) on it. The two ALV Grids has two operational fields each.I should sum up all the values corresponding for each field and display at the totals section below the ALV grids. The totals section is not a ALV Grid. How can I do it?

Thanks,

Pavan.

5 REPLIES 5
Read only

Former Member
0 Likes
852

Hi Pavan,

1. place two custom container on screen.

2. create 2 ALV based on them.

3. create total label and a button. label should bind to a global total field which is updated later.

-> when use clicks button to calculate total of field based on internal table associate with fields and update global total field.

Thanks,

Duy

Read only

0 Likes
852

Hi Duy,

Thanks for your quick response.

Without placing and clicking a button on the screen , Can I add up the values of the field in both the ALV Grids and display it in the Totals Section.

Thanks,

Pavan.

Read only

Former Member
0 Likes
852

Hi,

Try to create a field in same screen with your alvs.

Then use FM LVC_TOTALS_GET to get total of alv to display on that field (or Get the Subtotal from that ALV object using the GET_SUBTOTALS method. Get the table ep_collect01).

regards,

Read only

0 Likes
852

Hi,

Thanks for your quick response.

I have only one screen . In that below the two ALV Grids, I have Totals Section which should sum up the values of that particular field from two ALV Grids and display .

So According to you , In which ALV Container I need to create a Total Field and How can I make use of the FM LVC_TOTALS_GET.

Thanks,

Pavan.

Read only

0 Likes
852

Hi Pavan,

Refer to this for 2 ALV on screen:

[Display two or more ALVs on one screen using Splitter Control|http://wiki.sdn.sap.com/wiki/display/ABAP/DisplaytwoormoreALVsononescreenusingSplitterControl]

On that screen, you embedded a field which is anything but a global variable. You can calculate whatever you want and assign the value to it.

I didn't recommend you to use that FM because you are using ALV OO.

Thanks,

Duy