cancel
Showing results for 
Search instead for 
Did you mean: 

User defined Function in Expression.

Former Member
0 Kudos

Hi

In Calculation expressions dialogue box we have an option called function there I can see a function with name MDM CALCULATE FULL NAME that is integrating the the Fields first name and second name. I feel its a user defines function in our MDM.

My question is how to create a user defined function and where to see the user defined functions and its logic.

Regards,

Venki.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Venki,

This is not true, you can not define user defined function. you can only use logic by making use of Available functions.

Note: In your case, MDM CALCULATE FULL NAME is a callable function not user defined function. I mean suppose you create a validation using some logic in Validation Expression. You have there property Callable. If you want to make use of this validation logic in some other validation expression too, you set there as callable = yes which result is available of this validation in Validation Expression under Functions Tab in the end. So in this manner instead of writing your logic again you can call that validation logic in other validation expression and then make use of this validation expression. So this is some sort of re-usability of validation expression in other validations if required. You can see the logic in MDM CALCULATE FULL NAME validation which should be created under your Validation tab.

Regards,

Mandeep Saini

former_member205403
Active Contributor
0 Kudos

Hi,

I totally agree with Mandeep. "Callable" property of Validation means whether the expression of any validation should appear in the drop-down list of functions so that is called/reused by other validations. If you define any validation as callable, then it will appear in the list of functions. But It never mean that it is user defined function.

I am sure that you can not define your own functions in MDM data manager Expression Editor.

Regards,

Shiv

Former Member
0 Kudos

Hi All,

Thanks for information .Yes The function is present in validations tab.

In my case for one of the field they have assigned a caluclated expression and is using the callable function to automatically populating data in this read-only field.

The logic in the callable function(MDM CALCULATE FULL ADDRESS ) under validation tab is

if(is_not_null(Street),Street&" ","")&

if(is_not_null(City),City&" ","")&

if(is_not_null(Country.Name),Country.Name&" ","")

And the field data is populating with street city Country

My doubt here is, As per the guide MDM validation returns boolean value(True/False) but here how is it returning street city Country.

Regards,

Venki.

Edited by: venki abc on Apr 16, 2010 7:29 AM

Former Member
0 Kudos

Hi Venki,

Your understanding is correct that validation should return true or false. But since this validation (callable function) is being used in Assignment Expression rather than Validation Expression, It is returning you Street, Country and City.

Go to your Assignment Tab. Check the assignment where this expression is being used to populate Assignment. Since Assignment does not have any property Callable. So this logic written in validation MDM CALCULATE FULL ADDRESS is being used in some assignment expression to populate field as we have there property Assignment Field to set the field which we want to populate using assignment expression logic.

Note: You can use Validation with Callable = Yes under both validation and Assignment expression. It becomes available in both Validation expression as well as assignment expression under Function tab in the end.

Regards,

Mandeep Saini

Former Member
0 Kudos

Thanks mandeep for clarifying the doubt.

Regards,

Venki.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Venki,

In MDM we can define our own functions by through validation Expression.

Define a validation with the required condition and enable its callable property. Then you can call the condition whenever you want from the functions tab of expression editor.

Thanks

Ravi

Former Member
0 Kudos

Hi Venki

MDM CALCULATE FULL NAME must be a callable function already defined.

For more details on how to cretae callable validations in MDM please refer to Data manager reference guide.

You can also read following link-

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

best regards

Ravi