Skip to Content
author's profile photo Former Member
Former Member

Dynamic Menus

Hi All,

There's an unusual requirement that I am faced with for which I solicit your help.

I have a screen with a subscreen area. There are several screens which can be called to fil this subscreen area. The screen has a few menu bars, and the first menu bar of should change for each of the subscreens called ( so as to contain the function codes possible on the subscreen ).

Now there's a crude solution that I have applied for the time being - for each of the subscreen that can possibly be called I have created a different GUI status and depending on which subscreen is being called I am setting the corresponding GUI Status in the PBO of the main screen.

But what I want to be able to do is to only create a new <i>Menu Bar</i> for each of the subscreens instead of an entire GUI status altogether. Depending on which subscreen is being called, I want to be able to suppress the menu bars (including the Function Keys) that correspond to all the other subscreens. Is it possible to accomplish this ?

Also if there's a better way of dealing with the situation, I would greatly appreciate it.

Thanks and Regards,

Anand Mandalika.

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Jul 27, 2004 at 07:13 PM


    Menu Bar is a part of the GUI status and as far as I know, it cannot be isolated from the GUI Status.

    What you can do is, to prepare one GUI Status provided that it contains all functions used through all of your screens and you add all function codes under Menu Bar. Then, you can deactivate irrelevant functions according to the subscreen by using

    "SET PF-STATUS pfstat EXCLUDING f." or

    "SET PF-STATUS pfstat EXCLUDING itab. ".

    Excluded functions will also be excluded from the Menu Bar.

    For more information, you can check SAPHelp for "SET PF-STATUS".


    Add comment
    10|10000 characters needed characters exceeded

    • Hi Anand

      I could not imagine how complicated your issue was. My suggestion was of course for some simpler usage. I am aware that excluded functions are just greyed out and as far as I know, it is not possible to change menu item names dynamically. So, my poor mind just comes to the obvious solution of having one GUI Status for each subscreen. I am sorry for the inconvenience.