Start of Content Area

Function documentation Conversion Routines in the BI System  Locate the document in its SAP Library structure

Use

Conversion routines are used in the BI system so that the characteristic values (key) of an InfoObject can be displayed or used in a different format to how they are stored in the database. They can also be stored in the database in a different format to how they are in their original form, and supposedly different values can be consolidated into one.

Conversion routines that are often implemented in the BI system are now described.

Integration

In the BI system, conversion routines essentially serve to simplify the input of characteristic values for a query runtime. For example with cost center 1000, the long value with left-hand zeros 0000001000 (from the database) is not to be entered, but just 1000. Conversion routines are therefore linked to characteristics (InfoObjects) and can be used by them.

Conversion routines can also be set with data loading. At the DataSource there are two conversion routines: one that is entered in the SAP source system and entered in the BI system at replication, and one that is defined in the BI system or was already defined for BI Content DataSources. In the DataSource maintenance you can define if the data is delivered in external or internal format, or if the format should be checked. The conversion routine from the source system is hidden there.

The conversion routine from the source system is used in the InfoPackage in the value help. The conversion routine in the BI system is checked upon loading (OUTPUT & INPUT), executed (INPUT) or ignored (in this case, when the DataSource is checked there is a warning if a conversion routine is nevertheless entered), depending on the setting made in the field. It is also used for the display (OUTPUT) and maintenance (INPUT) of the data in the PSA...

In many cases it is desirable to store the conversion routines of these fields in the corresponding InfoObject on the BI system side too. When the fields of the DataSource are assigned to the InfoObjects, a conversion routine is assigned by default in the transformation rules. You can choose whether or not to execute this conversion routine. Conversion routines PERI5, PERI6 and PERI7 are not executed automatically since these conversions are only performed when data is extracted to the BI system.

When loading data you now have to consider that when extracting from SAP source systems the data is already in the internal format and is not converted. When loading flat files and when loading using a BAPI or DB Connect, the conversion routine displayed signifies that an INPUT conversion is executed before writing to the PSA. For example, the date field is delivered from a flat file in the external format‚10.04.2003’. This field can be converted in the transformation rules to internal format '20030410’ according to a conversion routine.

A special logic is used in the following cases: For numeric fields, a number format transformation is performed if needed (if no conversion routine is specified). For currencies, a currency conversion is also performed (if no conversion routine is specified). If required, a standard transformation is performed fort he date and time (according to the user settings). A more flexible user-independent date conversion is provided by conversion routine RSDAT.

Conversion routines ALPHA, NUMCV, and GJAHR check whether data exists in the correct internal format before it is updated. For more on this see the extensive documentation in the BI system in the transaction for converting to conforming internal values (transaction RSMDCNVEXIT). If the data is not in the correct internal form an error message is issued.

BI Content objects are delivered with conversion routines if they are also used by the DataSource in the source system. The external presentation is then the same in both systems. The name of the used conversion routines of the DataSource fields is transferred to the BI system when the DataSources are replicated from the SAP source systems.

Features

A conversion occurs according to the data type of the field when changing the content of a field from the display format into the SAP-internal format and vice versa, as well as for output using the ABAP WRITE instruction. The same is true for output using a BI system query.

If this standard conversion is unsuitable you can override it by specifying a conversion routine in the underlying domains. You do this in the BI system by specifying a conversion routine in InfoObject maintenance in the General Tab Page.

See Defining Conversion Routines for more technical details.

 

 

End of Content Area