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: 

How to hide menu option by client?

former_member1312574
Participant
0 Kudos

Gurus please help,

I added a new menu option to a custom program using transaction SE41. New menu option is working as expected. But we want to hide this menu option for other clients on our system. Because new menu option is added to open a help file stored locally. Other clients don't have this requirement.

Please advice how can I procees?

Regards,

Pavan

3 REPLIES 3

Former Member
0 Kudos

what have you considered so far??

Rob

Former Member
0 Kudos

Hi srinivasa,

You can add condition with Sy-mandt .

If sy-mandt is equal to client number

set that pf status .

else give the old pf status.

Regards,

Ramya Ramasamy

0 Kudos

That will unnecessarily increase the PF statuses in the program, which will result in increase in maintenance.

e.g If you have to add a new functionality, you will have to update it at 2 places, which would be a headache and might miss out.

The best way is -

Have a single PF status.

Before the command set pf-status, fill the table gt_fcode with the command of whatever functionality you want to hide, based on the condition of sy-mandt.

Use excluding gt_fcode when you set PF status.

Souce code:

DATA: gt_fcode TYPE TABLE OF sy-ucomm.

REFRESH gt_fcode.

IF sy-mandt ne 'REQUIRED_CLIENT'.
     APPEND 'COMMAND' to gt_fcode.
   ENDIF.

SET PF-STATUS '0100' EXCLUDING gt_fcode.