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
2,012

Hi Experts,

I have this requirement:

E.g.

Initial status of button is : ICON_MULTIPLE_DISPLAY

After processing some events it should change to ICON_MULTIPLE_INPUT.

Most Importantly, I need to change the image of the ICON, after some processing.

Can anyone please help me out ? Elaborate Answers will be ignored:)

Thanks

Chandan

Edited by: Rob Burbank on May 27, 2009 10:28 AM

Hi Experts,

I have this requirement:

E.g.

Initial status of button is : ICON_MULTIPLE_DISPLAY

After processing some events it should change to ICON_MULTIPLE_INPUT.

Most Importantly, I need to change the image of the ICON, after some processing.

Can anyone please help me out ? Elaborate Answers will be ignored:)

Thanks

Chandan

Edited by: Rob Burbank on May 27, 2009 10:28 AM

4 REPLIES 4
Read only

Former Member
0 Likes
1,440

Hi,

As per your requirement it is not clear with the words " After processing some events ". But you can achieve the same with the below logic.

Define a global variable - a flag in the top include of the Dynpro. You will use this flag to set and reset the value.

Then define two GUI Status. One with the Initial status of button is : ICON_MULTIPLE_DISPLAY and one with the ICON_MULTIPLE_INPUT.

Now based on you user action you will set the value of the global flag. When the screen will reload again, then based on value of the global flag you will set the PF Status.

Have a look at the code below.

LOOP AT SCREEN.

IF g_flag = 'X'.

SET PF-STATUS 'ZGUI_01'.

clear g_flag.

else.

SET PF-STATUS 'ZGUI_02'.

clear g_flag.

endif.

Hope this helps.

Thanks,

Samantak.

Read only

Former Member
0 Likes
1,440

You should use Call Function ICON_CREATE to create icons images (say l_icon1 and l_icon2) for whichever condition you want..

Secondly based on ur condition change the icon by simply assignin the button a new icon l_icon2 in your ALV..

if a > b then gt_alv-button = l_icon2 else gt_alv-button = l_icon1.

Refresh the table and set the new table to be displayed in your ALV

Hope this helps

Regards,

Kanchan Patil

Read only

Former Member
0 Likes
1,440

First of all define your push button as output field with icon tick in the pushbutton characteristick,

then define this pushbutton in top_include



include <icon>.
data : push_button like icons-l4.

during pbo you can directly assign name of icon .


loop at screen.
 if condition1 .
 push_button =  ICON_MULTIPLE_DISPLAY.
elseid condition2.
 push_button = ICON_MULTIPLE_INPUT.
endif.
modify screen.
endloop.

regards,

Alpesh

Read only

Former Member
0 Likes
1,440

solved