Application Development 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: 

EMPHASIZE not coloring the column of ALV

Yasin
Active Participant
0 Kudos

Hi,

am using EMPHASIZE to change the color of MATNR Column in my program
but it is not reflecting. Please advise

  WA_FIELDCAT-FIELDNAME = 'MATNR'.
  WA_FIELDCAT-SCRTEXT_M = 'Material Code'.
  WA_FIELDCAT-COL_POS = 0.
  WA_FIELDCAT-OUTPUTLEN = 10.
  WA_FIELDCAT-KEY = 'X'.
  WA_FIELDCAT-COL_OPT = 'X'.
  "WA_FIELDCAT-LZERO = 'X'.
  WA_FIELDCAT-NO_ZERO = 'X'.
  WA_FIELDCAT-EMPHASIZE = 'C410'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.

Regards

1 ACCEPTED SOLUTION

DoanManhQuynh
Active Contributor
0 Kudos

you define it as KEY then that column should have the same background color as emphasize = 'C410'. can you try other color or emphasize other column? it maybe relate to ALV buffer, you could try to reset it with program BALVBUFDEL too.

3 REPLIES 3

DoanManhQuynh
Active Contributor
0 Kudos

you define it as KEY then that column should have the same background color as emphasize = 'C410'. can you try other color or emphasize other column? it maybe relate to ALV buffer, you could try to reset it with program BALVBUFDEL too.

0 Kudos

I would rather say that KEY='X' is the problem.

Abinathsiva
Active Contributor
0 Kudos

hi,

try with providing color info at alv_layout. refer below code:

{.....
  wa_ekpo-color = 'C610'.
append to internal table..
....
}

 CLEAR alv_layout.

  alv_layout-no_input  = 'X'.

  alv_layout-colwidth_optimize = 'X'.

  alv_layout-zebra = 'X'.


build layout:


  alv_layout-no_input          = 'X'.

  alv_layout-colwidth_optimize = 'X'.

  alv_layout-totals_text       = 'Totals'(201).

* Set layout field for row attributes(i.e. color)

  alv_layout-info_fieldname =      'COLOR'.