This article shows how to create an ABAP program that allows you to execute transaction codes without having to memorize them or use reference materials. You can map a transaction code to a word or phrase. It also ensures that it does not bypass any authorization checks or rules applied to the mapped standard transaction code. All authorizations to actual transaction codes remain intact.
Key Concept
Mapping standard transaction codes to custom ones consisting of a word or phrase allows you to create simplified names for unintuitive transaction codes. For example, you could map transaction code ME22N to Edit PO.
Working with many transaction codes is a common practice for SAP users, whether they are technical, functional, or an end user. Many times during job completion, there comes a point at which the user needs to consult a search engine or other resource to find an uncommon transaction code. The alphanumeric transaction codes (e.g., SE51 or ME22N) can be difficult to remember, and the user may struggle to accomplish a given task if he or she doesn’t know the right code. I’ll show you how to develop a solution that allows your users to enter text for what they want to do (e.g., EDIT PO) instead of having to remember the transaction code (e.g., ME22N).
The standard format of a custom transaction code through SE93 is that it must start with Z or Y and cannot contain any spaces. However, using this method you can define a mapping of any transaction code to a custom transaction code and don’t need to use the Z or Y preface.
Brief Explanation
To develop the solution, you need to create the following items:
- A custom domain as an elementary data type for defining a data element
- A data element using the custom domain as its elementary type
- A transparent table for custom-to-standard transaction code mapping records
- An executable program for Insert, Delete, and Display mapping entries
- An enhancement in the SAPLSMTR_NAVIGATION program to map the defined custom non-Z or non-Y transaction code with a standard transaction code
Step 1. Using ABAP Dictionary (transaction code SE11), create a domain ZTCODE of CHAR data type with the length of 20 characters. Provide Custom TCode as the short text for it. Save and activate it.
Step 2. In transaction code SE11, create a data element ZTCODE using the domain ZTCODE. On the same change data element screen, go to the Field Label tab. Enter TCode for short, Custom TCode for medium, and Transaction Code - Custom for long and heading fields. Save the data element and activate it.
Step 3. Again in transaction code SE11 create a transparent table ZTTCMP. In the maintenance screen shown in Figure 1, enter SAP Transaction Codes Mapping in the Short Description field. In the Delivery and Maintenance tab, choose C for the Delivery Class field, and Display/Maintenance Allowed from the Data Browser/Table View Maint. drop-down list. In the Fields tab, add the fields shown in Table 1 for the table ZTCMP.

Figure 1
Create table ZTTCMP screen with the Fields tab active

Table 1
Fields to add to table ZTCMP
Step 4. Click the Technical Settings button in the application toolbar of the change table screen, and provide APPL0 as the Data Class and 0 as the Size Category. Save the technical settings for table ZTTCM. Press F3 to return to the change table screen, save table ZTTCMP, and activate it.
Step 5. Create an executable program. For my example, I’m calling it ZCUST_STD_TCODE_MAPPING. This program serves the purpose of creating custom non-Z or non-Y-to-standard transaction code mapping entries. This program performs the functions Insert, Delete, and Display mapping records in the transparent table ZTTCMP.
Note
Alternatively, you may create a table maintenance generator (TMG) for the table ZTTCMP. The standard procedure for TMG creation is available at the SAP Help portal.
Figure 2 shows the lines of ABAP code for the ZCUST_STD_TCODE_MAPPING program. After writing the program, save and activate it. You can download this code here.

Figure 2
Lines of code for the ZCUST_STD_TCODE_MAPPING program
To define text elements that would appear next to input fields on the selection screen, open menu Go > Text Elements > Selection Text in the ABAP Workbench editor. Enter the text against each parameter name as shown in Table 2, and activate it.

Table 2
Text elements for input fields on the selection screen
Step 6. Make a transaction code of this program using transaction code SE93. On execution of the program, the screen shown in Figure 3 appears. Create a custom transaction code mapping entries as much as you can. This program provides the functionality of the Insert, Display, and Delete mapping records. If the Delete check box is selected, the custom transaction code given in the Transaction Code – Custom field is deleted from table ZTTCMP. Click the Display All Mappings button in the application toolbar and you’ll see a list of all the custom-to-standard transaction code mapping records (Figure 4).

Figure 3
Main screen of the ZCUST_STD_TCODE_MAPPING program

