cancel
Showing results for 
Search instead for 
Did you mean: 

Get latest record based on date to avoid duplicate records

former_member398742
Participant
0 Kudos

Hi Everyone,

I am trying to load 0COSTCENTER master data from BW to BPC Dimension but it throwing duplicate records error.

Yes,I've duplicate records in my Info objects but there are two attribute Valid from and Valid to, These values are different for each record.


Please see the below ss on the same.


So how i can load latest record which contains latest Valid from and Valid to values? As per Snap shot the latest record is third one right?

Can you please guide me on this. Thanks in advance!

Regards,

Vishu


Accepted Solutions (1)

Accepted Solutions (1)

former_member200327
Active Contributor
0 Kudos

Hi Vishnu,

What Package are you using to load that data?

In standard Package for load of MD there is a Key data which is usually current date. This way load selects a record that is valid for today. If you don't want such record, but want the latest, set that date to the far future, like 30.12.9999.

Regards,

Gersh

former_member398742
Participant
0 Kudos

Hi Gersh,

I am using standard DM Package " /CPMB/IMPORT_IOBJ_MASTER ".

If i am trying to set Key date to 31-12-9999 automatically year is changing to current year 2015.

Please see the below Snapshot and please let me know if i am doing wrong.

-Vishu

former_member200327
Active Contributor
0 Kudos

Hi Vishu,

Can you try selecting some later date from the calendar that you have in drop-down? If you select anything later than 01.07.2014 you should be fine for now.

Gersh

former_member398742
Participant
0 Kudos

Hi Geresh,

Thanks for prompt replay.

I am able to set different date than current year except year 9999. Please see the below SS.

Data is available in Costcenter as below in SS.

So I may need to set key date to 31.12.9999 right? other wise i will get duplicate record error during loading?

-Vishu

former_member398742
Participant
0 Kudos

Hi Geresh,

I found the issues. actually the issues was because of duplicate records not with key date.

Thanks for your help.

-Vishu

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vishu,

You can't select the valid to date in the set selection, you need to use end routine in your transformation file to filter your data.

you need to write a routine BADI.

Andy

former_member398742
Participant
0 Kudos

Thanks andy.

Do you have any sample code that i can achieve this requirement.If yes can you please pass me.

Thanks in advance!

Regards,

Vishu

Former Member
0 Kudos

Hi Vishu,

Have a look at this document.

Let me know if you need more info.

Andy

Shrikant_Jadhav
Active Contributor
0 Kudos

Hi Vishu,

You can filter it from "Set Selection" while loading the data.

Shrikant