This is a test message to test the length of the message box.
Login
|
ABAP Quick Icons
Created by Software-Heroes

ABAP Quick - Icons

4609

Find icons in SAP and use them correctly? Here is a small guide on how to use the images for different purposes.

Advertising


Today's article is all about icons and we want to show you where to find them, how to use them and how to use them best. How lifeless would an application that only consist of text look like?

 

Database table ICON

In the ICON table there are almost 1200 different icons, which you can also find anywhere in the system. If you are looking for a specific icon, you can usually do this quickly by name. If you are looking for the traffic lights, you can search for * LIGHT * or if there are only individual statuses, then for * LED *.

 

Hint: If you copy the ID field in the SE16/SE16N and the ALV display is active, you will also get the technical value of the icon. This technical value is always the same, consists of 4 characters, the first and last always being an @. This way you can recognize icon IDs in the system very quickly. For example @5C@ stands for a red LED or @0V@ for a green check.

 

Transaction ICON

With the transaction you can change the icons and texts and also search for them. The transaction is primarily used to maintain texts and to set the settings. Unfortunately there is no way to get the technical ID here.

 

Type group ICON

At this point, the technical IDs are linked to constants that are globally available in the system, as we explained in another article. For ease of use, we recommend using the constants as they are more readable in the source code.

 

Function module ICON_CREATE

There will be cases where you will show a status with an icon in an ALV, which gives the user too little information or may not be clear. In such cases, you can still create a text that appears when you move the mouse over the icon.


DATA:
  ld_icon TYPE tv_image.

CALL FUNCTION 'ICON_CREATE'
  EXPORTING
    name                  = icon_failure
    info                  = 'Something went wrong ...'
  IMPORTING
    result                = ld_icon
  EXCEPTIONS
    icon_not_found        = 1
    outputfield_too_short = 2
    OTHERS                = 3.
IF sy-subrc <> 0.
ENDIF.

 

As a result, you get the icon back, but at the same time you have the integrated function of the popup when you move your mouse over it. Here in the example of the code shown above in the debugger.

 

Hint: A CHAR 4 data type is normally sufficient for the display of an icon, but if you still want text, you should use a longer type, such as the data element TV_IMAGE.

 

Conclusion

The search and use of icons in SAP should now be less of a problem for you and should be a bit more colorful and lively for the next projects. You can also use the icons for your next program documentation, where they work like in an ALV.


Included topics:
QuickIconsICON_CREATE
Comments (0)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Tuesday and Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


DDIC of the Future (Comparison)

Category - ABAP

What does the future hold for the DDIC, and can we already use the new features today? In this article, we compare the world of today with that of tomorrow and show you where to find all the features.

07/03/2026

DDIC of the Future (Tomorrow)

Category - ABAP

What does the future hold for the DDIC, and can we already use its new features today? In this article, we'll take a look at tomorrow and how CDS artifacts can help us with modeling.

06/30/2026

DDIC of the Future (Today)

Category - ABAP

What does the future hold for the DDIC, and can we already use the new features today? In this article, we'll look at the current state of the dictionary in ABAP.

06/26/2026

ABAP Tools - VS Code (Quick Start)

Category - ABAP

The ABAP Development Tools for VS Code are now available, and in this short guide we'll look at everything you need to get started.

05/30/2026

ABAP Tools - Working with Eclipse (Classes)

Category - ABAP

In this article, we'd like to discuss working with classes and how you can extend them cleanly and easily in Eclipse. We'll also look at further options available in the ABAP Development Tools.

04/21/2026