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: 

Freeze panes in ALV Grid Display

Former Member
0 Kudos

Hi All,

I am displaying the output of a report as an ALV Grid. The number of columns is exceeding the space on the screen and thus i need to scroll to see all columns.

Is there a way that we can freeze panes (columns) like in excel, such that when we scroll, one or more columns remain locked in their position. Columns like Sr No or ID are at times required to be visible at all times .

Any insights in this regard would definitely be appreciated.

Thanks in advance

Maninder

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

As per the above reply, if u want to freeze columns just use

<b>FIX_COLUMN = 'X'</b>

in fieldcatalog for the corresponding fields.

Hope this helps. Kindly reward points and close the thread.

6 REPLIES 6

Former Member
0 Kudos

Hi, you can try as following:


G_FIELDCAT TYPE LVC_S_FCAT.
<b>G_FIELDCAT-KEY = X.</b>
APPEND G_FIELDCAT1 TO G_FIELD.

    CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING I_STRUCTURE_NAME = 'xxxx'
      CHANGING  IT_OUTTAB        = GI_TAB
                IT_FIELDCATALOG  = G_FIELD.

if a field is key, it will be freeze pannes.

Hope it will be helpful.

Thanks.

Former Member
0 Kudos

Hi Maninder,

You can set 'FIX_COLUMN' to 'X' in the fieldcat for the column where the freeze pane should work.

P.S: If this answer was helpful, remember 2 reward points accordingly.

Rgds,

Prabhu.

Former Member
0 Kudos

Hi Maninder,

Only the key fields will be frozen automatically. But just for the sake of freezing you need not set the fieldcatlog for those fields as KEY = 'X' but rather you can use the other option in the fieldcatlog FIX_COLUMN = 'X' for those columns. This would freeze the columns.

Cheers,

Sam

Former Member
0 Kudos

Hi,

As per the above reply, if u want to freeze columns just use

<b>FIX_COLUMN = 'X'</b>

in fieldcatalog for the corresponding fields.

Hope this helps. Kindly reward points and close the thread.

Former Member
0 Kudos

Hi Everyone

thanks for ur inputs. They were very helpful and i was able to solve the problem.

Regards

Maninder

0 Kudos

If u have solved ur problem kindly close the thread and reward full points to those who helped to solve ur problem.

Or if u solved by urself click on SOlved by my own.

So that the thread will be marked as solved problem(Blue Star)