REPORT ALV_LIGHTS.
COMTYPES: BEGIN OF ty_alv,
lights(1) TYPE c, "Exception, Holding the value of the lights
text(20) TYPE c, "some text
END OF ty_alv.
DATA: gs_alv TYPE ty_alv,
gt_alv TYPE TABLE OF ty_alv,
gr_alv TYPE REF TO cl_salv_table,
gr_columns TYPE REF TO cl_salv_columns_table.
START-OF-SELECTION.
gs_alv-lights = '1'. "Color red
gs_alv-text = 'RED SIGNAL'.
APPEND gs_alv TO gt_alv.
gs_alv-lights = '2'. "Color yellow
gs_alv-text = 'YELLOW SIGNAL'.
APPEND gs_alv TO gt_alv.
gs_alv-lights = '3'. "Color green
gs_alv-text = 'GREEN SIGNAL'.
APPEND gs_alv TO gt_alv.
CALL METHOD cl_salv_table=>factory
IMPORTING r_salv_table = gr_alv
CHANGING t_table = gt_alv.
gr_columns = gr_alv->get_columns( ).
gr_columns->set_exception_column( value = 'LIGHTS' ).
CALL METHOD gr_alv->display.
Related Topic:
- ALV with Traffic Signals using classes.
- Traffic Light In An ALV Report Program.
- Display ALV Report In Different Language.
- ALV Pop Up To Select The Options & Display Them.
- Example On Blocking ALV List/Grid Display.
- Change The Layout Of The ALV List/Grid Display.
..... Back To Index On ALV List/ Grid Display.
..... Back To MAIN INDEX.
No comments:
Post a Comment