cancel
Showing results for 
Search instead for 
Did you mean: 

MDM Validation on the whole table data - Please help

Former Member
0 Kudos

Hello Experts,

I am a new to MDM validations. So I want to know approach for validations like below. Say I have a Employee Table with fields

RecordID | Emp. Number | Name | Unit | Date Join | Date Resign

Validation requirements are

1. Say in case employee resigns and joins again there is going to be new entry added. In this case 'Date Join' should be greater than 'Date Resign' of previous record of his.

2. Employee should be assigned to only one 'Unit'

3. Employee number can not be duplicate. etc

Is this possible with validation within Data Manager? Your help/links/pointers are very much appreciated.

Thanks.

Edited by: Sagar Lipare on Apr 14, 2010 1:51 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sagar,

You can manage all of these using MDM Data Manager:

1) In this case 'Date Join' should be greater than 'Date Resign'.

Write a validation expression as below which means Date Join is oldest date and Date Resign is latest date

Date Join < Date Resign

2) Employee should be assigned to only one 'Unit'

As unit has not many in your case. I mean unit can be set as Flat Look-up table say UNITS which contains all of your unit values.

Now a field in main table Unit is Single look-up flat to this Flat Table UNITS. By single look-up flat i mean you set this field property Multi-Valued = No while defining this field in your main table of MDM Console. So this will take care that only one unit is assigned to your Employee. As you can select only one unit from drop down list from main table using MDM Data Manager.

3) Employee number can not be duplicate

For this field in Main table of console set this field property Unique Field = Yes

Regards,

Mandeep Saini

Former Member
0 Kudos

Hi Mandeep,

No. I think there is some misunderstanding in our understanding. Sorry if I was not clear.

Requirement 1. Needs to compare more than 1 record of the table. So 'Start Date' of 2nd record of the same employee should be greater than 'Resign Date' of previous record of the same employee. This is NOT date comparison of same record.

Requirement 2. Is also similar. Say when you add 2nd record for employee (for some XYZ reason) I need to check if Employee record exists and if YES then what is the UNIT and then ALLOW or NOT ALLOW the new record for that UNIT.

(I cant do this with primary/unique keys, this is just an example)

So overall the requirement is to compare previous records and their values. I want to know if this can be achieved by validations within Data Manager and how.

Look forward for your reply.

Thanks,

Sagar

Edited by: Sagar Lipare on Apr 14, 2010 6:54 PM

former_member205403
Active Contributor
0 Kudos

Hi Sagar,

As I said, i doubt if your first two requirements can not be fulfilled using standard MDM data manager validations.

In case you are using portal, for creating a new record you can fetch and compare new record data with other records in MDM for same employee and can throw error as per your validations.

Please check [MDM JAVA API guide |http://help.sap.com/saphelp_nwmdm71/helpdata/en/72/d36e1ed3ce43028adc851b8fed5668/MDM_Java_Net_API_Guide.pdf]from page no 30 to 33 for explanation and code sample for creating a new record and retrieving existing records from MDM using Java API.

Hope this helps. Kindly revert if you have any query..

Regards,

Shiv

Former Member
0 Kudos

Thanks a lot Shiv. I will wait for couple of more days before closing this. Appreciate your help.

Former Member
0 Kudos

Hi Sagar,

I got your requirement, I would like to add here that this kind of requirement is easily achieved if you are using Portal, BPM(Business Process Mangement) and BRM(Business Rule management) in your Landscape.

Using BPM you can run a workflow in such a better manner that you can check duplicate records before creating record through portal and using BRM you can run complex validations (i mean you can here easily check what is the unit assigned to same employee and i think may be you can also check that "start date" of 2nd record of the same employee should be grater than "resign date" of previous record of the same employee.

Please have a look into some scenarios where they have used BPM, BRM and Portal. Refer page (15 to 22) / 33

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50f1c01b-972d-2c10-3d9d-90887014f...

Hope this will give you better insight into your requirement.

Regards,

Mandeep Saini

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sagar,

from my understanding you could run a validation comparing the two dates in MDM if these records are somehow linked, i.e. by either a relationship or a main table lookup from the record to be validated.

Maybe that helps.

Best regards

Christian

former_member205403
Active Contributor
0 Kudos

Hi,

I doubt if your first two requirements can be fulfilled using standard MDM data manager validations because it requires to compare two or more records. But in case you are using, Portal for data entry then definitely you can achieve this using APIs.

For third requirement, "Employee number can not be duplicate. etc", you can define employee no field in MDM Console as UNIQUE. A Unique Field for a table is a field that must contain a unique value for each record, or in the case of a Unique Field combination, the field combination whose combined values must be unique for each record.

So, if you define Employee number field as unique in console, it won't allow duplicate entries.

To define unique field on any table, follow below mentioned steps:

1. In the Console Hierarchy tree, select the applicable MDM repository.

2. In the Tables pane, select the applicable table. (Employee in your case)

3. In the Table Detail pane, double-click on the Unique Fields property and add the required fields (Employee number in your case

Hope this helps.

Regards,

Shiv

Former Member
0 Kudos

Thanks Shiv. Do you have any examples of how to use APIs for validation?