(Glue-2008) Extractor 2.0 Transfer Rules
Introduction
With Datavard Glue transfer rules you can modify the data during the extraction process. This process is similar to transfer routines within BW transformations. The functionality can be used for adjusting data, changing SAP abbreviations to more human-readable form, currency conversion etc. In this document, you can find some basic information about the transfer rules and current implementation.
Transfer rules are set for each field separately. This functionality behaves as an end routine in BW transformations, where we change/adjust data stored in a target structure.
Currently, there are these options for transfer rules:
Direct assignment
Currency conversion
Conversion routine
Business function
Meaningful value
ABAP rule
Delete flag
Direct assignment
A value from the source field is copied without changes to the target field.
Currency conversion
The currency value is stored in a database as a number with two decimal places. This can lead to problems with the currencies with none or more than 2 decimal places. As an example, the Japanese Yen doesn't have any decimals, so when we have for instance 1005 JPY, the amount is stored as 10,05 in a database.
SAP applications displaying these values, perform a conversion according to a currency key during the extraction. It is necessary to convert the value of the currency field to a correct form before it is stored in an external database.
Our functionality enables this conversion automatically, as it finds the currency key during the data load and changes the particular amount into a proper value and stores it in target storage.
You can apply currency conversion to all fields or only to selected ones using the corresponding button "Apply currency conversion" in the transformation screen of the Extraction Process as shown on the screenshot below.
You can also adjust it manually by using the “Go To” button.
Conversion routine
This option allows you to use SAP conversion routines (also known as conversion exits) in the Extraction Process transformation.
You can apply conversion routine rules to all fields or only to selected ones using the corresponding button "Apply conversion routines" in the transformation screen of the Extraction Process as shown on the screenshot below. After clicking on that button, the program will loop through selected fields and check their domains. If it finds a conversion routine in the definition of a domain, it will set respective rule and generate value expression of the following view: "ALPHA ( ESRRE )", where "ALPHA" is a conversion routine and "ESRRE" is a source field.
You can also set it manually by using "Go To" button as shown on the screenshot below. Search-help will display all conversion routines available on the system.
Business function
This option allows you to use certain Business functions to adjust values during extraction.
Date format function
The Date format function is a special type of a business function that allows you to format date values from technical SAP format into desired ‘easy to read’ format. You can automatically apply this function on all date-like fields by pressing Apply date format function from the toolbar of Extractor 2.0 transformation screen.
The usage of this business function is dependent on the Glue table structure. You need to replace SAP data elements of date-like format with character-like data elements because of the resulting format being character-like. You can set the replacement of data elements to apply automatically in the transaction /DVD/GL_SETT by specifying parameters DEFAULT_DATE_FORMAT and ROLLNAME_REPLACEMENT_DATE. Please see the page (Glue-2008) Glue Settings | GL_SETT_Other_settings for more information about these parameters and their meaning.
Time format function
The Time format function is a special type of a business function that allows you to format fields containing time values from technical SAP format into desired ‘easy to read’ format. You can automatically apply this function on all time-like fields by pressing Apply time format function from the toolbar of Extractor 2.0 transformation screen.
The usage of this business function is dependent on the Glue table structure. You need to replace SAP data elements of time-like format with character-like data elements because of the resulting format being character-like. You can set the replacement of data elements to apply automatically in the transaction /DVD/GL_SETT by specifying parameters DEFAULT_TIME_FORMAT and ROLLNAME_REPLACEMENT_TIME. Please see the page Glue Settings for more information about these parameters and their meaning.
Meaningful value
The original value is transformed into a more meaningful one. For example, you can easily transform the abbreviation 'AA' into a meaningful term 'American Airlines'.
Keep in mind that data type needs to be adjusted so that longer texts fit into the target field. For more information see Data Dictionary - Data Enrichment (Meaningful values)
For every data element (e.g., 'AA') there are different ways on how to transform values. This information is stored in a database table and can be a part of customizing settings. You can adjust the settings in the GLUE Cockpit.
In general, the system transforms the values in four different ways into meaningful values:
Role – takes short texts of fixed values from a domain
Mapping – every data element contains a mapping on how an old value should be transformed into a new one
SID – converts data element RSSID into a meaningful value
ABAP – custom code that was written by a user
Please note: If meaningful values are missing some content, run the program '/DVD/GL_BPL_SPKFL_CONTENT_GEN'.
Example without using of meaningful values:
Example with using of meaningful values:
If a meaningful value is not found for value, the system stores the original value and puts it into brackets – please see the column TYPE in the picture below.
In the case values of the data element RSSID are included in the Master data table, then by a SID conversion they are converted into a value from this table. However, this conversion makes sense for HANA optimized cubes without dimension tables and the F table already contains SID values (this points directly to the values in Master data table). Every part of the process (adjusting fields during table creation and making rules in extractor) is performed automatically. For example, source table can look like:
And an example of converted values in the target table:
ABAP rule
In case the value in a particular field needs to be changed, deleted, or adjusted, you can create your custom ABAP code that will be then processed for the selected field during the load.
To set up an ABAP rule, use the ‘Rule’ button in the Transformation screen and select rule type ‘ABAP rule’. A popup with ABAP editor will appear, where custom logic can be entered.
Delete flag
Assigns a 'D' flag in case of deleted records. This is possible if Fetcher has TRIGGER delta type selected and also Read deleted entries setting is checked. Otherwise, the target field value stays blank.