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

Expand/Collapse functionality in ALV grid

Former Member
0 Likes
3,226

Hi Experts,

I have requirement to display a report output in ALV grid. The output has around 10 columns and of which 3rd column is delivery number. For certain scenarios there can exists multiple delivery so in order to have multiple delivery in want to implement expand/collapse functionality similar to ME2ON transaction.

Please provide some sample code in order to achieve expand/collapse logic in ALV grid.

Regards,

Akanksha.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,201

Hello Aks,

After seeing the ME2ON transaction, what i can suggest you is following:

--> Display a column in your Grid with the hotspot on it

--> You can give the icon as a value in the column

--> Then for the hotspot click you need to display the expanded data i.e. regenerate the grid.

My suggestion to you would be that if you dont need to edit anything in the grid i.e. dont want have any editable field on the grid, then you should opt for an ALV tree using class CL_GUI_ALV_TREE. The expand collapse functionality is already there and you will be saved from a lot of coding.

Hope this helps.

Regards,

Himanshu

1 REPLY 1
Read only

Former Member
0 Likes
1,202

Hello Aks,

After seeing the ME2ON transaction, what i can suggest you is following:

--> Display a column in your Grid with the hotspot on it

--> You can give the icon as a value in the column

--> Then for the hotspot click you need to display the expanded data i.e. regenerate the grid.

My suggestion to you would be that if you dont need to edit anything in the grid i.e. dont want have any editable field on the grid, then you should opt for an ALV tree using class CL_GUI_ALV_TREE. The expand collapse functionality is already there and you will be saved from a lot of coding.

Hope this helps.

Regards,

Himanshu