Ex:
METHOD status_icon_wms.
CASE i_status.
WHEN gc_stwms_aguardando.
r_icon = me->create_icon_cust( i_name = icon_yellow_light
i_info = me->mt_stwms_dom[ domvalue_l = i_status ]-ddtext ).
WHEN gc_stwms_finalizado.
r_icon = me->create_icon_cust( i_name = icon_green_light
i_info = me->mt_stwms_dom[ domvalue_l = i_status ]-ddtext ).
WHEN gc_stwms_erro OR gc_stwms_erro_sap.
r_icon = me->create_icon_cust( i_name = icon_red_light
i_info = me->mt_stwms_dom[ domvalue_l = i_status ]-ddtext ).
WHEN OTHERS.
r_icon = me->create_icon_cust( i_name = icon_light_out
i_info = me->mt_stwms_dom[ domvalue_l = i_status ]-ddtext ).
ENDCASE.
ENDMETHOD.
METHOD create_icon_cust.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = i_name
info = i_info
IMPORTING
result = r_result
EXCEPTIONS
icon_not_found = 1
outputfield_too_short = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDMETHOD.
Nenhum comentário:
Postar um comentário