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

lock column

Former Member
0 Likes
709

i want to create a ALV report in which i want to lock first column while horizontal scrolling...

1 ACCEPTED SOLUTION
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
674

Hi

Using ALV Variants functionality you can design the multiple layouts with required fields and hide the non-required fields for display.

You can design the multiple layouts using ALV variants concept.

May be that can solve your problem.

Regards,

kumar

5 REPLIES 5
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
675

Hi

Using ALV Variants functionality you can design the multiple layouts with required fields and hide the non-required fields for display.

You can design the multiple layouts using ALV variants concept.

May be that can solve your problem.

Regards,

kumar

Read only

0 Likes
674

are u talking abt field name 'KEY' or FIX_COLUMN in field catalog?

may be u can set this field for that particular column.

amit

Read only

Former Member
0 Likes
674

Hi,

U have to specify in te fieldcatalog <b>FIX_COLUMN = 'X'</b>

DATA: 	i_fieldcat TYPE slis_t_fieldcat_alv,
       wa_fieldcat TYPE slis_fieldcat_alv,
  report_id = sy-repid.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
            i_program_name         = report_id
            i_internal_tabname     = 'T_FINAL'
            i_inclname             = report_id
       CHANGING
            ct_fieldcat            = i_fieldcat
       EXCEPTIONS
            inconsistent_interface = 1
            program_error          = 2
            OTHERS                 = 3.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  LOOP AT i_fieldcat INTO wa_fieldcat.
    CASE wa_fieldcat-fieldname.
      WHEN 'NAME1'.
        wa_fieldcat-col_pos = 1.
        wa_fieldcat-fix_column = 'X'.
      WHEN OTHERS.
    ENDCASE.
    MODIFY i_fieldcat FROM wa_fieldcat.
  ENDLOOP.

Read only

Former Member
0 Likes
674

Hello Anju,

Make the FIELDCAT-KEY = 'X' for the first column of ur ALV.

Vasanth

Read only

Former Member
0 Likes
674

Hi,

U have to check key parameter for that field .

Regards,

Siddhi