cancel
Showing results for 
Search instead for 
Did you mean: 

user defined function

Former Member
0 Kudos

hi

how to defined user defined function ...i want to check some condition between two field..for that i need to create a user defined function...how to do it...

explain the detail step of it....i saw some blogs but i am not clear in it....

thx in advance...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

go to your message mapping and click the Create button enter the method name and description...enter the two argumetns..(these two are input parameters) and write the java code and return final value.

this java function you need to use between the source and target funtion..so that based on your input parameters java code will executed and return the value....that you are passing to the your target field.

Regards,

venu.

Answers (3)

Answers (3)

Former Member
0 Kudos

1. In the mapping screen at the bottom besides Functions: one icon is there like a paper, you click that one.

2. Then it asks the Lable means the name of that user defined function, if you want give some description.

3. Based on your requirement you select value(for general variables) or context(it is for errays).

4. Below you enter the variables as many as you want.

5. Click on create and write java code based on your requirement.

Former Member
0 Kudos

Hi,

Can you share your problem, may be you need not to go for UDF creation. Anyway for your future reference here are some links.

There are 2 types of UDF - Simple and Advanced.

Simple UDFs uses Value, wherein we can manipulate only one value (input is one String). Therefore a single string is expected as input and the output would also b a single string.

Advanced UDFs uses Context or Queue, where you manipulate many values (input is an array of Strings).

Refer this link:

http://help.sap.com/saphelp_nw04/helpdata/en/40/7b8e40496f6f1de10000000a1550b0/content.htm

Working with Contexts or Queues

http://help.sap.com/saphelp_nw04/helpdata/en/f8/2857cbc374da48993c8eb7d3c8c87a/content.htm

Value -


> is a value for the input parameter. It comes one by one.

Queue -


> it is an entire instance of XML message. That means, all the data will come in one shot.

Context -


> There will be a context change in the coming XML data.

Refer the following document which explains the differences b/w the various options with examples

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb...

http://help.sap.com/saphelp_nw04/helpdata/en/d2/58cd3b11571962e10000000a11402f/frameset.htm

Regards,

Sarvesh

justin_santhanam
Active Contributor
0 Kudos

PP,

Give us your condition, so that it will be easy for us to suggest.

raj.