cancel
Showing results for 
Search instead for 
Did you mean: 

Assignment Query

former_member283645
Participant
0 Kudos

Hello Experts,

I have 2 queries.

Case 1:

I have 2 fields where in if record in field 1 is updated then field 2 should write 'updated', if field 1 record is added then field 2 should have value 'New', and if Field 1 value is deleted then field 2 should have value 'deleted'.

Case 2:

Same as above requirment but Field 2 should update either YES/NO(Boolean) if field 1 is Updated or not.

Is it possible with SAP MDM Assignments, if so can anyone help me in this!!!

Kind Regards

Eva

Accepted Solutions (1)

Accepted Solutions (1)

former_member207367
Active Participant
0 Kudos

Hi Eva,

This can be achieved by creating New fields, follow the below process.

1) MDM Console:

Create New Fields in MDM repository with field types as Time Stamp and Create Stamp

Time Stamp: Set with the date and time each time any of the fields being tracked are updated.

Create Stamp : Set with the date and time when a record is created.

Fields:

FieldC with field type Create Stamp

FIeldT with field type Time Stamp

Choose the field Field1 under selected fields options in Field details for both newly craeted field in Console.

2) MDM Data Manger Assignment:

IF(IS_NULL(Field1),"DELETED",

IF(FIELDT = Updated ,"UPDATED",

IF(FIELDC = Created,"NEW")))

Updated and Created are the standard MDM Fields which holds the changes to a record. I did not check the assignment in the repository as i do not have access,above logic should work fine.

3) MDM Workflow

Create a workflow Start -> Assignment -> Stop with trigger Actions as Record Import and Record Update

Hope this helps you.

Thanks

Sowseel

former_member283645
Participant
0 Kudos

Hi,

I tried the Assignment ..

IF(IS_NULL(Merchandise_Catogary), "DELETED" ,IF(time_stamp=Updated, "UPDATED" , IF(create_stamp=Created, "NEW")))

Note: the last statement is IF THEN and NOT a IF THEN ELSE.

when i execute this assignment it writes "TRUE" for all the records..

Can anyone help me in fixing this..

KIND REGARDS

Eva

Former Member
0 Kudos

Hi Eva,

Please try the below Expression, It should work fine.


 IF( IS_NOT_NULL(TIME_STAMP) AND  IS_NULL(Merchandise_Category) , "DELETED",
  IF( IS_NOT_NULL(TIME_STAMP) AND IS_NOT_NULL(Merchandise_Category) AND CREATE_STAMP=TIME_STAMP, "NEW", 
       "UPDATED" )) 

Regards,

Mandeep Saini

former_member283645
Participant
0 Kudos

Thanks Mandeep, It worked.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Eva,

One more way to do this is using checkout/checkin in workflow.

Start step: checkout.

Assign step: call an assignment which will compare modified value with original record value.

Stop step: check-in.

Assignment expression may look like...


IF ( IS_NULL ( Original.Field1) AND IS_NOT_NULL (Field1), "New",
IF ( IS_NOT_NULL ( Original.Field1) AND IS_NULL (Field1), "Deleted",
IF ( Original.Field1 = Field1, "Unchanged", "Updated")))