Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 forms, 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.

Image RemovedImage Added

You can also adjust it manually by using the “Go To” button.

Image RemovedImage Added
Note

Unsupported reference tables:

  • Reference DDIC tables that do not have all their key fields present in the source table.
    -In this case, it’s impossible to clearly identify a correct entry in the reference table. For this reason, we are not applying currency conversion.
    -In case this is required we recommend using a custom ABAP routine to make adjustments if necessary.

  • Reference DDIC structures.
    -Reference structure is only filled during runtime. It’s based on company code settings and special logic needs to be used.
    -In case this is required we recommend using a custom ABAP routine to make adjustments if necessary.

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 rules and generate value expressions of the following view: "ALPHA ( ESRRE )", where "ALPHA" is a conversion routine and "ESRRE" is a source field.

Image RemovedImage Added

You can also set it manually by using the "Go To" button as shown on the screenshot below. Search-help will display all conversion routines available on the system. 

Image RemovedImage Added

Business function

This option allows you to use certain Business functions to adjust values during extraction.

Image RemovedImage Added

Date format function

The Date format function is a special type of business function that allows you to format date values from technical SAP format into the desired ‘easy to read’ format. You can automatically apply this function on all date-like fields by pressing the Apply date format function from the toolbar of the Extractor 2.0 transformation screen.

Image RemovedImage Added
Note

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 chapter Glue Settings for more information about these parameters and their meaning.

Time format function

The Time format function is a special type of business function that allows you to format fields containing time values from technical SAP format into the desired ‘easy to read’ format. You can automatically apply this function on all time-like fields by pressing the Apply time format function from the toolbar of the Extractor 2.0 transformation screen.

Image RemovedImage Added
Note

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 chapter Glue Settings for more information about these parameters and their meaning.

Xfeld to Boolean function

The Xfeld to Boolean function allows you to translate the ABAP XFELD or FLAG field to BOOLEAN expressions, e.g. 1/0 or T/F or TRUE/FALSE. You can automatically apply this function on all fields which use domain XFELD or FLAG by pressing Apply Xfeld to Boolean from the toolbar of the Extractor 2.0 transformation screen.

XFELD_TO_BOOLEAN( VALUE, TRUE_SYMBOL, FALSE_SYMBOL ) → example: function XFELD_TO_BOOLEAN( FAILED, "1", "0" ) will take value of field FAILED and translate it to 1(TRUE) or 0(FALSE).

Image RemovedImage Added

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 the data type needs to be adjusted so that longer texts fit into the target field. More information can be found in the section Data Dictionary - Data Enrichment (Meaningful values).

Image RemovedImage Added

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

Note

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:

Image RemovedImage Added

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 the Master data table). Every part of the process (adjusting fields during table creation and making rules in extractor) is performed automatically. For example, the source table can look like this: 

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.

Image RemovedImage Added

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.