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

Using a lookup for mapping program to retrieve the specific value

Hi All,

I have a scenario like …I need to use a lookup for mapping program to retrieve the specific value based on the input parameters.

Here I have got some rough idea like …

1. Creation of java program to connect the DB table and access the values, Import this java program as archive into XI.

2. Creation of user defined function to use the above java program

3. Include the user defined function in the interface mapping.

Here I feel it needs some more info to complete this scenario, so can anyone provide the step by step procedure for the above scenario.

Thanks in advance.

Vijay.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2007 at 09:46 AM

    Hi Vijay,

    Basically you have embed Database lookup code in the UDF. For all kind of Lookups refer to below links..

    Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

    DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

    SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0

    Lookup’s in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

    How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -

    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

    /people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api

    Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes

    Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm

    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi

    Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72

    /people/sravya.talanki2/blog

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14

    How we have to create the lookups?

    Check this weblogs with some screenshots on how to achieve this:

    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups

    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi

    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes

    Ranjeet Singh.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 19, 2007 at 07:53 AM

    no need to create a seperate java program....you have to put your java code inside the user defined function itself......

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 19, 2007 at 08:02 AM

    check this blog for DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 19, 2007 at 08:24 AM

    Hi Vijay,

    You need to use the mapping pattern Table/Value lookup.This lookup process is easily accomplished using XSLT, since we can navigate the XML document using absolute or relative " path " specification. In message mapping , there is no facility to navigate the XML document.

    In message mapping, we have to use the context of the different elements required for the lookup. A java function will be needed to perform the comparisions . and the matched value will have to be written to ResultList.

    Hope this will help you.

    Regards

    Aashish Sinha

    PS : reward points if helpful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 28, 2007 at 07:03 AM

    Hi All,

    Thanks for the great support, I have got the lookup for mapping program it is working absolutly fine..

    Thanks a lot for all the support.

    Thanks,

    Vijay Naredla

    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.