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: 

Dynamic Menus

Former Member
0 Kudos

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.

4 REPLIES 4

ssimsekler
Active Contributor
0 Kudos

Hi

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".

*--Serdar

0 Kudos

Hi Serdar,

There are two issues that I find with your suggestion.

Firstly, the statement - SET PF-STATUS 'STATUS1' EXCLUDING ITAB, merely makes the list of functions ( contained in ITAB ) non-selectable. The functions themselves are just greyed out and are still visible. With several screens, the list would become very long and the user will find a lot of the functions deactivated.

Secondly, for each of the subscreens called, if I want a different menu, then I would also require the name of the menu to differ to reflect the set of functions for that screen. But do you think it's possible to change the name of the menu dynamically in the program ?

Regards,

Anand Mandalika.

0 Kudos

It looks like for your requirement you have to have a separate GUI statuses defined. You may minimize by grouping them together. Similar menus (with minimal deviation) probably keep under same status...

Thanks

Surgi

0 Kudos

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.

*--Serdar