8/3/2019 Lsmw Criacao Usuarios Mass http://slidepdf.com/reader/full/lsmw-criacao-usuarios-mass 1/12 LSMW – Mass User Creation By Aninda, on January 11th, 2011 advertising LSMW stands for Legacy System Migration WorkBench. Originally it was a tool supplied by SAP to migrate data from a legacy system to SAP. However, as we will see in this article, it can be used to upload almost any data into SAP. In the present case, we will be creating a lsmw script to create a bunch of user ids, a job which is common for any security administrator. Since lsmw is based on sap BDC (batch-data-communication sessions) we would have to first create a recording to store the entire sequence of actions involved in creating a user, read the user data for a set of users from a data file and use the read data to create a session for user creation. At the final step we would run the session to actually create the users. Though I have taken the example of user creation, by no means should it be assumed that this is the only application of lsmw in security. As long as you can create a recording for a sequence of repetitive actions, lsmw can step in and lighten your load. To start LSMW we use the transaction “lsmw”. We start create a project, subproject and object as shown below. lsmw - create project
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
LSMW stands for Legacy System Migration WorkBench. Originally it was a tool supplied by
SAP to migrate data from a legacy system to SAP. However, as we will see in this article, it can be used to upload almost any data into SAP. In the present case, we will be creating a lsmw
script to create a bunch of user ids, a job which is common for any security administrator. Since
lsmw is based on sap BDC (batch-data-communication sessions) we would have to first create a
recording to store the entire sequence of actions involved in creating a user, read the user data for a set of users from a data file and use the read data to create a session for user creation. At the
final step we would run the session to actually create the users. Though I have taken the example
of user creation, by no means should it be assumed that this is the only application of lsmw insecurity. As long as you can create a recording for a sequence of repetitive actions, lsmw can
step in and lighten your load.
To start LSMW we use the transaction “lsmw”. We start create a project, subproject and object
Once the project is created we are greeted with the lsmw main screen showing a set of actions
needed to create the complete script. Depending on the nature of the script and the data all or
some of these option need to be updated.
lsmw - main screen
Step 1 – We start by maintain the object attributes. The most important attribute which needs to be specified is the name of the recording which will be used to create the BDC session. A
recording is basically a set of actions that the script will replicate during executing. We can
create a recording from following the menu options in the same screen. In the present case, wecreate a recoding for the SU01 transaction and fill up the various input fields needed to create a
Step 11: The next 2 steps are converting imported data and displaying the converted data for
verification. Since, we use imported data without change, these options remain unused for our
script. Finally we generate the BDC session for our recording and using the imported data fromthe source file. Once the BDC session has been successfully generated we use the last screen
option in lsmw or transaction SM35 to execute the session. If the recording is without errors and
the data is correct, executing of the session will create the 33 users whose attributes were
LSMW is very similar to creating a recording through transaction SHDB, generating an ABAP
report for the recoding and modifying the generated code to read a source file and use the data to
generate a BDC session. A seasoned ABAP developer might prefer this method as custom code
provides a greater degree of flexibilty to answer complicated user requirements. However,custom code invariably results in greater maintenance and testing effort. So finally which method
you end up following will probably depend on your own special requirements.