SAP Function Modules

ICON_SHOW SAP Function module







ICON_SHOW is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ICON_SHOW into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: ICON
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ICON_SHOW - ICON SHOW





CALL FUNCTION 'ICON_SHOW' "
* EXPORTING
*   onlydisplay = SPACE         "               Space if selection not required
*   language = SPACE            " sy-langu      Language of Quickinfo
*   button = 'X'                " icon-button   Icons for print keys
*   status = 'X'                " icon-status   Icons for status display
*   message = 'X'               " icon-message  Icons for sending messages
*   function = 'X'              " icon-function  Icons for function keys
*   textfield = 'X'             " icon-textfield  Icons in text
*   locked = 'X'                " icon-locked   Icons locked
*   icon_name = 'ICON_*'        " icon-name     Long name of icon (also generic)
  IMPORTING
    icon_id =                   " icon-id       Internal display of selected icon
    icon_text =                 " icont-quickinfo  Quickinfo for selected icon
    icon_size =                 " icon-oleng    Width of icon
    icon_name =                 " icon-name     Long name of icon (also generic)
    icon_class =                " icon-internal  Flags (stat,button,msg,fctn,txtfield,locked)
  EXCEPTIONS
    NO_ICON_SELECTED = 1        "               Icon of selected class not found
    NO_OBJECT_FOUND = 2         "               No icons available, Table ICON is empty
    .  "  ICON_SHOW

ABAP code example for Function Module ICON_SHOW





The ABAP code below is a full code listing to execute function module ICON_SHOW including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_icon_id  TYPE ICON-ID ,
ld_icon_text  TYPE ICONT-QUICKINFO ,
ld_icon_size  TYPE ICON-OLENG ,
ld_icon_name  TYPE ICON-NAME ,
ld_icon_class  TYPE ICON-INTERNAL .

DATA(ld_onlydisplay) = 'some text here'.
DATA(ld_language) = 'Check type of data required'.

SELECT single BUTTON
FROM ICON
INTO @DATA(ld_button).


SELECT single STATUS
FROM ICON
INTO @DATA(ld_status).


SELECT single MESSAGE
FROM ICON
INTO @DATA(ld_message).


SELECT single FUNCTION
FROM ICON
INTO @DATA(ld_function).


SELECT single TEXTFIELD
FROM ICON
INTO @DATA(ld_textfield).


SELECT single LOCKED
FROM ICON
INTO @DATA(ld_locked).


SELECT single NAME
FROM ICON
INTO @DATA(ld_icon_name).
. CALL FUNCTION 'ICON_SHOW' * EXPORTING * onlydisplay = ld_onlydisplay * language = ld_language * button = ld_button * status = ld_status * message = ld_message * function = ld_function * textfield = ld_textfield * locked = ld_locked * icon_name = ld_icon_name IMPORTING icon_id = ld_icon_id icon_text = ld_icon_text icon_size = ld_icon_size icon_name = ld_icon_name icon_class = ld_icon_class EXCEPTIONS NO_ICON_SELECTED = 1 NO_OBJECT_FOUND = 2 . " ICON_SHOW
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_icon_id  TYPE ICON-ID ,
ld_onlydisplay  TYPE STRING ,
ld_icon_text  TYPE ICONT-QUICKINFO ,
ld_language  TYPE SY-LANGU ,
ld_icon_size  TYPE ICON-OLENG ,
ld_button  TYPE ICON-BUTTON ,
ld_icon_name  TYPE ICON-NAME ,
ld_status  TYPE ICON-STATUS ,
ld_icon_class  TYPE ICON-INTERNAL ,
ld_message  TYPE ICON-MESSAGE ,
ld_function  TYPE ICON-FUNCTION ,
ld_textfield  TYPE ICON-TEXTFIELD ,
ld_locked  TYPE ICON-LOCKED ,
ld_icon_name  TYPE ICON-NAME .

ld_onlydisplay = 'some text here'.
ld_language = 'Check type of data required'.

SELECT single BUTTON
FROM ICON
INTO ld_button.


SELECT single STATUS
FROM ICON
INTO ld_status.


SELECT single MESSAGE
FROM ICON
INTO ld_message.


SELECT single FUNCTION
FROM ICON
INTO ld_function.


SELECT single TEXTFIELD
FROM ICON
INTO ld_textfield.


SELECT single LOCKED
FROM ICON
INTO ld_locked.


SELECT single NAME
FROM ICON
INTO ld_icon_name.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ICON_SHOW or its description.