Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
agasthuri_doss
Active Contributor

Introduction

A comparision information on LSMW, Interface and SAP PI.

LSMW

Legacy System Migration Workbench as its name signifies is a SAP R/3 based tool which is used to transfer non-SAP ADHOC data into SAP. LSMW is a SAP tool designed to transfer non-SAP data into SAP once or to assist in the periodic mass-update of SAP Master Data. It requires a large amount of human input (i.e. it cannot directly interface with data sources and must be provided with an input file in a predefined format, it cannot automatically handle error conditions and must be re-run after manual amendments are made to the data in case of errors, and it cannot be scheduled on a recurring basis without custom development). Furthermore, there is no ability to monitor LSMWs in an automated way without manually checking each and every LSMW run. As a result, it is used for one-off data migration purposes or as a periodic business process to assist users in making large-scale updates to master data, but not as an integration tool between two systems and/or for processing transactional data.

The Legacy System Migration Workbench (LSMW) offers different technique for migrating data: Direct input, BAPI, IDoc, Batch Input Recording. While BDC basically uses batch input sessions and CALL TRANSACTION method.

BDC is traditional way of coding the transactions for uploading the legacy data, SAP is changing all transactions to Object oriented programming. Since BAPI is Object based and supports all the new transactions it is preferred over BDC. More over BAPI's process data faster than BDC.

BAPI is a SAP-supplied function module with a defined interface, which allows you to interact with various business objects. SAP guarantees the integrity of your database for anything updated using a BAPI. BDC is a method of driving screens programmatically, for updating SAP data. BAPIs are generally faster than BDCs." "A BAPI is faster because it is updating the DB ""directly"". Whereas BDC with call transaction goes through the whole screen sequence like any user would do, simply put, fills screens.

However - there is not always a BAPI for a particular transaction and not all functions that are performed by a transaction can be done by a BAPI. BDCs produce error sessions which can be processed by the user, while BAPIs don't. It is recommended to choose the BAPI first, if there is no BAPI then go for BDC

Interface

Interfaces are part of WRICEF - with the help of Interface the ECC system can communicate to other SAP and Non-SAP systems. An interface coordinates communication and input/output between systems that need to be linked together but reside on different operating systems; use different database solutions and different computer languages; or that are are legacy systems that are no longer supported by the vendor, while at the same time avoiding having to make sweeping changes to the existing applications or data structures, all while ensuring business continuity.

SAP PI

In SAP PI, the integration knowledge is shipped in the form of pre-defined integration scenarios. Furthermore, SAP PI provides a set of integrated tools for creating and managing all integration relevant information. The architecture focuses on the relevant application integration information centrally, with the usage type PI.  The benefits of SAP PI are as follows:

  • Message monitoring,trouble shooting,scheduling,error handling,governance,common data model,out of box solution,performance monitoring,error monitoring
  • Can integrate applications from one or multiple systems
  • Applications can be company-internal, cross-company, SAP or non-SAP applications
  • The modeling, administration, and automation of user-driven processes within SAP
  • The process can be continued as a result of a particular action or event
  • Execution of processes can be useful when integrating applications across system boundaries (without user actions), relevant functions within SAP are reused for this purpose
  • Core function of the runtime is that it can save the state of a previously modeled process and call it up at a later stage

Comparision Table :

        Activities

           LSMW

              SAP PI

Message Monitoring

Very basic

Predelivered  message montoring

SAP Vanila

Custom code essential

( To map the source structure & target structure )

Custom code not needed- SAP ECC

Automation

Manual automation

Manual automation

Event or schedule automation

Performance

Slow

High

Prioritization

No

Yes

Mapping code

Yes

Cannot be used as common data model

Yes

Can use as common data model

Complex mapping

No

Yes

Error monitoring tool

No

Has  out of box solution

Archive

No

Yes

Action to BAPI

Indirect

Direct call

Action to IDOC

Indirect

Direct call

Action to programs

Indirect

Direct call

Action to BDC

Indirect

No

User log in

Need to have ECC access

Not necessary to have ECC access

Error log

Legacy way

Modern evolution technology

File serialization in chunks

No

Yes

BO Methods

Cannot use all the methods provided in a Business object through LSMW

Can access all the methods

Multiple data transfer

No

Yes

Import & export data

Only Import

Import & Export

Evolution

Legacy way

Modern way

Comparision Summary

LSMW , The Legacy System Migration Workbench (LSMW) is a tool that supports data migration from legacy systems (non-SAP systems) to SAP systems in a initial load or ADHOC  methodology

The LSMW comprises the following main functions:

  • Read's data (legacy data in spreadsheet tables and/or sequential files)
  • Convert data (from the source into the target format)
  • Import data (to the database used by the SAP application)

The LSMW supports a one-time transfer of data (initial data load and ADHOC) and also offers restricted support of permanent interfaces.The LSMW, however, does not include any functions for monitoring of permanent interfaces. The tool does not support any data export interfaces (outbound interfaces).

LSMW indirectly calls the BAPI, IDOC ,Standard & customized SAP programs by means of customized code, whereas SAP PI directly calls BAPI, IDOC and SAP programs. Since the call is direct & meta data residences in the SAP PI, it is preferable to send the data to SAP ECC from SAP PI. Apart from that, SAP PI has an out of the box solution for error handling & monitoring, message and end to end data flow monitoring.

In SAP PI, the scheduling, holding and storing of the message is possible, whereas in LSMW it is not possible. In the case of BDC, the LSMW is a better way than SAP PI, considering the commit and transaction security.

Recommendation

  • Usage of SAP PI, for persistent interfaces
  • Usage of LSMW for only BDC programs and where initial and ADHOC is involved

The goal of the document is to help make users aware of the Comparison of LSMW and SAP PI. Recommendations are based on my personal experience in SAP Implementation as an SAP employee and technical architect.. The user can follow the suggestions provided by the document which should be supplemented with additional information. The suggestion provided by the document may vary as per the project requirement.

Reference :

- SAP Help, at http://help.sap.com

- http://service.sap.com/ ( User ID credential required )

SAP Help, at http://help.sap.com, provides official documentation from SAP. It is structured help that is indexed and includes diagrams to illustrate key points. This site is open to the public; no login information is required.


18 Comments