debuggingabapdynpro

How to know the used GUI Status of the displayed screen?


There is a Dynpro screen with a GUI Status containing buttons that I want to extend with custom buttons.

How to know the names of the program and the GUI Status used?

How to find the ABAP place where the GUI Status is set?

For instance, there are these buttons in the transaction code MB52:

MB52 Application Toolbar


Solution

  • The simplest way is to select the System menu > Status:

    System menu > Status

    System: Status > GUI Status

    If you want to know more about the ABAP logic which selects one GUI Status or another, set a Statement Breakpoint on the ABAP keyword SET PF-STATUS:

    1. Go to the screen before the one you're interested in, e.g. the selection screen of MB52. Type /h in the command field and press Enter:

      /H to enter the debug mode

    2. Do the action to go to the screen you're interested in, e.g. in the case of MB52, press F8.

    3. The debugger starts, press Shift+F5 or the menu Breakpoints > Breakpoint at > Breakpoint at Statement:

      ABAP backend debugger > Add Breakpoint at Statement

      You may also achieve the same by pressing F9 or the menu Breakpoints > Create breakpoint.

      If you are using Eclipse ADT, the Breakpoints view contains the button "Add Statement Breakpoint".

    4. Type SET PF-STATUS and press Enter:

      ABAP backend debugger > Breakpoint at Statement

    5. Continue the program execution; the execution stops at the next statement SET PF-STATUS:

      ABAP backend debugger > Stopping on Breakpoint at Statement