Menu Exit is use to add custom menu option to the standard menu.
As an example suppose you want to add the extra option to navigate to transaction SU01D from the SE38 Program Display screen. Suppose you want put that menu option just below the UtilitiesàVersions. Check the below screen shot.
Find out the Menu exit which can be used to achieve this functionality.
Go to System status and find out the package name used for this SE38 Source code Display screen. The program name is SAPLS38E to display the source code in transaction SE38. Go to attribute of this Program, you can find the package as SEDI.
Take this package name SEDI and Go to transaction code CMOD .Use the menu path Utilities->SAP Enhancement.
Give the package name as SEDI and execute it. You can find the below list of enhancements
As per the description : Enhancement SEUED001 Can be used. So Now when you got your dream enhancement let’s start the movie.
Go to Transaction CMOD and create a Project ZMETEST (You can give any name).Click on the button Assign Enhancement and include the Enhancement SEUED001.Click on the components button you can see the below Exits.
Double click on the EXIT SAPLS38E +PGE. It will popup you the extra menu option which you want to add.
When you click on the “Go to Su01d” menu option the screen execution should go to the SU01D transaction. To write this navigation code we can use Function exit EXIT_SAPLLOCAL_EDT1_002 (Some time you need to try trial and error method to find out the related function module name).Double click on it and write the below code into the include ZXSEUU25.(which is inside the Function module EXIT_SAPLLOCAL_EDT1_002).
(Note: Set parameter statement is not required it is just for setting the user id as your id in SU01D)set PARAMETER ID ‘XUS’ FIELD SY-uname.
Call transaction ‘SU01D’ .
Go back to CMOD screen and activate your project.
Open Se38 screen with any report program and go to the menu path UtilitiesàGo to Su01d.
It will take you to Su01d screen.
(Note: It is good practice to De activate the project if you are doing this tutorial for learning purpose. J )