Code: Alles auswählen.
INCLUDE: SBAL_CONSTANTS.
* problem class
constants:
probclass_very_high type bal_s_msg-probclass value '1',
probclass_high type bal_s_msg-probclass value '2',
probclass_medium type bal_s_msg-probclass value '3',
probclass_low type bal_s_msg-probclass value '4',
probclass_none type bal_s_msg-probclass value ' '.
* message types
constants:
msgty_x type sy-msgty value 'X',
msgty_a type sy-msgty value 'A',
msgty_e type sy-msgty value 'E',
msgty_w type sy-msgty value 'W',
msgty_i type sy-msgty value 'I',
msgty_s type sy-msgty value 'S',
msgty_none type sy-msgty value ' '.
HIer BEISPIELHAFT wie man umsetzen kann:
when me->mc_msgty_x or me->mc_msgty_a or me->mc_msgty_e.
ls_msg-probclass = me->mc_probclass_very_high.
set_status( icon_red_light ).
when me->mc_msgty_w.
ls_msg-probclass = me->mc_probclass_high.
set_status( icon_yellow_light ).
when others.
ls_msg-probclass = me->mc_probclass_none.
set_status( icon_green_light ).
endcase.