Skip to Content

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

OO ALV key fields not colored, why

Hello all,

I have 3 key fields that are not highlighted. They are locked in place when scrolling occurs, so they are recognized as key fields. I thought that key fields were highlighted by default. Can anyone see why the following portion of code doesn't produce highlighted key fields/

Thanks

Bruce

call function 'LVC_FIELDCATALOG_MERGE'

exporting

i_bypassing_buffer = 'X'

i_structure_name = 'ZALV_ZFAPO039'

changing

ct_fieldcat = pt_fieldcat.

*******************************************

loop at pt_fieldcat into ls_fcat.

*

if ls_fcat-fieldname = 'LIFNR' or

ls_fcat-fieldname = 'PAYEE' or

ls_fcat-fieldname = 'WRBTR'.

ls_fcat-key = 'X'. " set ALV key field

ls_fcat-emphasize = 'X'. " highlight column

endif.

modify pt_fieldcat from ls_fcat.

*

Endloop.

********************************************

  • Set layout options:

ps_layout-zebra = 'X'.

*

call method g_grid->set_table_for_first_display

exporting

i_bypassing_buffer = 'X'

is_layout = ps_layout

it_toolbar_excluding = lt_exclude

changing

it_fieldcatalog = pt_fieldcat

it_outtab = pt_outtab.

*********************************************

  • set editable cells to ready for input

call method g_grid->set_ready_for_input

exporting

i_ready_for_input = 1.

Former Member

Helpful Answer

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