cancel
Showing results for 
Search instead for 
Did you mean: 

User Defined Function

Former Member
0 Kudos

Hi All,

send me the differance between the three types of UDF's and if possible send me with an example ...

thanks

shakif

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello,

User Defined Functions are Visible only inside the <b>Message Mapping,</b>Contains 1)Label 2)Argument Count 3)Description

Contains two types of UDF

1) Simple UDF :

<b>Process individual field input for each function call.Expects only string input.Returns string.</b>

2) Adv UDF :

<b>Process non-single string field.Works on the whole queue .Input field is passed as string array.Returned values are stored in ResultList.</b>

With Regards,

Raju

*******Please reward points if found useful

Former Member
0 Kudos

Hi

Here i will give you one of the example which uses Advanced UDF

<b>for e.g.</b>

abcd#efgh#ghji~klm

<b>should result in</b>

abcd

efgh

ghij

klm

each in a different line.

besides I have a queue of such strings

Ans:

StringTokenizer st = null;

String var="";

for(int i=0;i<a.length;i++)

{

st= new StringTokenizer(a<i>,"#~");

while (st.hasMoreElements())

{

var =(String)st.nextElement();

result.addValue(var);

}

result.addContextChange();

}

Regards,

Ramana.

Former Member
0 Kudos

Hi shakif,

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 be a single string.

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

Regards,

Ramana.

Former Member
0 Kudos
Former Member
0 Kudos

additionally go through this

/people/venkataramanan.parameswaran/blog/2007/02/06/is-there-a-possibility-to-access-xi-standard-functions-in-user-defined-functions-yes

/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

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

/people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio

/people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi