com/wiki/display/ABAP/Steps+to+creat e+a+simple+LSMW+using+batch+input+recording
Steps to create a simple LSMW using batch input recording
• • •
Attachments:30 Added by Tarun Gambhir, last edited by Tarun Gambhir on Jan 08, 2009 (view change)

The LSM Workbench is an R/3-based tool that supports you when transferring data from non-SAP systems ("Legacy Systems") to R/3 once or periodically.
The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the R/3 system via batch input, direct input, BAPIs or IDocs. Furthermore, the LSM Workbench provides a recording function that allows to generate a "data migration object" in an entry or change transaction To start working with the LSM Workbench, use transaction LSMW:

Click on the create button to create new project, subproject and the object. As shown below.

corresponding subprojects and objects via Edit -> Create new entry. you may create a project e. My objects displays a list of all objects you created personally. you can print the project documentation out.Project. you can create a new project. Subproject: An ID with a maximum of 10 characters that is used as further structuring attribute. Click on the execute button once the project. All objects of the project displays all objects of the selected project as tree structure. All objects provides a list of all projects created already. Object: An ID with a maximum of 10 characters to name the business object. Subproject and Object: On the initial screen. In the initial screen. Project: An ID with a maximum of 10 characters to name your data transfer project. subproject and the object are . If you want to transfer data from several legacy systems. send it and save it in various file formats. for every legacy system.g. Project documentation displays any documentation written for the individual popups and processing steps.

Now record usingBatch Input RecordingData Migration .Step by Stepvia Batch Input Recording Step 1: Maintain Object attributes In this example. Choose radio buttonBatch Input Recordingand click on the recording overview icon to record the R/3 transaction. you will be updating the Material master records with the help of recording a transaction (MM01).created. and the transaction code asMM01. Enter theRecordingname asMM01_REC2. Click Back. . the description asMM01 Recording method.

Click on create to record the transaction. .

Enter the fields required for recoding a transaction successfully. Click on Done to actually start recording the transaction.Click on Done. .

*Double-click on the fieldRMMG1-MATNRand enter the name asMATNRand the description asMATERIAL NUMBERand remove the default as shown below: . The values you entered when you recorded the transaction are set by default.Note that the fields are populated with default values.

Once you have made changes.Repeat this step for all fields. the recording overview screen looks as shown below: . double-click on all other fields with default values and make appropriate changes.Similarly.

Click on SAVE to save the recording. The click on BACK icon to the main screen. After completing the recoding the system will automatically take you to the second step as shown below: . Save the while going back to the main screen.

Step 3. The easiest way is to click on 'Table Maintenance' icon to enter Fieldname. Maintain Source Structures Click on CREATE to create a source structure. you need to list what fields are present in the source structure. Maintain Source Fields In this step. Give a name and a description to the source structure as shown below: Save the source structure and go to the main screen. Type and Length for each field as shown: .Step 2.

Step 5: Maintain field mapping and conversion rules Keep cursor on field 'MATNR' and click on 'Assign Source field' icon to choose source field MATERIAL from structure MM01V6 as shown . Save while coming back to the main screen.Save while coming back to the main screen. there is only one Source and Target Structure. Step 4: Maintain Structure Relations Execute a step to 'Maintain Structure Relations'. the relationship is defaulted automatically. Since.

Similarly. Once all the fields are mapped. assign 'Source Field' rules to the remaining fields. you should have an overview screen as shown .

In this case. user-defined routines You can also maintain re-usable translations and user-defined routines. that step is not required. which can be used across conversion tasks.Save while coming back to the main screen. . translations. Step 6: Maintain fixed values.

. . IMPORTANT ****The Structure of the flat file should be proper otherwise data will not be uploaded.txt. we define how the layout of the input file is. Save while going to main screen. Create an Excel with your data and save it as a Tab-delimited text file on your local drive (C and name it MM3. The input file is a [Tab] delimited with the first row as field names. All the mandatory fields should be present in the flat file for the required transaction Step 8: Assign files Execute step 'Assign Files' and the system automatically defaults the filename to the source structure.txt. It is present on my PC (local drive) as C:\MM3.Step 7: Specify files In this step. Double Click on the legacy data.

. If you don't specify any number the system will read all the rows from the flat file. Here 1 to 2 represents the number of rows to be read from the flat file. You have the option to read only selected rows and convert data values to internal format. LSMW reads the data from the source file (from your PC's local drive). Step 9: Read data In this step. We have 2 rows in the flat file hence from 1 to 2.Save while going to main screen.

After we execute the data read from the flat file is as shown below. Step 10: Display read data This step is optional. If required. you can review the field contents for the rows of data read. .

Step 11: Convert data This is the step that actually converts the source data (in source format) to a target format. source fields are mapped to target fields. Based on the conversion rules defined. .

you can create a batch session to process updates. . Step 12: Display Converted data Again this is an optional step to view how the source data is converted to internal SAP format. Step 13: Create batch input session Once the source data is converted in an internal format.Click BACK to come back to main screen.

Step 14: Run Batch Input Session You can execute the BDC session by Run Batch input session. . Executing a batch input session is a standard SM35 transaction for managing BDC sessions. the Material master records are updated in the system.Click EXECUTE button to execute a batch inout session. Once you have successfully executed the batch input session. You can confirm this by viewing the Material master records (MM03).

.Select the session and click on the PROCESS icon.

After the session is completely processed you can confirm this by viewing the Material master records (MM03) or in the table MARA.You can Process the session in foreground or background or can only display errors. . Select the Processing Mode and then click on the PROCESS tab to executive the session.

Sign up to vote on this title
UsefulNot useful