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 Grid - fixed columns

Former Member
0 Likes
2,315

Hi,

I'm using ALV Grid to display some data. As the grid has a certain kind of calendar functionality I do not want the user to change the positions of the columns of the grid. The columns should stay in there initial fix position.

I tried setting field FIX_COLUMN of the field catalog but this doesn't work. Also setting the colomns as key columns does not fix the columns.

Does anybody has a solution for this issue?

Thanks. Peter

Hi,

I'm using ALV Grid to display some data. As the grid has a certain kind of calendar functionality I do not want the user to change the positions of the columns of the grid. The columns should stay in there initial fix position.

I tried setting field FIX_COLUMN of the field catalog but this doesn't work. Also setting the colomns as key columns does not fix the columns.

Does anybody has a solution for this issue?

Thanks. Peter

3 REPLIES 3
Read only

tolga_polat
Active Participant
0 Likes
941

Hi

in your structure or internal table,

move fixed column to beginning. like.

data : begin of lt_table occurs 0,

          fixed1 type c,

           fixed2 type c,

          value1 type i,

          etc...

         end of lt_table.

Regard

Read only

Former Member
0 Likes
941

Hi Peter,

Are using using an OO ALV grid?

If so then what you suggest should have worked i.e.

Setting the fieldcatalog value of KEY to 'X'.

e.g.

  LOOP AT p_fieldcat ASSIGNING <lfs_fieldcat>.

    CASE <lfs_fieldcat>-fieldname.

      WHEN 'MATNR'.

        <lfs_fieldcat>-hotspot  = c_x.

       <lfs_fieldcat>-key      = 'X'.

Read only

Former Member
0 Likes
941

Hi Peter,

The only way I am aware of is to hide the colum headers by using NO_HEADERS of the layout structure. This will make the heading hidden but if you want a heading you can have it filled in your first row if possible.

Regards,

Karthik