Learn a 3-step technique for restricting user access to LSMW to just one assigned data load. Users then can execute a data load without posing a security risk.
Key Concept
Transaction LSMW is the main transaction for accessing the Legacy System Migration Workbench (LSMW), whichis a tool used to load data into an SAP system. The LSMW transaction is used not only for loading LSMW Objects, but also for creating and maintaining them.
The Legacy System Migration Workbench (commonly known as LSMW) is a tool used to load data into an SAP system. Developers, as well as users, can access LSMW to execute a data load via transaction code LSMW. The problem with using the same transaction for customization and execution of the LSMW Objects is that some system administrators worry that users may be able to perform actions outside of their authorization level.
This means that IT teams have to find a way to allow users to execute LSMW scripts without providing them with access to transaction LSMW. A method for solving this problem is to assign the executable LSMW Object to a new transaction code that would only allow users to execute a particular data load. This method precludes the user from executing any LSMW Objects other than the one assigned to the transaction.
Configuration Steps
I’ll review the required configuration steps using the example of an LSMW project developed to load data into infotype 0105 (communication). One of the LSMW Objects is used to load data into subtype 0010 (email address) and the other one loads data into subtype 0001 (system logon ID). I only want the user to have access to load email addresses (subtype 0010). You can follow the configuration steps using your own LSMW Object or you can download the LSMW Object I use in this article by clicking here: LSMW Object Download.
You can assign an LSMW Object to a transaction code by following three simple steps:
Step 1. Activate the LSMW Periodic Transfer flag. The key to the technique I’m describing is the Periodic Transfer program. It was originally designed to support the execution of LSMW Objects in the background. In this case, however, I will use this program to execute the LSMW Objects online. You can activate the Periodic Transfer flag on the existing LSMW Object by accessing transaction LSMW and entering the Project, Subproject, and Object name (Figure 1).

Figure 1
The Legacy System Migration Workbench initial screen
From the LSMW initial screen, click the Continue button or press F8. Access the Object Attributes screen by selecting the Maintain Object Attributes configuration option and activating the Periodic radio button (Figure 2).

Figure 2
The Periodic Data Transfer flag
Step 2. Create a selection screen variant for the Periodic Transfer program. The second step is to access the Periodic Transfer program and save a selection screen variant for the LSMW Object you want to process. The technical name of the LSMW Periodic Transfer program is /SAPDMC/SAP_LSMW_INTERFACE (Figure 3). The best way to access it for purposes of this article is via the LSMW configuration step Frame Program for Periodic Data Transfer.

Figure 3
The LSMW Periodic Data Transfer program
Save the Selection Screen variant by clicking the Save button at the top of the screen. This leads you to the Variant Attributes screen shown in Figure 4, where you set the following configuration settings:
- Specify the variant name (e.g., 0105_EMAIL) and description.
- Include the contents of the Project, Subproject, and Object fields. In other words, do not select the Save field without values check box (as shown in Figure 4).
- Hide and Protect the Project, Subproject, and Object fields (as well as any other selection screen fields you may not want). It is important to set these three fields to Protect mode so that the user is not able to unhide the fields and change the contents.
- Select the Only Display in Catalog flag to prevent users from changing the contents of the selection screen by choosing a different report variant. You must do this for all of the variants you create for this program.
- Save your variant.

Figure 4
The Variant Attributes screen for the Periodic Transfer program
Note
When you set the report variant to Only Display in Catalog you are only able to see the variant by accessing the program variant catalog screen. One way to access the catalog screen is to access transaction code SE38, enter the program name, and click the Variants button. Then, from the ABAP Variants screen select menu option Variants > Catalog.
Step 3. Create a transaction code for the LSMW Object. Assign it to the Periodic Data transfer program and the selection screen variant you just created. You accomplish this via transaction SE93 – Maintain Transaction (Figure 5) where you must enter the new transaction name (e.g., ZLSMW_0105_0010) and click the Create button. The transaction type must be Program and selection screen (report transaction). The program name is /SAPDMC/SAP_LSMW_INTERFACE and the Start with Variant field must contain the name of the variant you created in the previous step (e.g., 0105_EMAIL).

Figure 5
Create a transaction to call the Periodic Transfer program
Your configuration is now ready to be tested. Simply call the transaction code you created (e.g., ZLSMW_0105_0010) and you should see the selection screen for the periodic data transfer report. The Project, Subproject, and Object fields should already be filled in and you should not be able to modify them. Make sure you are not able to change the selection screen variant either.
In order for your users to utilize this functionality, they will need security access to the transaction code you created as well as the LSMW authorizations needed to execute an Object, excluding the access to transaction LSMW, of course.
Manuel Gallardo
Manuel Gallardo is the director of HCM consulting at /N SPRO. He is a former SAP platinum consultant and his area of expertise is SAP HCM enterprise architecture, SuccessFactors, and enterprise mobility. Since working on his first SAP implementation in 1994, he has also worked on a wide variety of SAP HR modules, as well as SAP NetWeaver Portal and ABAP development. Manuel is the author of Configuring and Using CATS, and is a frequent conference speaker.
You may contact the author at manuel.gallardo@n-spro.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.