Skip to Content
author's profile photo Former Member
Former Member

Simple question

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2008 at 03:27 AM

    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-91c40ee56c0b

    Thanks

    Swarup

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 20, 2008 at 12:00 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2008 at 07:43 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2008 at 09:40 AM

    Thanks all for the answers!!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.