cancel
Showing results for 
Search instead for 
Did you mean: 

Simple question

Former Member
0 Kudos

Hello all,

I have a little and esay question :

In XI, what is a UDF ( user defined fonction ?) ? what the difference between UDF and java mapping ?

Do you have a link or document which explains how to use it plz ?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

UDF's are user defined functions,there are broadly two types of UDF,simple UDF which takes in one input and gives out one output,and the second one is advanced UDF where in u can access more than one fields,and the result is passed on to ResultList.

as they are not system defined there is no list of UDF,u can create a UDF and give it any name u want to give.

See the below link for details

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

/people/william.li/blog/2008/01/02/sap-pi-71-mapping-enhancements-series-share-user-defined-functions

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

Java Mapping:

The message is transferred to a Java program as an inbound stream and can be imported using any parser (for example, SAX or

DOM). The modified message is then transferred to an outbound stream.

A Java program can also be a help program that in turn is used in another Java program or self-defined functions of a message mapping.

/people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi

/people/venkataramanan.parameswaran/blog/2006/12/12/java-mapping-to-handle-flat-files-in-sap-xi

/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii

https://www.sdn.sap.com/irj/sdn/advancedsearch?query=javamappingin+XI&cat=sdn_all#

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee5...

Thanks

Swarup

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks all for the answers!!

Former Member
0 Kudos

Hi Merlin,

We use UDF & Java mapping during desingning part of the interface ie (integration-repository)

If the standard functions for a target field mapping do not fulfill your requirements, or if the graphical representation becomes unclear due to the complexity of the mapping, you have the option of creating your own user-defined functions. You can create Java source text in this function. The function is included in the Java coding that is generated for the message mapping as a Java method.

there are two types of user defined function

1)simple.

2)advanced.

Simple functions, ...which can process individual field input values for each function call. Simple functions therefore expect strings as input values and return a string.

2._ADAVANCED FUNCTION:..* which can process several field input values for each function call. You can import either all field values of a context or the whole queue for the field in an array before calling the function. For more information, see Advanced User-Defined Functions.

All details for user-defined-function is given in link below

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

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

ABOUT JAVA MAPPING

Java Mapping is one of the mapping techinuqe which xi supports,

There are few steps which you need to follow while doing java mapping.

Steps:

1)you need to use any parsing Technique either DOM Or SAX.

2)Develop your java class with out main method in Netweaver Developer stdio.

3)Need to create a jar file in the Cmd(commond line promot.

Commond for creation of jar cf name.jar filename.class

4)import your jar file in to IR.you can see Imported Objects under software component.Right click on the Imported Object and select New and enter the name and browse your jar file and select the corresponding jar file which you created and click save and activate.

5)when you are doing Interface Mapping you need to select as Java calass and select the Mapping program and after the process is same as normal.

see below link

/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio

Regards

Azeez khan

former_member240483
Contributor
0 Kudos

when graphical maping functions not fulfilling your requirement we create UDF's and use them \in graphical mapping...

Java mapping replaces mesages maping and used as a maping in the interface..

UDF's and Java mapping are dev eloped in java code.

Regards

Rao