cancel
Showing results for 
Search instead for 
Did you mean: 

Change of double index row with routine

Former Member
0 Kudos

Hi all,

my problem is the following:

a datasource (transaction data, flat-file) contains non-unique records (in terms of the ODS).

my idea is to update an aditional attribute (as another key-field in the ods) of all multiple records.

the attribute should be filled with a continuous value, depending on the number of multiple entries.

e.g.:

<b>id1 id2 id3 attribute (automatic value as key via routine)</b>

...

10 10 10 1010

10 20 10 1010

10 20 20 1010

<b>10 10 30 1010

10 10 30 1020 1st multiple entry

10 10 30 1030 2nd multiple entry

</b>...

the routine should be identifying the multiple records and automatically set the value for the new key-attribute.

any idea?

regards

stefan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

add an additional InfoObject to the comm str, let's call it comb_key (combined key). Use this as the additional key on the ODS.

And in the start routine:

data: l_counter type numc.

loop at data_package.

l_counter = l_counter + 1.

concatenate id1

id2

id3

l_counter into data_package-comb_key.

modify the current record in data_package.

endloop.

Kumar Gudiseva.

Former Member
0 Kudos

Hi Stefan,

Do remember that, you are storing REDUNDANT data in the ODS before you start working on it. If this is a req. then you need to populate the value of the recurring KEY FIELD in the UPDATE RULES.

or

The other option would be using it in the normal routine, but ensuring that there is a value prestored in memory.

Eg:

Try placcing it in memory ID.

EXPORT X FROM X TO MEMORY ID 'ABC'.

Ensure you always check that it is in mem. if you fetch it and place it in mem. again.

Regards,

GPK.

Former Member
0 Kudos

Hi GPK,

i'm sorry, but i don't understand your answer. maybe it's because i've not been clear with my problem ...

the data is not redundant. it's like that because the data from the source system (flat file) does not contain enough information (infoobjects/attributes) to retrieve unique records.

so my intention is to fill another infoobject with data through a routine to create unique records.

the routine should be identifying the record(s) that have identical keys and assign different values for that infoobject.

thanks and regards

stefan

Former Member
0 Kudos

Hi,

Is it possible that, the team responsible for the FLAT FILE provide you with that information. If not, is it possible that, you could populate the KEY Fields value in a routine or so.

If the Key Fields are same as ones already in the ODS, depending on your UPDATE method they get (ADDITION / No UPDATE / OVERWRITE). This is available for the Key Figures with the ODS.

Check it out.

Regards,

Gpk.

Former Member
0 Kudos

Hi,

it's more that the source system doesn't provide data for that infoobject. so i need to fill it myself as else the record will be overwritten (need to set to overwrite).

so any idea on a routine that identifies records with multiple key-fields and fills the infoobject that hasn't been filled so far?

regards

Stefan

Former Member
0 Kudos

Hi,

You need to code that. There is none. You need to ensure the req and code that as stated in the previous message.

Hope it helps

Please don't forget to award points. Thats the way to appreciate the person helping you.

Regards

GPK.

Message was edited by: Praveen