Figure 4
Mapping list of transaction commands
Step 7. Create an enhancement implementation in the program for the start of the transaction call. The main objective of custom-to-standard transaction code mapping is achieved through this enhancement implementation to the form routine UCOMM_START_TRANSACTION. Use transaction code SE80 to find this form routine in the Repository Browser. Select Package and SESS in the top two drop-downs and follow menu path Function Groups > SMTR_NAVIGATION > Subroutines > UCOMM_START_TRANSACTION (Figure 5).

Figure 5
Navigation path to the UCOMM_START_TRANSACTION subroutine
Alternatively, you can use forward navigation in the SAP Easy Access screen. Choose System > Status in the menu and a pop-up screen appears. Double-click SMTR_NAVIGATION in the Program field and the program opens in display mode. Double-click the Include LSMTR_NAVIGATIONF04, and then double-click the Include LSMTR_NAVIGATIONF17. Here you can find the form routine UCOMM_START_TRANSACTION in the program.
Click the enhance icon
in the application toolbar. The program is enabled to implement enhancements. Choose Edit > Enhancement Operations > Show Implicit Enhancements Options. The available enhancement options in the program UCOMM_START_TRANSACTION start appearing. These options are denoted by the line of quotation marks and a black arrow appears at the start as shown in Figure 6.

Figure 6
Enhancement option appearance in the UCOMM_START_TRANSACTION subroutine
Right-click the enhancement option at the start of subroutine UCOMM_START_TRANSACTION and it displays a context menu. Choose Enhancement Operations > Create Implementation from the context menu and the Create Enhancement Implementation appears. Provide the implementation name ZENH_CUST_TCOD_MAPPING and a short text for it. Click the Create button on the screen. The created enhancement block ENHANCEMENT 1 ZENH_CUST_TCOD_MAPPING appears in the selected enhancement option.
In between the enhancement ZENH_CUST_TCOD_MAPPING block write the lines of code in Figure 7. Save and activate this enhancement implementation.

Figure 7
Lines of code for transaction code mapping to be written in ZENH_CUST_TCOD_MAPPING
Finally, the implemented enhancement has the completed format shown in Figure 8.

Figure 8
Implemented enhancement ZENH_CUST_TCOD_MAPPING
As this enhancement is implemented at the starting point of any transaction in SAP GUI navigation, I recommend you log off and then log in again to SAP GUI to make this enhancement effective.
Example
Let’s pass a mapped non-Z or non-Y custom transaction code (e.g., PROGRAM) in the Command field. Its mapping to the standard transaction code can be seen in Figure 9. This automatically brings up the initial screen of the Create Program transaction, transaction code SE38.

Figure 9
Demonstration of the developed solution
Note
Commands have been mapped according to system language, so that each command could be considered unique per system language.
Security
In this example, the UCOMM_START_TRANSACTION form routine is the point of the program from where a transaction code initially takes its flight to run. All authorizations to the transaction code are verified after this point of code in the execution path of the program. Since, before taking flight, you have replaced your custom non-Z or non-Y transaction code with a standard one, the rest of the program in the execution path only knows the standard one.
In Figure 10, you can see a scenario of transaction authorization. I was not authorized to access transaction code DB12 in the development system on which I worked for this program. I created a custom transaction code called DB MONITOR that maps to DB12 in table ZTTCMP. When I use transaction code DB MONITOR, however, the system still does not allow me to access transaction code DB12 because I am not authorized. The user is also unable to apply authorization checks on the custom transaction code, although as I already mentioned the custom transaction code inherits by default any authorization checks of the mapped standard transaction code.

Figure 10
Demonstration of security aspect of developed solution
Table 3 shows some sample non-Z or non-Y custom transaction command mappings for prominent SAP modules that you can use with this program.

Table 3
Sample transaction code mappings
Note
An exception to this utility is that it excludes the execution of custom transaction codes with /n because they follow a different execution path.
Muhammad Ramzan
Muhammad Ramzan is an experienced SAP Certified Consultant in ABAP and Portal development. He has more than five years of development experience in SAP. His current affiliation is with EJADA Systems at the Saudi ARAMCO Project in Saudi Arabia. Previously, he was a senior SAP Development Associate in DESCON Engineering Limited in Pakistan, which is a leader in the Engineering & Construction, Chemical, and Power industries. His career experiences in the software development industry as well has made him capable of integrating SAP and non-SAP solutions successfully.
You may contact the author at Muhammad.Rumzaan@gmail.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.