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: 

ALV Grid Control: Subtotal Collapse

Former Member
0 Kudos
2,835

Hello, I've recently programmed a report using the ALV grid control using the OO methods. For some reason when a user does a total and/or a subtotal, they are not able to click the total/subtotal line to collapse (summarize). Has anyone else experienced this? I'm sure there must be a solution. Thanks.

1 ACCEPTED SOLUTION

Former Member
462

Hi,

Does this happen in all of the OO ALV Grid programs?

THanks

Naren

11 REPLIES 11

former_member188685
Active Contributor
0 Kudos
462

for that you need to use expa of sort option.

when you are filling the sort table set the parameter EXPA to 'X'

sort-fieldname = 'ABCDE'.
sort-up = 'X'.
sort-subtot = 'X'.
sort-expa = 'X'.      "this is important
append sort to it_sort.

0 Kudos
462

I'm not using the sort parameter, I'm using the standard provided total/subtotal buttons. I tried implementing this and it did not work how I expected. When hitting the total button, it automatically subtotalled and collapsed the records. I was not able to click the icon to the right of my sorted field to expand.

I want to be able to use the white icon on the subtotalled field to expand and collapse just as you can using SE16n and other alv controlled reports.

0 Kudos
462

Has anyone else experienced this?

0 Kudos
462

What do i call it then ??

sort-expa = 'X'.   is this feature enabled or disabled ??

0 Kudos
462

Hello,

Collapse option  does not work if there are some Editable fields in ALV how to make collapse option to work  Work.

Former Member
463

Hi,

Does this happen in all of the OO ALV Grid programs?

THanks

Naren

0 Kudos
462

Standard sample program BCALV_FIELDCAT_TEST allows the interactive collapse/expand on subtotal. Sum a column and then subtotal on a specific column. That subtotalled column will have a white icon in the subtotal line that you can click on and collapse records.

If you do the same on sample program BCALV_EDIT_08, you will see the white icon in the subtotal row, but you can't collapse. This is the same issue I'm having in my program. I'm not seeing the problem. Is there a control or parameter that needs setting?

0 Kudos
462

You have to make your ALV as output only inorder to get the expand collapse button working.

I ran the program BCALV_EDIT_08.

I did the total on the Lug. weight

Than I did the subtotal on the Flight No (2nd column)

I have tried to collapse the subtotal .. but it didn't work. When I move cursor over to collapse field , the icon for Hotspot is not coming.

I pressed F5 and it changed the look of the ALV. Now the selection field has gone from the ALV

and Surprisingly, I am able to Collapse and expand the Total and Subtotal line becuase when I move the cursor on the Expand collapse button, I got the Hotspot.

When we press F5, it changes the layout and making the ALV ... only for output.


    call method g_grid->set_ready_for_input               
                    exporting i_ready_for_input = 0.      "<< 

Regards,

Naimesh Patel

Edited by: Naimesh Patel on Oct 16, 2008 11:15 AM

0 Kudos
462

That's wild, I just tried as you described and it did the same thing. What is F5? If I try that on my custom program it does nothing. Time to debug Thanks for the hint. Maybe something will come of this.

0 Kudos
462

That is it, thank you so much. This was a little bug I've tried to figure out for a long time.

kyo_choi2
Participant
0 Kudos
462