Hi,
in a screen of my program i have a pushbutton, and i would like to change dynamically the text and icon of it.
Actually, the name of my pushbutton is BTN_VALID, in the PBO i do this :
CONCATENATE c_icon_invalid text-035 INTO btn_valid SEPARATED BY space.
It's not work 😔
Thanks for your help.
The important thing you must do is you must mark the check output only in the screen attributes.
Check this demonstration by Rich
Use FM ICON_CREATE
DATA g_button_str TYPE icons-text. CALL FUNCTION 'ICON_CREATE' EXPORTING name = 'ICON_DISPLAY_MORE' text = 'some_text' info = 'some_text' IMPORTING RESULT = g_button_str. "now assign to button PA_BUTT pa_butt = g_button_str.
Regards
Marcin
Hi,
Have you set the Output field attribute for a pushbutton in screen painter ? If it is set then your code of dynamically changing the text should work please check this.
And for icons you can give the icon code in the text.
Reagrds,
Pawan
Add a comment