+++> 5. Alpha Conversion Routine Scenario

 What is the "ALPHA conversion" about?

A characteristic in SAP NetWeaver BI can use a conversion routine like the conversion routine called ALPHA. A conversion routine converts data that a user enters (in so called external format) to an internal format before it is stored on the data base.
The most important conversion routine - due to its common use - is the ALPHA routine that converts purely numeric user input like '4711' into '004711' (assuming that the characteristic value is 6 characters long). If a value is not purely numeric like '4711A' it is left unchanged.
We have found out that in customers systems there are quite often characteristics using a conversion routine like ALPHA that have values on the data base which are not in internal format, e.g. one might find '4711' instead of '004711' on the data base. It could even happen that there is also a value '04711', or ' 4711' (leading space).
This possibly results in data inconsistencies, also for query selection; i.e. if you select '4711', this is converted into '004711', so '04711' won't be selected.

Why is the "ALPHA conversion" necessary?
In such a case, a number of problems can arise in reporting like wrong values of key figures, no data found for certain filter values... The "conversion of internal characteristic values", in short term: "ALPHA conversion", is a transaction (transaction code RSMDCNVEXIT) that checks the format of all values of characteristics that use one of the conversion routines ALPHA, GJAHR and NUMCV. If values are found that do not have the correct internal format it can replace them by correct value and update all dependant SAP NetWeaver BI objects (like InfoCubes, Hierarchies, master data of other characteristics...).
This transaction potentially has to touch a very significant part of all the data in SAP NetWeaver BI. While running the check or conversion phase of RSMDCNVEXIT no data loads of any kind are possible; the conversion part of it cannot be interrupted. Therefore you should never start the conversion part without having thoroughly read the documentation.
We recommend to run the conversion as soon as possible.

Where do I find detailed information?
The "ALPHA conversion" transaction RSMDCNVEXIT has online documentation which you reach via its "Help" button.
OSS note 447341 is about the ALPHA conversion in general and has attached to it a number of other OSS notes describing solutions to known problems.

What are the prerequisites for the "ALPHA conversion"?
Before running ALPHA conversion, apply SP 26 (2.0B) resp. SP 18 (2.1C) resp. SP 11 (SAP BW 3.0A).
If you have large ODS Objects (> 50 mio records in all) we recommend to apply Support Package 27 (2.0B) resp. 19 (2.1C) or the coding correction of OSS note 548122.
If you are unsure if the conversion has already been executed in your system (in a SAP BW 3.0A system it probably has already been done during the upgrade to SAP BW 3.0A) start transaction RSMDCNVEXIT and look at the system status: if it says "All characteristic only have correct internal values" you do not need to run it. We recommend a database backup before you run the transaction.
If you have strong reasons not to apply the named support packages, please note that you can run the ALPHA conversion starting from SP 22 (SAP BW 2.0B) resp. SP 14(SAP BW2.1C). If your support package level is strictly smaller than 25 (SAP BW 2.0B) resp. 17 (SAP BW 2.1C) you have to apply the coding correction of OSS note 528381. If you have SID tables with more than several millions of records you have to be on SP 25 (SAP BW 2.0B) resp. 17 (SAP BW 2.1C) and also apply a correction described in OSS note 543482.

What effects does the "ALPHA conversion" have on my SAP NetWeaver BI system?
No data loads are possible while the transaction is checking or converting.
Once the conversion part has been started the conversion has to be completed. The system is in an inconsistent state in the mean time!

