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

Former Member
0 Likes
447

hi,

in ALV GRID display output, i need two fields to be fixed and other fields to be scrolled. i got it after getting the output. but is it possible to hard code logic. plz reply.

thanks in advance

bramara k

hi,

in ALV GRID display output, i need two fields to be fixed and other fields to be scrolled. i got it after getting the output. but is it possible to hard code logic. plz reply.

thanks in advance

bramara k

3 REPLIES 3
Read only

sharat_chandra
Product and Topic Expert
Product and Topic Expert
0 Likes
425

Hi,

Please make the those two fields as "Key fields". This can be done by the following

ls_fieldcat-key = 'X'.

Where ls_fieldcat is of type lvs_s_fcat.

Doing this would enable the field to be fixed & the scroll bar would be enabled from the next field onwards.

Regards,

Sharat

Edited by: Sharat Chandra on Dec 27, 2007 9:10 AM

Read only

Former Member
0 Likes
425

hi brahma,

first i want to know if you are generating the report from a Z table or an internal table.

if you are directly passing the zee table without the field catalog, you can make the two fields as primary fields.

if you are building fieldcatalog, try to change the field KEY of the field catalog table to X.

try the following code

-


loop at t_fieldcat.

if t_fieldcat-fieldname eq 'F1' or t_fieldcat-fieldname eq 'F2'.

t_fieldcat-key = 'X'.

modify t_fieldcat.

endif.

endloop.

here, t_fieldcat is the field catalog table,

F1 and F2 are the two fields which you wanted to be fixed.

-


hope this solves your problem...

Ramu

Read only

Former Member
0 Likes
425

you can maintain those fields , while preparing a cat log.

W_FIELDCAT-SELTEXT_L = 'MATERIAL-NO'.

W_FIELDCAT-DATATYPE = 'CHAR'.

W_FIELDCAT-OUTPUTLEN = 18.

W_FIELDCAT-FIELDNAME = 'MATNR'.

W_FIELDCAT-KEY = 'X'.

W_FIELDCAT-HOTSPOT = 'X'.

APPEND W_FIELDCAT TO I_FIELDCAT.

CLEAR W_FIELDCAT.

so that those fields become key fields, they r not scrolloble.

reward i fuseful

rgds

umakanth