cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a userdefined function for the mapping?

Former Member
0 Kudos

Hi All,

1. How to create a userdefined function for the mapping?

2. Where do we have that option to create the userdefined function?

Regards

Sara

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Sara,

In the mapping editor, where you select different function like node, boolean etc you will have an option in the dop down box called , "User Defined Function".

Select this and then you will get a new option at the bottm left corner , click on this and you have wrtie your UDF here.

http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm

Regards

Bhavesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

You have the option of creating a user mapping in the message mapping screen .At the bottom left corner uhave an icon select the type of function(simple or advanced) and then ....specify the label argument and desccription and start the codding...

Former Member
0 Kudos

Hi,

Do we have option to edit the userdefined function?

Regards

Sara

Former Member
0 Kudos

Hi All,

I got it.. Thanks for the informations.

Regards

Sara

Former Member
0 Kudos

Of course we do. The forst time you create a UDF, it will in edit mode by default.

If you have saved and activated it, you can go to edit mode and select the category UDF and select your UDF and in the right you have a menu to edit or delete your UDF. Only the message mapping needs to be in edit mode.

Regards,

Jai Shankar

bhavesh_kantilal
Active Contributor
0 Kudos

You sure can.

Just like I pointed above, Select User Defined Function in the list if functions in message mapping.

After you do this, the user Defined functions will be displayed . Select the UDF, and you will have an option Edit Function to edit the Udf.

Regards

Bhavesh

deviprasad_pothireddy
Active Participant
0 Kudos

Hi Sara,

Also ref

Simple java code in graphical mapping - XI

/people/michal.krawczyk2/blog/2005/02/25/simple-java-code-in-graphical-mapping--xi

Regards,

Deviprasad.

former_member335553
Active Contributor
0 Kudos

HI

Writing use defined functions in XI is quite simple. Create a simple UDF, give the import parameters and then just go ahead with the logic coding and then return the output from the UDF.When you create a new user defined function, you give it a name (label) and a description. Then you select which type of function you want to create. A value function is the simplest one that lets you take an input and return a value. There is an arguments frame in the New Function window. You press the insert line button to add additional arguments, and then when you press Create, the arguments that you entered become the variables in your function

Just remember that all inputs and outputs to an UDF are always Strings

Check the Teched 2004 presentation of our mapping gurus:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e...

This link for User Defined Functions,

http://help.sap.com/saphelp_nw04/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm

please see the below blog for user-defined functions:

http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/frameset.htm