Application Development 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: 

change icon on the pushbutton at runtime

Former Member
0 Kudos

Hi all,

I am new to ABAP.

I have one requirement in screen programming.

I need to change the icon on the pushbutton at runtime.

can somebody give me idea or any sample code.

thanks in advance.

Raju Naga.

1 REPLY 1

Former Member
0 Kudos

hi,

You will have to basically set your pf-status with the option EXCLUDING fcodes, where fcodes can be just one fcode of your pushbuttons on the menu, or it can be an internal table of several fcodes, if you are disabling them. This will disable them and to re-enable them you just have to set pf-status without the option EXCLUDING.

IF <mycondition>

SET PF-STATUS <mystatus> EXCLUDING 'ABCD'.

*-- or SET PF-STATUS <mystatus> EXCLUDING fcodes_itab ]

  • where fcodes_itab has more than one fcodes

ELSE.

SET PF-STATUS <mystatus>.

ENDIF.

____________________________________________________________________

In order to grey-out instead of removing altogether, you still need to do ....

SET PF-STATUS '0100' EXCLUDING....

Also you need to change a setting in the gui status.

Go into your gui status by double clicking on the status name, click Go To --> Attributes --> PushButton Assignment. You will get a dialog box, select the radiobutton for "Display All". Save and activate. Now instead of the buttons being removed, they will be greyed out.

Pls : useful award points.

Sri