Use ABAP to Increase the Effectiveness of a Legacy System Migration Workbench Object

  • by Julian R Marquez, Senior SAP Business Analyst, Tesoro Companies, Inc.
  • May 20, 2011
Learn how to apply the ABAP programming language to your Legacy System Migration Workbench (LSMW) objects to meet your business requirements. See how to navigate through the LSMW transaction to find the areas where you can write your own ABAP code by reviewing detailed examples.
Key Concept
SAP’s Legacy System Migration Workbench (LSMW) allows users to migrate data from legacy systems to their SAP environment. It allows you to load data en masse from a formatted text file. Although one of the benefits of using LSMW is the ability for users to develop data transfer scripts without the need for writing ABAP code, you can actually use ABAP code to enhance the functionality of an LSMW.

There are many ways to use ABAP to enhance the functionality of Legacy System Migration Workbench (LSMW) objects. Every LSMW request presents different opportunities for writing value-added code. Here are a few examples:

  • Performing data checks prior to conversion to ensure that erroneous data is not loaded into the SAP system
  • Preventing data from loading into the wrong environment (for example, loading data meant for your QA environment into your productive system)
  • Manipulating data if a certain condition is met
Note
The examples and content in this article assume that the reader has a basic understanding of the LSMW transaction and the ABAP programming language. They were created using LSMW Version 4.0.0. You can check the LSMW version in your system by following menu path Extras > Display LSMW Version. For a more detailed overview of the LSMW transaction, refer to the article “Best Practices to Increase the Effectiveness of Your LSMW Objects,” written by Manuel Gallardo.

Areas in Which You Can Write ABAP Code 

You can insert ABAP code in two areas in the LSMW transaction. The first area is the administration screen for user-defined routines. ABAP code that is written here is done so in the form of a subroutine, and can be reused by all LSMW objects within the project in which the user-defined routine was created. This is ideal for creating code that has the potential for being used by other objects within a project.

The second area in which you can insert ABAP code is in the maintain field mapping and conversion rules step of the LSMW. When ABAP code is inserted there, it applies only to objects in which it was inserted and cannot be reused by other objects. An example of this would be writing code that performs a specific data check applicable only to the infotype for which the object was created.

Julian R Marquez

Julian R. Marquez is a senior SAP business analyst for Tesoro Companies, Inc., in San Antonio, Texas, and has been working in SAP ERP HCM since 2004. His areas of specialty include Personnel Time Management, Personnel Administration (PA), and Personnel Development (PD), with a background in ABAP development. He holds a BS in software engineering and an MS in industrial engineering, both from St. Mary’s University in San Antonio, Texas.

See more by this author


Comments

No comments have been submitted on this article. 


Please log in to post a comment.

To learn more about subscription access to premium content, click here.