We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20
Welcome, Guest Login Register
Products Services & Support About SCN Downloads
Industries Training & Education Partnership Developer Center Lines of Business University Alliances Events & Webinars Innovation Added by Tarun Gambhir, last edited by Tarun Gambhir on Jan 08, 2009 ABAP Development / Data Transfers - BAPI, BDC, ALE, LSMW, DX-WB / LSMW Steps to create a simple LSMW using batch input recording 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 f unction 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 execute button once the project, subproject and the object are created. Click Back.Now record usingBatch Input RecordingData Migration - Step by Stepvia Batch Input Recording Step 1: Maintain Object attributes In this example, you will be updating the Material master records with the help of recording a transaction (MM01). Choose radio buttonBatch Input Recordingand click on the recording overview icon to record the R/3 transaction. Enter theRecordingname asMM01_REC2, the description asMM01 Recording method, and the transaction code asMM01. Click on the create button to create new project, subproject and the object. As shown below.
Project, Subproject and Object: On the initial screen, you can create a new project, corresponding subprojects and objects via Edit -> Create new entry. - Project: An ID with a maximum of 10 characters to name your data transf er project. If you want to transf er data f rom several legacy systems, you may create a project e.g. f or every legacy system. - Subproject: An ID with a maximum of 10 characters that is used as f urther structuring attribute. - Object: An ID with a maximum of 10 characters to name the business object. In the initial screen, All objects provides a list of all projects created already. My objects displays a list of all objects you created personally. All objects of the project project as tree structure. Project documentation displays any documentation written f or the individual popups and processing steps. you can print the project documentation out, send it and save it in various f ile f ormats. Click on the execute button once the project, subproject and the object are created. Click Back.Now record usingBatch Input RecordingData Migration - Step by Stepvia Batch Input Recording Step 1: Maintain Object attributes In this example, you will be updating the Material master records with the help of recording a transaction (MM01). Choose radio buttonBatch Input Recordingand click on the recording overview icon to record the R/3 transaction. Enter theRecordingname asMM01_REC2, the description asMM01 Recording method, and the transaction code asMM01.
Click on create to record the transaction.
Click on Done. Click on Done to actually start recording the transaction. Enter the f ields required f or recoding a transaction successf ully.
Note that the f ields are populated with def ault values. The values you entered when you recorded the transaction are set by def ault. *Double-click on the f ieldRMMG1-MATNRand enter the name asMATNRand the description asMATERIAL NUMBERand remove the def ault as shown below: Repeat this step f or all f ields.Similarly, double-click on all other f ields with def ault values and make appropriate changes. Once you have made changes, the recording overview screen looks as shown below: Click on SAVE to save the recording. The click on BACK icon to the main screen. Save the while going back to the main screen. Af ter completing the recoding the system will automatically take you to the second step as shown below: Step 2. Maintain Source Structures Click on CREATE to create a source structure. Give a name and a description to the source structure as shown below:
Save the source structure and go to the main screen. Step 3. Maintain Source Fields In this step, you need to list what f ields are present in the source structure. The easiest way is to click on 'Table Maintenance' icon to enter Fieldname, Type and Length f or each f ield as shown: Save while coming back to the main screen. Step 4: Maintain Structure Relations Execute a step to 'Maintain Structure Relations'. Since, there is only one Source and Target Structure, the relationship is def aulted automatically. Save while coming back to the main screen. Step 5: Maintain f ield mapping and conversion rules Keep cursor on f ield 'MATNR' and click on 'Assign Source f ield' icon to choose source f ield MATERIAL f rom structure MM01V6 as shown Similarly, assign 'Source Field' rules to the remaining f ields. Once all the f ields are mapped, you should have an overview screen as shown Save while coming back to the main screen. Step 6: Maintain fixed values, translations, user-defined routines You can also maintain re-usable translations and user-def ined routines, which can be used across conversion tasks. In this case, that step is not required. Step 7: Specify files In this step, we def ine how the layout of the input f ile is. The input f ile is a [Tab] delimited with the f irst row as f ield names. It is present on my PC (local drive) as C:\MM3.txt. Double Click on the legacy data. Save while going to main screen. Create an Excel with your data and save it as a Tab-delimited text f ile on your local drive (C and name it MM3.txt. IMPORTANT ****The Structure of the f lat f ile should be proper otherwise data will not be uploaded.. All the mandatory f ields should be present in the f lat f ile f or the required transaction Step 8: Assign f iles Execute step 'Assign Files' and the system automatically def aults the f ilename to the source structure. Save while going to main screen. Step 9: Read data In this step, LSMW reads the data f rom the source f ile (f rom your PC's local drive). You have the option to read only selected rows and convert data values to internal f ormat. Here 1 to 2 represents the number of rows to be read f rom the f lat f ile. If you don't specif y any number the system will read all the rows f rom the f lat f ile. We have 2 rows in the f lat f ile hence f rom 1 to 2.
Af ter we execute the data read f rom the f lat f ile is as shown below. Step 10: Display read data This step is optional. If required, you can review the f ield contents f or the rows of data read. Step 11: Convert data This is the step that actually converts the source data (in source f ormat) to a target f ormat. Based on the conversion rules def ined, source f ields are mapped to target f ields.
Click BACK to come back to main screen.
Step 12: Display Converted data Again this is an optional step to view how the source data is converted to internal SAP f ormat. Step 13: Create batch input session Once the source data is converted in an internal f ormat, you can create a batch session to process updates. Click EXECUTE button to execute a batch inout session. 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 f or managing BDC sessions. Once you have successf ully executed the batch input session, the Material master records are updated in the system. You can conf irm this by viewing the Material master records (MM03). Select the session and click on the PROCESS icon. You can Process the session in f oreground or background or can only display errors. Select the Processing Mode and then click on the PROCESS tab to executive the session. Af ter the session is completely processed you can conf irm this by viewing the Material master records (MM03) or in the table MARA. Contact Us SAP Help Portal Privacy Terms of Use Legal Disclosure Copyright