cancel
Showing results for 
Search instead for 
Did you mean: 

one to many record mapping

Former Member
0 Kudos

Hi All,

I want to have a doubt cleared.

I would like to ask if it is possible to increase number of records in a data package. For a particular key combination suppose i have 1 record and i am writing some code in transformation to make it for record and then want to update it to target.

Please let me know if this is possible??

Saurabh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi there,

Yes it is possible.

In the transformation on the start routine you make a copy of the entire data package to an auxiliary one.

You loop on the data_package and send your data to the aux one, if intendent you can append new records to the aux one.

After the loop, you delete the entire datapackage and loop on the aux one sending the data from the aux to the data_package (but now has more data appending in it).

Her's an example of the start routine code:


DATA line TYPE _ty_s_SC_1.
DATA t_aux TYPE TABLE OF _ty_s_SC_1.
DATA line_aux LIKE LINE OF t_aux.

LOOP AT SOURCE_PACKAGE INTO line.

" your logic in here
" append your record to the aux table
    APPEND line TO t_aux.

ENDLOOP.

" delete datapackage and sent the data from the aux table back to the data_package
REFRESH SOURCE_PACKAGE.
LOOP AT t_aux INTO line_aux.
  APPEND line_aux TO SOURCE_PACKAGE.
ENDLOOP.

Diogo.

Former Member
0 Kudos

Hi,

Thanks for your reply.

yes in BW 3.5 we can update using data_package, can we do it in BI7. And if so in start routine or end routine?

Former Member
0 Kudos

Hi again,

Yes you can do it in BI7 in both start routine and end routine.

See above I gave you an example how to do it in the transformation in the start routine. The logic is the same for the end routine.

For the start routine is beter if you want to have more data to be mapped in the transformation rules. If not you want to add more data that is already well mapped, you can do it in the end routine.

Diogo.

Former Member
0 Kudos

Hi saurabh,

yes in BI 7 , u can use source_package for create multiple records from 1 record.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Shaurabh,

Yes, it is possible to add records to the data package. You can do it with start and end routines of transformation.

Check this link:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321...

One other way to create new copies of your lines in the data package is using the transformation group logic. For this check:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/905e3416-d6d8-2b10-78bd-ac22c4b6...

Hope it helps.

Thanks.