1

I would like to hide the "Config structure" button in the header of the screen "Item derails: configuration" in the VA* transactions, for a certain item status.

enter image description here

I am debugging the Dynpro logic but it's quite difficult to find the right spot where I can implement my additional logic and what button it actually is (technically).

Any help and guidance is appreciated.

Thanks in advance.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
Alex K
  • 100
  • 3
  • 15
  • 1
    To help you (applies to any question about Dynpro/Application Toolbar button): if you put the focus on the button and press `F1` key, you will see both its ID and the GUI status it belongs to. You may use the feature "breakpoint at statement", to stop at every `SET PF-STATUS` which defines which GUI Status is to be put into the Application Toolbar and what buttons are to be excluded or grayed out (if any). – Sandra Rossi Jan 15 '21 at 14:10
  • @SandraRossi Thank you very much. This will surely help me out. – Alex K Jan 15 '21 at 14:20

1 Answers1

2

Here is a way to locate the code which defines the buttons of the Application Toolbar in any Dynpro. You may then change the code to hide a button, etc.

The "Application Toolbar" is the line of buttons which appears at the top of the main screen area (what is shown in your screenshot), and it's selected by the ABAP statement SET PF-STATUS during the Process Before Output event of the Dynpro screen, right before the screen is displayed.

If you put the focus on the button (click without releasing and drag out of the button) and press the F1 key, you will see both the function code of the button and the GUI status it belongs to (screenshot for transaction code SE38):

Focus on one Application Toolbar button - SE38

Technical info about Application Toolbar button

Double-click the "Function" field to display the GUI Status:

GUI Status Application Toolbar

You may then start the debugger (/h in the command field for instance) and use the feature "breakpoint at statement", to stop at every SET PF-STATUS. After the EXCLUDING word, you may exclude (hide) any function code you want (button, menu item or keyboard key; for information, here SYCR is not even defined in the GUI status, so it's ignored). As you can see, you may modify the code here:

SET PF-STATUS EXCLUDING

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48