cancel
Showing results for 
Search instead for 
Did you mean: 

alv field size

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.