LSMW – Create Purchase Requisition (PR)

LSMW (Legacy System Migration Workbench), from its name, is a tool in SAP ERP that allows us to do the migration data from Non-SAP system to SAP system. It’s usually used in the Go-live preparation phase of SAP implementation project to create multiple records of SAP master data or transaction data (such as material master, vendor master , customer master, purchasing document, etc), without entering them one by one.
With LSMW, SAP can read an input file, for example a .txt file, which contains multiple records with some columns, and then convert them into SAP data. Of course, we had to define the format of the input file and the conversion rule first before we run the LSMW tool. The contents of the input file can be the master or transaction data form legacy system that needs to be migrated to SAP system.
LSMW can be used not only for data migration, but it also can be used in the production phase of SAP implementation for various needs, such as to create or update master data or transaction data which are not efficient if we do it one by one. Although SAP has provided “mass change” functionalities such as MM17, MEMASSRQ, MEMASSPO tcodes, with LSMW, we have more flexibility in terms of fields that can be changed.

We can use LSMW to do various SAP transactions as it has four object types and import methods, which are:

  1. Standard batch/direct input
  2. Batch input recording
  3. Business Object Method (BAPI)
  4. Intermediate Document (IDOC)
The first two methods can be run without any ABAP programming knowledge, so it can be created by anyone who understand the specific transaction well including the functional analyst, or even end-users. But, the first two methods can be enhanced, if needed, with a simple ABAP logic, because SAP has provided the functionalities. The next two methods needs ABAP programming.
In this example, I will show how to use LSMW to create Purchase Requisition (PR) documents from a set of input files. I will use the Standard batch/direct input method because it requires no ABAP programming, and unlike Batch Input Recording method, it can be used to create multiple records in a purchasing document.
With Batch input recording, which you can think like macro recording in MS office, it’s difficult to create a document with multiple records because there might be different count of the records in each document in the input files, while we must determined it in the recording process when we create the LSMW program.
In this example I will generate LSMW program for creating PR documents which can have multiples items with single account assignment “cost center”.
You can download the screenshots of step by step guide how to use LSMW to create PR documents with multiple items here. You can learn the concept behind it and apply it to your own needs. If you have any comments, opinion, or questions, you can post it in the “comment” section below.

5 thoughts on “LSMW – Create Purchase Requisition (PR)

  1. This is a great article at the right time for me. I was trying to create a PR template for my company. Instantly, it helps.

    It would be even greater if you could add other templates (and the guides) for Vendor, Material, Contract, PO, etc. 🙂 🙂 🙂

    Again, thanks Rizki!
    You help a lot.

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *