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: 

How to Fix columns while using changing layout option in ALV Grid?

Former Member
0 Kudos

Hi,

I am using cl_gui_alv_grid class for displaying ALV Grid. My requirement is to fix the first 4 columns i.e. user should not be able to re-arrange the columns sequence, when change layout function is pressed.

Though I am passing the following values to field catalog, columns are not getting fixed. Only while horizontal scrolling the columns are fixed.

KEY = 'X'.

FIX_COLUMN = 'X'

Could you please let me know, if I have to fill any other fields in fieldcatalog ?

Thanks,

Savitha

4 REPLIES 4

Former Member
0 Kudos

Have you tried to use SET_COL_WIDTH method?

Former Member
0 Kudos

Hi,

I don't think this requirement can be acheived by changing the code.

You can try by giving the authorization to the users who actually need to change the layout, remove the authorization to change the layout from other users.

Regards,

harish

0 Kudos

Hi,

I have to restrict only the first 4 fields, not all the fields. So authorization disables all the fields, not the correct solution.

0 Kudos

Hi,

If that is the case, then I don't think there is a feasible solution for this requirement.

Regards,

Harish