|
Blogs
Writing an ExpressionSAP MDM product calender starts from 1/1/1600. So Date counter starts from 0 on 1/1/1600. As you know MDM Console does not provide any functionality to set default value in a Date field. But you can achieve this using an assignment expression in Data Manager. I would not talk about how to make a date field in MDM Console and run an assignment in Data manager. Lets take an example to set a default value of 1/1/2000 in a date field. You just need to write an expression on the basis of below given formulas: Total Number of Year = Year given in default value - 1601. i.e. 2000 - 1601 = 399. Now, consider number of Leap years as well = 399/4 = 99 Years So, Total Number of Days = (99 * 366) + (300 * 365 Make an assignment on Date field and write the number of calculated days in the expression. Note: Sometimes you need to adjust the value by +/- 5 days from the actual calculated days. Run the assignment on a record in Data Manager. You will get the desired result. I hope this blog will help to set default value in MDM Date fields as per the business requirements. Alok Sharma Alok is a SAP MDM and PI Consultant working with Capgemini India Pvt Ltd. Add to: del.icio.us | Digg | Reddit |