LSMW is a SAP R/3 based tool, used to transfer non-sap data i.e. legacy data into sap. Being an integrated part of SAP, this tool is free of cost to SAP’s customers and partners. This configurable tool is a cross-application component, basically used for standard SAP applications. LSMW is a structured technique in which actions are performed step by step. It is preferred over other data transfer methods because of its quality, user-friendly and data consistent features.
This blog is part of series of blogs on LSMW. It describes the usage scenarios of LSMW and some points helpful while doing LSMW. We can choose any of the methods as per our requirement.
Major Usage Scenarios:
Import Methods: LSMW provides functionality to upload data through various standard import methods. Selection of import technique depends upon the business object being used.Methods are:
- Batch Input/direct input- Specify object name. Mention method of the object (Create, Display, change etc). Program name and Program type gets populated automatically. Type D is for direct input and B for Batch Input. For documentation, click icon next to program name.
- BAPI (Business Application Programming Interface) – Specify business object name. Then enter the relevant method. Message type and Basic Type fills automatically.
- IDoc (Intermediate Documents) – For this, first user-defined IDOC structure is created and required ALE settings are done. Then the created IDOC structure is used in the LSMW to import data file.
- Standard Batch input recording – One can generate a custom- specific object. On recording, a session is generated which can be reused.
Useful points: Some useful terms and points helpful during data transfer using LSMW are:
- User Menu- It contains all the steps used to execute LSMW object. Mandatory steps will be automatically selected depending upon the import method used for object.
- Object Overview- It contains all the details related to Business object for which data is going to be uploaded from the legacy system. Data can be seen in list or tabular form. Initially only target related information is visible. Source structure, its fields and related information will appear after defining source structure.
- Action Log- After execution of each step, a log is created. It includes Date, Time, User and Process Step information.
- Transport- For transport go to Extras and Generate Change request.
- Maintain Multiple Source Structures- Source structure can be single or multiple.
In case of multiple Source structures, the subordinate source structure must have at least one source field with same fieldname of the super ordinate structure. During the import, this field is then used as a key for the relationship between the two dependent structures. This method ensures that the hierarchical source structure you defined can be read correctly by the LSMW. If not required, delete the dependencies of the structures in the step ‘Maintain Source Structures’. In the case of flat structures, no fields of the same name are required.
- Specify Files- Before this step, the data which is to be uploaded needs to be arranged in a specified format such that the number of fields defined in source structure should be equal to number of fields in the file stored as ‘Tab delimited’ (.txt) file.
Note: when value like ‘0001’ is entered in excel sheet, initial zeroes disappear. This will create problem while converting the read file. For this, change the format of column to ‘Text’.
By Nikhil Joshi. (on behalf of SAP Consulting Team)
SAP :: Streamlined
We offer variety of services including SAP ECC ,SAP HR,SAP BW,SAP CRM, SAP SCM,SAP BPM, Business Objects, SAP ABAP Development, SAP BASIS and SAP NetWeaver consulting. We have expertise in providing implementation,development, SAP Migration and SAP support services to SAP customers across diverse industries at a global level.
Have a question on SAP? Write to our SAP Architect.
(We promise a no-obligation consulting reply)