Application Development and Automation 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: 
Read only

How to call user menu from program

Former Member
0 Likes
1,210

How can i call the user menu from a program?

I searched the form UCOMM_SHOW_NEW_MENU associated with XXUSER okcode of program SAPLSMTR_NAVIGATION, but it cannot be called from an outside program.

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
985

Hi,

If you want the user menu to always be displayed, you may do it in the USERS_SSM customizing table for each user, or globally for all users using SSM_CUST, entry SAP_MENU_OFF = YES or X.

You may also do it programmatically for current user this way:


CALL FUNCTION 'NAVIGATION_SET_ACTIVE_MENU'
        EXPORTING
          UNAME                     = sy-uname
          user_menu_type_flag       = 'C'. "S = SAP menu, C = user menu

BR

Sandra

6 REPLIES 6
Read only

Sandra_Rossi
Active Contributor
0 Likes
986

Hi,

If you want the user menu to always be displayed, you may do it in the USERS_SSM customizing table for each user, or globally for all users using SSM_CUST, entry SAP_MENU_OFF = YES or X.

You may also do it programmatically for current user this way:


CALL FUNCTION 'NAVIGATION_SET_ACTIVE_MENU'
        EXPORTING
          UNAME                     = sy-uname
          user_menu_type_flag       = 'C'. "S = SAP menu, C = user menu

BR

Sandra

Read only

0 Likes
985

Hi Sandra,

Thanks for the reply. Unfortunately this doesn't work for me because i need to force the user menu i.e. to "jump to" the user menu like when you press the "CTRL+F10" button in the session manager.

Best Regards,

Nuno

Read only

0 Likes
985

Hello Nuno,

This version exits immediately current program and displays user's menu:


CALL FUNCTION 'NAVIGATION_SET_ACTIVE_MENU'
        EXPORTING
          UNAME                     = sy-uname
          user_menu_type_flag       = 'C'. "S = SAP menu, C = user menu
COMMIT WORK.
CALL TRANSACTION 'SMEN'.

Note: calling NAVIGATION_SET_ACTIVE_MENU alone, doesn't leave current program, sets user's menu on new external modes, but doesn't work on current external mode as probably data isn't reloaded

BR

Sandra

Read only

0 Likes
985

Thanks Sandra.

Worked perfectly.

BR

Nuno.

Read only

0 Likes
985

Just one detail, after this call during the next "back" error message "Cannot start transaction SMEN" is displayed.

BR

Nuno.

Edited by: Nuno Bernardo on Jul 18, 2011 12:02 PM

Edited by: Nuno Bernardo on Jul 18, 2011 12:03 PM

Read only

Former Member
0 Likes
985

Just one detail, after this call during the next "back" error message "Cannot start transaction SMEN" is displayed.