Skip to Content
avatar image
Former Member

alv field size

Hi all

Please help me to solve this problem.I want to display the size of the coloumn heading eqaul to the data element size in alv.I am using below code at this moment.Explain to me step by step to solve this problem.

layout-box_tabname = 'ALV_FIELDS'.

eventcat_ln-name = 'TOP_OF_PAGE'.

eventcat_ln-form = 'TOP_OF_PAGE'.

append eventcat_ln to eventcat.

call function 'REUSE_ALV_GRID_DISPLAY'


i_callback_program = sy-cprog

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'USER_COMMAND '

i_structure_name = 'FIELDCAT'

is_layout = layout

it_fieldcat = fieldcat

i_default = 'A'

i_save = 'A'

is_variant = dvariant

it_events = eventcat


t_outtab = alv_fields


program_error = 1

others = 2.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.


Thanx in advance.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Nov 20, 2006 at 08:39 AM

    while appending header fields to ALV, there is a field (length) wherein U can specify the length and it will be displayed accordingly. So, u can set the data element size to this field and use it.

    Add comment
    10|10000 characters needed characters exceeded