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: 

default collapsed view in ALV grid with subtotoal lines

Former Member
0 Kudos
1,935

Hallo experts,

I am displaying a ALV grid with subtotals. Now my requirement to display the Grid with only subtotal lines. Means the grid should be displayed in collapsed mode by default.

Can any you help me finding this option.

Thanks.

Matt.

1 ACCEPTED SOLUTION

Former Member
459

Hallo experts,

I am displaying a ALV grid with subtotals. Now my requirement to display the Grid with only subtotal lines. Means the grid should be displayed in collapsed mode by default.

Can any you help me finding this option.

Thanks.

Matt.

Hi Matt,

Whe you call the FM REUSE_ALV_GRID_DISPLAY, you have to fill the table it_sort.

In this table, you have to fill the field FIELDNAME with the field that you can show with susbstotals and fill the field EXPA with 'X'.

W_SORT-SPOS = 1.

W_SORT-FIELDNAME = 'CODIGO'.

W_SORT-SUBTOT = 'X'.

W_SORT-EXPA = 'X'.

APPEND W_SORT TO IT_SORT.

In the fieldcatalog there must be any with the field DO_SUM = 'X'

You can maka this directly in the list by creating a variant with susbtotals, colapse them and save as a default variant for all users.

Regards,

Pepe

Regards,

Pepe

5 REPLIES 5

Former Member
0 Kudos
459

HI Matt,

[Hierarchy Display of ALV in colapsed mode|]

hope it helps you.

Thanks

0 Kudos
459

Actually I need it in ALV Grid.

0 Kudos
459

Please check this and help me

one example

In MB51-> details button on first output screen ->

But dont know how it is mangged

plz help.

Matt.

Former Member
460

Hallo experts,

I am displaying a ALV grid with subtotals. Now my requirement to display the Grid with only subtotal lines. Means the grid should be displayed in collapsed mode by default.

Can any you help me finding this option.

Thanks.

Matt.

Hi Matt,

Whe you call the FM REUSE_ALV_GRID_DISPLAY, you have to fill the table it_sort.

In this table, you have to fill the field FIELDNAME with the field that you can show with susbstotals and fill the field EXPA with 'X'.

W_SORT-SPOS = 1.

W_SORT-FIELDNAME = 'CODIGO'.

W_SORT-SUBTOT = 'X'.

W_SORT-EXPA = 'X'.

APPEND W_SORT TO IT_SORT.

In the fieldcatalog there must be any with the field DO_SUM = 'X'

You can maka this directly in the list by creating a variant with susbtotals, colapse them and save as a default variant for all users.

Regards,

Pepe

Regards,

Pepe

ABAPER_P
Participant
0 Kudos
459

Hello,

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