In this ABAP tutorial, we will build a small ABAP report to display SAP icons list using ABAP icon code.
This ABAP program can be considered to supply the SAP icon list used in ABAP programs.



Display SAP Icon List using ABAP Code - ABAP Example Code 1

Here is an ABAP sample report with ABAP source code for ABAP developers displaying the all list of SAP icons.
This ABAP code is very simple. There is just a SELECT query on ABAP table Icon where the returned rows are stored in the internal table gt_icon.
Then I used the ABAP WRITE command and Write ID of the icon workarea gs_icon in order to print the ABAP icon picture on the ABAP screen.

REPORT ZSAPIconsList .

DATA :
  gs_icon TYPE ICON,
  gt_icon TYPE TABLE OF ICON.

SELECT * FROM icon INTO TABLE gt_icon.

LOOP AT gt_icon INTO gs_icon.

  WRITE :/
    gs_icon-name,
    33 '@',
    34 gs_icon-id+1(2),
    36 '@',
    40 gs_icon-id.

ENDLOOP.
The above SAP icon code is showing how easy it is go get the the SAP icons list.


Display SAP Icons List using ABAP Icon Code - ABAP Example Code 2

Here is an other ABAP code example for displaying list of SAP icons or ABAP icons.
This ABAP program ZSAPIconsList uses Icon type pool and uses field-symbols in order to write the sap icon list on screen.
Again within the ABAP icon code, we execute a SELECT query from SAP table icon and store the return set as an internal ABAP table gt_icon.
In this ABAP report, I used the ABAP WRITE syntax : WRITE 'sap-icon-name' AS ICON.

REPORT ZSAPIconsList .

TYPE-POOLS ICON.

DATA :
  gs_icon TYPE ICON,
  gt_icon TYPE TABLE OF ICON.

FIELD-SYMBOLS: <f>.

SELECT * FROM icon INTO TABLE gt_icon.

LOOP AT gt_icon INTO gs_icon.

  ASSIGN (gs_icon-name) TO <f>.
  WRITE :/
    gs_icon-name,
    <f> AS ICON.

ENDLOOP.

I hope you find useful these two ABAP programs and ABAP code in order to get ABAP icon list or SAP icon list.



Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Team Lead
Contact : serkurumsal@yandex.com