Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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'

exporting

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

tables

t_outtab = alv_fields

exceptions

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.

endif.

Thanx in advance.

Regards,

Giri.

Former Member
Not what you were looking for? View more on this topic or Ask a question