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: 

ALV Questions

Former Member
0 Kudos

How to make some fields as Primary key in ALV,so that when we scroll the ALV report,those fields will not be hidden.Points will no doubtedly awarded.

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello

Set the following attributes in the fieldcatalog:

- LVC_S_FCAT-KEY = 'X'.              " key field
- LVC_S_FCAT-FIX_COLUMN = 'X'  " fix column, not hidden when user scrolls list to the right

Regards

Uwe

4 REPLIES 4

Former Member
0 Kudos

Hi,

one thing you can do is when the out put is displayed the select the coulman which you want and right click onit and select freeze the column or else in the coding use fix_column in the fieldcatlog to the column which you want

uwe_schieferstein
Active Contributor
0 Kudos

Hello

Set the following attributes in the fieldcatalog:

- LVC_S_FCAT-KEY = 'X'.              " key field
- LVC_S_FCAT-FIX_COLUMN = 'X'  " fix column, not hidden when user scrolls list to the right

Regards

Uwe

Former Member
0 Kudos

Hi,

If you are using FM ALV then add this field to your fieldcatalog.

<fieldcatalog name>-KEY = 'X'.

Note that the field which you are going to make as key field should always be in left hand side after the primary key.

If you are using OOP ALV then use this,

LVC_S_FCAT-KEY = 'X'. " key field

- LVC_S_FCAT-FIX_COLUMN = 'X' " fix column, not hidden when

Reward points,if useful.

Regards,

Sathish.

venkat_o
Active Contributor
0 Kudos

Hi ajaya moharana, While building fieldcatalog internal table, u can make internal table fields as key fields and fix them when u scroll from left to right when list is wider.


w_fieldcat-fieldname  = 'BUKRS'.
w_fieldcat-tabname    = 'I_T001'.
w_fieldcat-seltext_m  = 'Company Code'.
w_fieldcat-key        = 'X'. "column with key-color
w_fieldcat-fix_column = 'X'."Column is fixed when output is scrolled
I hope that it helps u . Regards, Venkat.O