cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a field unique accross two or more tables?

Former Member
0 Kudos

Hi Experts,

We have a requirement where we need to establish uniqueness for accross two fields of two different tables.

Consider the following example:

Table Table1 has Field Field1 and Table Table2 has Field Field2.

Table1>Field1 have the following values:

Mnum_1

Mnum_2

Mnum_5

and Table2>Field2 have the following values:

Mnum_3

Mnum_4

Mnum_6

Now we need to have the uniqueness defined in such a way that, adding Mnum_1 into Table2>Field2 should violate the constraint. And simillary adding Mnum_3 into Table1>Field1 should violate the constraint.

We should be able to add a new value, say Mnum_7, into either of the column, but after adding into one, we should not be able to use the same value into the other table.

We are using SAP MDM 5.5 SP06.

Please let me know if this is possible and how. Even if we could define it using some valiation it would be helpful.

BTW, Table1 is the Main table and Table2 is a Look Flat table.

Thanks in Advance.

Regards,

Uday

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Udya,

It is not possible to fulfill this requirement.

Regards,

Jitesh Talreja

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ravi,

Thanks for the response. We have been using the application since quiet some time and changing the data model is not an option. This change request for uniqueness is new.

The master data is created in this application only and not imported from anywhere. Hence external validation is not possible.

You had mentioned about adding some additional field on uniqueness. Could you please detail your idea as to how to maintain uniqueness?

Thanks & Regards,

Uday

Former Member
0 Kudos

Hi Uday

this is not possible. Unique keys are defined for a table and we cant link this definition across different tables.

Even Validations work at atable level hence we can not check for the unique key violation using validations as they are in two diff tables.

consider introducing 1 more field in table1 or 2 for defining the uniqueness may be or revisit the data model.

Otherwise this can be controlled outside MDM. How are you maintaining values in these 2 tables- manually or via import. If this is via import and say the source files are excel then this can be checked in the excel sheet itself.

best regards

Ravi