cancel
Showing results for 
Search instead for 
Did you mean: 

User Defined Java Fun.

Former Member
0 Kudos

Hi,

Any one defined Custome Java Function in XI?

Can you give me some example of what you guys implemented?

Thanks

VG

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Venkat,

The simplest Java function that I have ever written in Graphical Mapping, was a UDF to return the XI server's date and time, and mapped it into an IDOC.

Hope I have answered your question.

cheers

Prashanth

P.S Please mark helpful answers

Former Member
0 Kudos

Hey,

Tq for faster reply.

points alloted.

VG

henrique_pinto
Active Contributor
0 Kudos

For simple UDFs (cache = value), you can have a creation UDF, which creates a value and has no input, which you use for reading machine time, for example (but it'd be better to use currentDate standard function); or you can have transformation UDF, which have one or more inputs (of string type) and an output (also of string type), which you point to your target field.

The basic difference between them is that for one you have parameters which you can use on the function scope and for the other, you don't have parameters. But on both you'll have to return an object of string type.

For advanced UDFs (cache = context and cache = queue), it's a little more complicated. Check out this link: http://help.sap.com/saphelp_nw2004s/helpdata/en/22/e127f28b572243b4324879c6bf05a0/frameset.htm .

Regards,

Henrique.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Venkat,

You mean, writing a simple UDF?

See these blogs..

<a href="/people/michal.krawczyk2/blog/2005/02/25/simple-java-code-in-graphical-mapping--xi">Simple java code in graphical mapping</a>

<a href="/people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio User Defined Functions</a>

https://websmp102.sap-ag.de/~sapdownload/011000358700003604872004E/MappingXI30.pdf -- Go through this to see how you can use both simple and advanced UDF's

http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm --- Another Help document on UDF's in XI

Hope this solves ur problem!

cheers

Prashanth

P.S Please Mark Helpful answers

Former Member
0 Kudos

Hi prasanth,

tq for reply.

Can you give one example for UDF you did?

tq

VG