(DTERP-2302) Lookup translation

When data is archived there is a limited possibility to access this data. Multiple standard SAP transactions are handling access to the archived data but this could not be the case for your custom reports. To get data to your reports, you need to adjust your custom development to be able to read data from the archive. This can take a lot of time and effort to identify the places in code that needs to be adjusted and then do the adjustment the right way. The functionality of Lookup translation will do this for you automatically.

Setup

Lookup translator framework is used by multiple products so before translation of any of Lookup proper API type needs to be set.

  1. Go to /DVD/CRP_TAB transaction

  2. Click on the Settings button on the menu bar

  3. Change value of the parameter API_TYPE to value SM

Analyzer

Analyzer is a functionality that will scan your system and find all custom reports that access the defined tables. As result, you will get a list of the places in your code that need to be adjusted. You can choose the scope in which the code will be scanned.

Translator

Once you have the list of the places in the code that needs to be adjusted, you can do it by the translator. Translator will parse the SELECT statement of the custom report to create select on archived data.

Translation process

During the process of translation code of the custom development object is adjusted with the code that will be reading data from the archive, right after data are read from the original select statement. In the following diagram, you can see how the custom report will be adjusted from a high-level point of view.

 

End-to-End step list

Below you can find a complete step list on how to find and translate your Lookup/s in your custom development.

  1. Go to Lookup translator transaction /DVD/CRP_TAB

  2. Click on Analyze button in the menu bar

  3. Fill Table name selection option with desired table names

  4. Click on the button Execute report in the background and go back

  5. Wait until the analyzer job finished

  6. Check Lookup that was found for desired tables

  7. Select the row of the Lookup that you want to translate and click on Translate

  8. Select development package where generated includes will be stored and execute

  9. Lookup is translated

Example of translated report

Here you can find an example of translated Lookup in the report.

 

Original report before translation

 

  1. Go to Lookup translator transaction /DVD/CRP_TAB

  2. Click on Analyze button in the menu bar

  3. Fill Table name selection option with desired table names

  4. Click on the button Execute report in the background and go back

  5. Wait until the analyzer job finished

  6. Check Lookup that was found for desired tables

  7. Select the row of the Lookup that you want to translate and click on Translate

  8. Select development package where generated includes will be stored and execute

  9. Now Lookup should be translated

You can see that the original code was updated with code (line 26 to 54) that will append archived data to data that was read from the primary database table.

Example of the report source code after translation

Accessing of archived data

If you already translated your custom development objects then you need to enable reading data from the archive using the following settings.

  • Settings that apply for all tables

    • Go to expert settings transaction /DVD/RL_SETT_EXPERT

    • Fill Tool CRP_TAB and confirm

  • Settings that applied for specific table

    • Go to transaction /DVD/CRP_TAB_SET

Settings

Parameter

Technical name

Description

Parameter

Technical name

Description

Lookup for SM table enabled

LOOKUP_ENABLED

Setting enables/disable reading data for translated selects using Lookup translator.

Possible values:

<space> - disabled

X - enabled

Default value: <space>

Storage ID

STORID

Storage ID will be used for reading data from storage management. Originally it is intended to be ADK storage type storage that is reading data using the ADK framework. If you are using transparent archive functionality and you want to use it also for reading data that will be sent back to the Lookup report, fill in the storage ID that you used for a particular archiving object. Available Storage IDs can be found using transaction /DVD/SM_SETUP

Limitations

Not each Lookup can be translated, kindly find Supported Lookup/s in subpages.