Show TOC

Conversion Routines in the BW SystemLocate this document in the navigation structure

Use

Conversion routines are used in the BW 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 BW system are now described.

Integration

In the BW system, conversion routines essentially serve to simplify the input of characteristic values for a query runtime. For example, for cost center 1000, 1000 is entered instead of the the long value with leading zeros 0000001000 (from the database) is not to be entered. 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 BW system at replication, and one that is defined in the BW system or was already defined for BW 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 BW 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 data in PSA.

In many cases it is desirable to store the conversion routines of these fields in the corresponding InfoObject on the BW 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 BW 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'. In the transformation rules, this field can be converted 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 for the date and time (according to the user settings). Conversion routine RSDAT offers a more flexible user-independent date conversion.

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 BW 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.

BW 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 conversion routines of the DataSource fields that are used is transferred to the BW 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 BW 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 BW system by specifying a conversion routine in InfoObject maintenance in the General Tab Page.

See Defining Conversion Routines for more technical details.