Wonder how to put icon in custom pop up.
1) Select your favorite icon by running RTSXINFO
2) Insert status icon element at your module pool layout
3) Declare the parameter ID . Use this paramete name at you PARAMETER ID at status icon element.
DATA: ICN_WARNING TYPE ICONS-TEXT.
4) AT PBO set you status icon image using function ICON_CREATE , below is the e.g
MODULE SET_ICON OUTPUT.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = 'ICON_MESSAGE_WARNING'
* TEXT = ' '
* INFO = ' '
* ADD_STDINF = 'X'
IMPORTING
RESULT = ICN_WARNING
* EXCEPTIONS
* ICON_NOT_FOUND = 1
* OUTPUTFIELD_TOO_SHORT = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = 'ICON_MESSAGE_WARNING'
* TEXT = ' '
* INFO = ' '
* ADD_STDINF = 'X'
IMPORTING
RESULT = ICN_WARNING
* EXCEPTIONS
* ICON_NOT_FOUND = 1
* OUTPUTFIELD_TOO_SHORT = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE.
5) END
No comments:
Post a Comment