2020 Jul 22 12:27 PM
Hi guys,
i make 16 pushbuttons in screen painter. In PBO i need to set their icon as icon_cancel, but when i tried to use icon_create i can't set icon to pushbutton. Please help.
2020 Jul 22 12:55 PM
Is there a reason why you want to do it at runtime? Don't you want to define it statically inside the screen painter?
2020 Jul 22 12:58 PM
Example for dynamic definition, it returns @0V\Qwhatever you want@ hello
DATA l_icon TYPE string.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = 'ICON_OKAY' "icon left-aligned in button
TEXT = 'hello' "text right-aligned in button
INFO = 'whatever you want' "tooltip
IMPORTING
RESULT = l_icon
EXCEPTIONS
OTHERS = 3.