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: 

enable or disable function key on application toolbar

former_member397321
Participant
0 Kudos

Hi panel, wish this message finds you in good health,

Expert, there are some links which I have searched about  this issue:

http://scn.sap.com/thread/1480331

http://soundofabap.blogspot.com/2015/01/enable-or-disable-hide-function-keys-on_17.html

http://scn.sap.com/message/1179580#1179580

https://scn.sap.com/thread/1071303

but the problem is not yet solved.

I have an interface INS or GUI status, in MP900200 standard program, where icons- EPRV (ICON_PREVIOUS_OBJECT) and ENXT (ICON_NEXT_OBJECT)  are created visible but disabled, I would like to see them visible and enable, as well as to add some code below them. All of icons are Display all value in  Displaying Inactive Function option. I'm using this GUI status in Z transaction.

could you tell me how can I do that?

Kind regars

6 REPLIES 6

Sandra_Rossi
Active Contributor
0 Kudos

I guess you want to do a modification of the standard. If you're sure of what you're doing, okay.

There are three ways to disable a function code:

  1. either at runtime via SET PF-STATUS ... EXCLUDING itab (where the function code is passed via the itab internal table),
  2. or statically in the GUI status by setting the cursor at the function code and pressing the button "[activate/deactivate] function code" in the toolbar (moreover there is a green/yellow/red icon at the right of the "application toolbar" text, which allows displaying the inactive buttons),
  3. or statically via screen variant.

To enable it, just do the reverse operation.

raymond_giuseppi
Active Contributor
0 Kudos

Perform some debug, start with form DYNAMIC_PFSTATUS of include FP50MF20 (SAPFP50M).

Regards,

Raymond

former_member397321
Participant
0 Kudos

Thank you panel,

Yes  Raymond I have just find the line where that icon are "excluded":

Include FP50MF20 , form SET_PFSTATUS, below is the code:


FORM SET_PFSTATUS USING VALUE(PF_STATUS) LIKE SY-PFKEY.

   SET PF-STATUS PF_STATUS EXCLUDING FUNEXCL.

ENDFORM.


and the icons,EPRV and ENXT which I would like to enable are in the itab FUNEXCL referenced in SET PF-STATUS......since it is a standard code, what should I do....



kind regards.


elina

0 Kudos

Go back to PM01, some parameters are to be changed to allow those functions?

Cordialement,

Raymond

former_member397321
Participant
0 Kudos

hi panel,

Thank you Raymond

I will go forward by your suggestion, I wish this solution won't cause an error in many HR transactions where these infotypes are used.

Kind regards

( Cordialmente in PT)

roton_hossain
Explorer
0 Kudos

I have solved like this.

DATA: BEGIN OF funexcl OCCURS 2,

funkt LIKE sy-ucomm,

END OF funexcl.

funexcl-funkt = 'SAMD'. " name of functions key which are wanted to disbale .

APPEND funexcl.

SET PF-STATUS '0100' EXCLUDING funexcl.