cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate multiple records into 1 using addtl keyfigs

Former Member
0 Kudos

Hi Gurus,

Please take a look at this scenario.

I have 3 records coming from source system.

ex:

key dateid startdate enddate

c 1 d1 d2

c 2 d3 d4

c 3 d5 d6

i need to populate these 3 records as one into the infoobject based on dateid.

(dateid =1 then kf1=d1,kf2=d2;dateid =2 kf3=d3,kf3=d4 dateid = 3 kf1=d5,kf2=d6)

i added 6 key figures ( kf1 kf2 kf3 kf4 kf5 kf6) as attributes to infoobject.The final

record should look like the below one.

key kf1 kf2 kf3 kf4 kf5 kf6

c d1 d2 d3 d4 d5 d6

Could you pls give me some thoughts on how to do this in a better way.

Do i need to write update routine or just the formula in update rule is enough ??

Thanks in advance

-dooDle

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Doodle,

Ideally these kind of requirements can be achieved only thro start routines. Which u can create in the update rules.

You can create variables and assign values for the variables in your routines

Sajan

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

If you have created enough key figures, you can do like this.

When key = c, based on ID you can populate in respective objects.

By writing code from the above logic in start routine you can populate data into a single record.

Are you getting the data in 3 records and do you want to combine them into one?

On what basis you can differentiate multiple records?

Message was edited by: AVR - IGA

Former Member
0 Kudos

Hi Praveen&AVR,

Thanks a lot for the valuable info.

Was trying hard to get it done and so was the delay in response.

Pls let me know if u have any sample start routines (Update rules).

Thanks

Doodle

Former Member
0 Kudos

Hi,

The better way to do is to thru start routine in update rules. you can even do by writing an ABAP routine in Infopackage.

Former Member
0 Kudos

AVR,

could you pls explain more on this

Former Member
0 Kudos

Hi Ramesh,

The scenario you have mentioned looks really complicated reason being, maintainance.

Combining 3 records to one is possible in Start Routine. But it will be an expensive one.(I mean loopin)

Pseudo code:

LOOP AT DATA_PACKAGE.

Check which records satisfy your criteria and fill a Temporary table. The fields will be your entire record to be appended to the fact table.

Endloop.

Delete your Data Package.

populate the Temporary Internal Table onto the Data Package.

Hope it helps.

Regards,

Praveen.