How To Use A Translation Table

Jimbo's picture

A quick and easy transformation that can be applied to legacy data automatically (and therefore consistently) is a Translation. Translations are most often used in while migrating transactional data from legacy systems into a new production system. A good example of translation is to convert legacy customer numbers to production customer numbers while loading Accounts Receivable documents.

Legacy data is often delivered with discrepancies that prevent it from being loaded into SAP because it is extracted and massaged by resources who are not trained in Data Migration, but rather are internal resources that have been reassigned temporarily to an SAP implementation for their functional expertise and knowledge of company operations and workflow. Rather that push the data back to the resource because of a small discrepancy, it is almost always preferable to apply an easy transformation to the data that allows for it to be loaded into SAP.

For the purpose of this example, some long texts are coming from legacy system and have the name of the language in the source data rather than the ISO code for the language. SAP does not understand the name of the language, but only the two-letter ISO code. A translation table will take a few minutes to create whereas sending the data back to the business to be massaged may take days and potentially reduce its integrity.

Once the LSMW object has been created, double-click on the Maintain Fixed Values, Translations, User-Defined Routines.

Click on Translations and then click on the "New" button. Give the translation a name and a description. Press the "Enter" key to save the details.

Expand Translations and then click on the new translation. Click on the "Edit Entry" button.

Set the formats for the source field and the target field. Language names and ISO codes are character values and have been set accordingly in the example. SAP will not allow for the addition of any translation values until these details have been saved, so be sure to save the details.

Now click on the 1:1 Translation Value tab and add the desired data. Be sure to tick the "OK" box for each entry to ensure that LSMW uses it in the translation during the Convert Data step. In this example the data is language names and ISO codes. Save the translation and then back out of this screen.

In Maintain Field Mapping and Conversion Rules assign the source field for the legacy data to the field to be translated. The translate tool will not work until the source data field is assigned to the target field. LSMW will insert the appropriate ABAP code.

Now click on the Translation button and select the translation to apply. Press the "Enter" key to save the changes and LSMW will insert the ABAP code to perform the translation automatically.