How long does the conversion take?
Usually, the alpha conversion requires between 3 and 20 hours for production systems. For very big systems (>1TB) , it could also take up several days. From our experience, the most decisive factor for the duration is the size of the ODS objects. As a rough rule of thumb, approximately 2.5 mio. Records per hour can be converted within ODS objects (status SAP BW 2.0B SP 27 resp. SAP BW 2.1C SP 19). To improve the conversion for ODS objects, keep the change log small (i.e. delete old entries) because all change log records will be converted, too. Furthermore, the size of the master data tables (which include characters with one of the ALPHA, NUMCV or GJAHR conversions) has impact on the runtime of the upgrade.
As of SAP BW 2.0B SP 29 resp.SAP BW 2.1C SP 21, ODS objects can be converted in parallel. Please see note 559524 for details how to set up this parallelism.
As of SAP BW 2.0B SP 29 resp. SAP BW 2.1C SP 21, transaction RSMDCNVEXIT is enhanced by a workload estimate. This preliminary check lists all characteristics, database tables and the size of the tables that will be converted during the alpha conversion. Furthermore, possible meta data inconsistencies are found and the possibility of aborts during the conversion is reduced.
During the conversion process, you can check the state of the conversion in the log.
This estimate can be executed without locking the system. We recommend to run it before starting the conversion.
Please see the enhanced online help in transaction RSMDCNVEXIT for more details.

What is the interrelation between a SAP NetWeaver BI upgrade and the "ALPHA conversion"?
During the prepare phase of an upgrade to SAP BW 3.0B it is checked that the "conversion of internal characteristic values", also called "ALPHA conversion", has been successfully completed. This "ALPHA conversion" is time-consuming. Therefore we strongly recommend to separate this conversion from the actual upgrade process.

Scenario:
Flow: DS -> Cube


Here if we observe, the source field is not having conversion routine, but the target field is having conversion routine.

Here we are enhancing few fileds by reading from “F1QMO0400 - Record Defect – Item” DSO with the key fields of this DSO(which are the fields in the where condition in the below code) and the fields from the data source with the below mentioned where conditon:

FROM /BIC/AYF1QMO0400
         INTO TABLE IT_PM1
        FOR ALL ENTRIES IN SOURCE_PACKAGE
        WHERE INSP_LOT = SOURCE_PACKAGE-PRUEFLOS and
              PRODORDER = SOURCE_PACKAGE-ZZAUFNR and
              /BIC/ZCAT = SOURCE_PACKAGE-ZZCATEGORY and
              /BIC/ZDEFEC = SOURCE_PACKAGE-ZZDEFECTNO and
              /BIC/ZCODE = SOURCE_PACKAGE-ZZCODE and
              /BIC/ZCGRP = SOURCE_PACKAGE-ZZFEGRP and
              /BIC/ZFECOD = SOURCE_PACKAGE-ZZFECOD.

Note: 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.


The value in the look up DSO for “/BIC/ZDEFEC “ field is in converted formate, where as the field “SOURCE_PACKAGE-ZZDEFECTNO” from Data source is in internal formate as it is not yet loaded to any target. So here the wehere condition is not mathcing and it not stamping the values to the enhanced fields.


1. ALPHA Conversion Routine
Use
The ALPHA conversion is used in the BW system for each presetting for character characteristics. The ALPHA conversion routine is registered automatically when a characteristic is created. If you do not want to use this routine, you have to remove it manually. The ALPHA conversion routine is used, for example, with account numbers or document
numbers.
Functions
When converting from an external into an internal format this checks whether the entry in the INPUT field is wholly numerical, whether it consists of digits only, possibly with blank spaces before and/or after. If yes, the sequence of digits is copied to the OUTPUT field, right-aligned, and the space on the left is filled with zeros (‘0’). Otherwise the sequence of digits is copied to the output field from left to right and the space to the right remains blank. For conversions from an internal to an external format (function module CONVERSION_EXIT_ALPHA_OUTPUT) the process is reversed. Blank characters on the left hand side are omitted from the output.
Example
Input and output fields are each 8 characters long. A conversion from an external to an internal format takes place:
..1. '1234 ' _ '00001234'
  2. 'ABCD ' _ 'ABCD '

Problem Part:
Data in PSA:
Below is Look up DSO data:
As the Inspection lot is “NUMC”, no converison routine.

But where as for Devefec no., conversion routine exists:

The length is 4 but where as the data exists is with length 1, so it is padded with 3 Zeros in left side.  Threfore the wehere condition is failing.


Resolution:

Changing the data flow, as the transformations take place directly from data source the conversion routine is not happening as a result condition is failing. So we have to map b/w target to target.

Old flow: DSCube
New flow: DS DSO Cube

 

Now the source is DSO.