cancel
Showing results for 
Search instead for 
Did you mean: 

Transformation Logic using Number Ranges in SAP BW

0 Kudos
823

Hi Team,

Identify SAP function, which allows creation of CHAR 10 value in number range. This means function creates unique combinations of data type CHAR with length 10 one after the other.

We want to use function in ABAP coding of Transformation in BW dataflow (normally in first processing between DataSource and aDSO).

SAP number range transaction SNUM = SNRO

and Function Module NUMBER_GET_NEXT

Create logic to replace ERP key by BW internal key. This logic has to be coded in ABAP cause coded logic will be part of Transformation in BW dataflow (normally in first processing between DataSource and aDSO).

Core of logic is IF-ELSE-ENDIF decision.

IF part shall contain search for combination of Object, ERP key and Source System ID in separate table to find already assigned BW internal key and copy BW internal key in corresponding InfoObject in record of dataflow. In case BW internal key is found, additionally separate table needs to be updated concerning start date with current date of system.

ELSE part (combination of Object, ERP key, and Source System ID is not in separate table) create new BW internal key of Object with number range function, copy BW internal key in corresponding InfoObject in record of dataflow and to new record is separate table with combination of Object, ERP key, and Source System ID plus BW internal key and plus current date of BW system as start date of retention period.

In best case logic is defined and stored in a way, which allows reusing in many transformations with different Objects (Customer, Sales Order Document, Sales Invoice Document, and others – all ERP key with data type/length CHAR 10).

And of course, performance is crucial aspect cause we are talking about millions of records, which have to be processed in parallel and containing maybe even multiple Objects in each record (for example record with invoice document can contain additionally order document, delivery document, and 3 customer ids of bill-to-party, sold-to-party, and ship-to-party.

  • Control table with keys are required in DDIC:
  • key fields of table
    Object CHAR 4, ERP key CHAR 10 and source system CHAR 3
    data fields of table
    BW internal key CHAR 10, start date = last loading date DATS 8, retention period in days INT4, deletion date DATS8, country CHAR 2

Could you please help me to create a Number ranges and provide the Transformation Logic for the same.

Thanks,

Suresh

Sandra_Rossi
Active Contributor
0 Kudos

There are all the answers you are looking for in the forum. I don't get what is your issue?

Accepted Solutions (0)

Answers (0)