Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2801

Re: displaying traffic lights in alv grid report?

$
0
0

Don't use is_layout when call FM  REUSE_ALV_GRID_DISPLAY.

Just set the value that you want to display as traffic light to constant ICON_RED_LIGHT (or green or yellow), which is of char4.

In this way, the header 'Exception' is not shown. Instead, the column name itself is shown.


TYPES: BEGIN OF ty_message,

          icon        TYPE char4,

          message TYPE string,

END OF ty_message.


    ls_message-icon= ICON_RED_LIGHT" red Traffic Light

     APPEND ls_message TO lt_message

 

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

   EXPORTING

     i_callback_program            = sy-repid

*    is_layout                          = ls_layout

     i_callback_user_command  = 'USER_COMMAND'

     it_fieldcat                           = lt_fieldcat

   TABLES

     t_outtab                             = lt_message

   EXCEPTIONS

     program_error                     = 1

     OTHERS                            = 2.


Viewing all articles
Browse latest Browse all 2801

Trending Articles