How to Add a Graphic Element to an Infotype Overview Screen?
Explanation of the Question
There is a custom personnel administration infotype with a number of subtypes.
See note: Creating a PA Infotype
To improve the user experience when working with this infotype, a business user requested to add some kind of graphic element to the infotype overview screen. The graphic element should correspond to the subtype of the infotype.
Solution
If we are talking about the overview screen, this refers to screen 3000.
See List Screen
Definition:
An infotype screen that displays all data records for a personnel number in a list.
Use:
Screen 3000 is typically used as the list screen. However, you can choose to use another screen as the list screen. Screen 3000 of module poolMPMMMM00
is used as a template.
You can create your own list screens for infotypes included in the SAP standard system. Customer-specific list screens are assigned to the namespace3900
to3999
.
By "graphic element" here we mean icons (viewable in transaction ICON
), not actual images. Due to the technical limitations of the infotype framework in SAP, images cannot be used on the overview screen.
See note: Oh, the Wonderful Icons We Have
Add a new element to screen 3000 of your infotype’s module pool by launching transaction SE51
.
In the main module pool of your infotype, open the include marked with the comment Output Modules
.
See: Infotype Module Pool
Add the following code:
DATA: gv_subty_icon TYPE icon_d.
CASE p9904-subty.
WHEN '9001'.
gv_subty_icon = icon_positive.
WHEN '9002'.
gv_subty_icon = icon_negative.
WHEN '9003'.
gv_subty_icon = icon_failure.
ENDCASE.
Activate the changes and check the result in transactions PA20
/PA30
.