Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

icon change

Former Member
0 Likes
411

Hello Gurus ,

hw to change the Icon of a button in run time (module pool program ) .

regards .

Joy .

Hello Gurus ,

hw to change the Icon of a button in run time (module pool program ) .

regards .

Joy .

1 REPLY 1
Read only

Former Member
0 Likes
360

Hello Joy,

You can use this simple code:

include <icon>.
data: wa_icon(8).

parameters: in.

start-of-selection.

case in.
  when 'A'.
    wa_icon = '@1A@'.
  when 'B'.
    wa_icon = '@1B'.
  when 'C'.
    wa_icon = ICON_MESSAGE_CRITICAL. "'@1D@'.
  when others.
    wa_icon = 'invalid'.
endcase.

write: / in, 'leads to', wa_icon.

Try it.

The include <icon> represents all available icons (in Netweaver: 1140!). This technique works also in Dialog programs and has to be implemented in PBO or PAI depending on how you want to use it.

Have success,

Heinz