DB lookup response mapping

My question is actually really simply,
Suppose I have a UDF and I want to make a
SELECT name, last_name FROM employee WHERE id = id1
the input is id1 but how do I deal with two outputs when the result can only be 1 string?
I could save it to a global container, but the question is at the end how to map it to the response, or what am I not understanding here?
(without using Graphical JDBC lookups)
request                              response
msg                                  msg
id1---> UDF --->name  -
>  name
                ->last name-->  last name
Thanks a lot!

JDBC Graphical lookup is user friendly.  You can avoid these problems.
In your case, YOu return single string.  suggestion.  Concatanete first name and last name using separtor and return as one string.  After return use some standard java function to split the string in to first and last name.
Snippet code
// in your jdbc udf
String concat=firstName+":" +lastName;
return concat;
When you map the string to target fields ...
Create UDF or use text functions to achieve this
int pointer = concat.indexOf(":");
firstName = concat.substring(0, pointer);
lastName = concat.substring(pointer+1);

Similar Messages

  • How to store the value of request message and use it in Response mapping

    Hi All,
    We have an requirement where we need to store the data coming in Request Mapping and use the stored value in Response Mapping. Can anybody help us in how to proceed?
    Thanks
    Sujata

    Hi!
    In Mapping you may use the RFC Lookup function to store values in database table during request mapping and to read values from database table during response mapping.
    You can also use an ABAP or Java Mapping "in front of your" message mapping to store/read the values.
    You can also use an Adapter Module (if applicable for the adapter type you use) and/or a UDF to store the data e.g. in Dynmaic Configuration Header of Request Message and to read these data from Dynamic Configuration Header of Response Message. But this works only for synchronous scenarios (and it means overhead in your message traffic).
    Hope these thinkings help you o find the most suitable way for your concrete scenario!
    Regards,
    Volker
    Note:
    These techniques help you to avoid using BPM.
    Edited by: Volker Kolberg on Aug 27, 2009 11:18 AM

  • DB lookup in mapping.

    Hi,
       I am new to the XI world.
       Am trying for DB lookup in mapping.Can anyone tell   me that is ABAP mapping more convenient for DB lookup.
    Can the cross reference tables reside in the XI server and can we refer them in the ABAP mapping.
    Thnx,
    Pravesh.

    hi,
    to access db via db api in the message mapping:
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    >>>Can the cross reference tables reside in the XI server and can we refer them in the ABAP mapping.
    yes but you can also refere tables it other systems
    Regards,
    michal

  • Store value from request message to be processed in response mapping

    Hi,
    I have the following synchronous scenario:
    R/3 (ABAP Proxy) <>  XI/PI <> 3rd party Web Service
    I need to reference a value in the sender (request) message in the response mapping.
    For example:
    A request with a user ID is received from R/3 to XI/PI.  I want to store the user ID in the request message.  A response is received from the web service.  I then want to use the user ID in the response mapping.
    I believe XI/PI can meet this requirement with a BPM using container or possibly using a custom table to store Message GUID and the variable value in the request message mapping.
    Are there any other methods that can be used to meet this scenario?
    Thanks and regards,
    Duke

    Hi All,
    This is the first time I've encountered such a requirement.  Most of the time we create our own programs that call the sender proxy, so to interogate the results and call another proxy would be the ideal solution.  But, in this case the standard LSO process controls the execution of the proxy.  We may look into doing an enhancement to the standard code, but I was looking for a way we can do this in PI with minimal effort.
    As Stefan stated, I also noticed that the DynamicConfiguration is emptied in the response.
    We will explore the use of BPM, but from what I can see, utilizing a custom table with the runtime constant MESSAGE_ID may be the simplest solution in PI.
    Thanks and regards,
    Duke

  • Creation OData Service Response Mapping

    Hi Marvin Hoffmann
    @jitendr_kansal
    first of all thanks for sharing this blog.
    Marvin Hoffmann's Blog
    in this blog under the Heading of "Implement the OData Service"  at point number 6.
    when i download the WSDL file and upload for response mapping i am getting the below in which left hand side is empty.
    Kindly guide me how to do it?
    Regard
    Ali

    If you are running behind proxy server:
    you can set proxy settings  > windows>preferences>network connections>
    Manual>HTTP
    check How to bypass proxy settings in SMP workspace for connecting any public Web Service within corporate Network

  • For Response mapping

    select columnid
    FROM tablename
    WHERE column1 = 'Z' AND (column2 <> 'N' AND column2 <> 'M')
    For above query response mapping...do i need to use action= SQL_QUERY ?.
    or simple datatype is fine?.

    Hi Rahul
    You Can do it by defining datatype.
    Make the occurence of COL2 as 1 to unbounded and then in your mapping
    duplicate the Target Subtree and map it to the corresponding values.
    Just go thru this doc -http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Rehards

  • 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.

    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.

  • Task response and dependent task on response mapping

    Hi All,
    I am using OIM 10g. I was wondering if anybody has a query which gives task response vs dependent task on response mapping.
    For example if Tasks A's response is Success C then on that I will run Task B so the query should return all these three element.
    Thanks in advance.

    Hi,
    You can use this query as per you requirement,
    select pkg.pkg_name, mil.mil_name, rsc.rsc_data, rsc.sta_key, sta.sta_status, sta.sta_bucket, mil2.mil_name
    from pkg pkg, tos tos, mil mil, mil mil2, rsc rsc, sta sta, rgm rgm
    where pkg.pkg_key = tos.pkg_key
    and tos.tos_key = mil.tos_key
    and mil.mil_key = rsc.mil_key
    and rsc.sta_key = sta.sta_key
    and rgm.rsc_key = rsc.rsc_key
    and rgm.mil_key = mil2.mil_key
    and pkg.pkg_name = 'Exchange' -- Your application name
    order by pkg.pkg_name, mil.mil_name, rsc.rsc_data, sta.sta_status, mil2.mil_name.
    Thanks,
    Kuldeep

  • FNDLOAD for Responsibility Mapping setup in Oracle Service

    Hi,
    Is there a FNDLOAD command for Responsibility Mapping setup in Oracle Service.
    Thanks
    Vishnu
    Edited by: user12063411 on Dec 2, 2009 4:01 PM

    Yes, SR Type- Responsibility mapping is done in JSP page.
    But Dataloader works in JSP page or almost any application like Microsoft excel, outlook etc..

  • How to add new key lookup in Mapping ?

    Hi,
    I am learning OWB 10g from oracle.com site. I am following the Oracle-By-Example.
    [http://www.oracle.com/technology/obe/obe_bi/Lesson6_Designing_ETL_Data_Flow_Mappings/designing_etl_data_flow_mappings.htm]
    My OWB version is:
    OWB Client     : 10.2.0.1.31
    OWB Repository      : 10.2.0.1.0
    But the screenshots are different than what I am getting on my OWB. Am I using the correct version of Oracle-By-Example?
    I have created Mapping Dimension and Mapping Table. Now i want to add a Mapping Key Lookup. But as the screenshots shown in Oracle-By-Example are different, I cannot go further.
    Please help me.
    Thanks!
    Yogini

    Hi Yogini
    Here are some steps, it should be fairly straightforward, you can view the online help for more information.
    1. Drag and drop the Key Lookup operator on to the Mapping Editor.
    2. The Lookup wizard opens on the Welcome page. Select Next to move to page 2.
    3. Provide a name and description for the operator, default is KEY_LOOKUP. Hit Next to move to page 3.
    4. On the Groups page, hit Next.
    5. Select attributes to use in key lookup. For example those from the WAREHOUSES table in the OBE you are using that you will lookup in the COUNTRIES table. Shuttle those attrbutes to the right hand side. Hit Next to move to page 4.
    6. Select the COUNTRIES table from the combo box nder 'Select the object which has the lookup result. In the lookup conditions table ensure the matching criteria is set ie . LOCATION_ID from WAREHOUSE matches with LOCATION_ID from COUNTRIES. Hit Next to move to page 5.
    7. Here you can define the strategy for matches, just hit Next, then Finish. You have walked through all pages and are complete.
    Cheers
    David

  • Problem in response mapping

    hi Experts,
    i am using ABAP synchronous proxy for transmitting the PO data to the third party system and should get the application response from third party system into different structure i.e POresponse structure and this should updated back into SAP r/3 PO.
    For this i have created mapping one for sending po data and other for getting po response while i try to to execute i am getting the following error.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_PORES_MM_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>
      <SAP:P3>Failed to load resource from the context classload</SAP:P3>
      <SAP:P4>er of the current thread! Loading from classloade~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_PORES_MM_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Failed to load resource from the context classloader of the current thread! Loading from classloade~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    i was not able to monitor the error could any one please help me out how to resolve this issue.All the correct ans will be rewarded.Thanks in advance.
    Thanks,
    Veda

    >>> SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_PORES_MM_;
    Mapping exception occuring from the third party system response to abap proxy.  You can see the response message in SXMB_MONI.  The message appears inbound section of the pipeline. Copy the message and try to test in the test tool.

  • Problem with RFC LookUp Parametrised Mapping

    Dear All,
    I am using RFC Look function in message mapping and have defied import parameter as xyz of category adapter and type RFC to get a sinle value response from RFC.
    After this, I created operation mapping. Now going for Parameter binding, it is not showing me any value i.e. parameter defined in message mapping is not displaying due to which i am not able to activate operation mapping, it is showing error as "Binding for Message Mapping MM_FILE is not correct. Parameter xyz of Message Mapping MM_FILE is missing"
    I have checked various blogs on SDN but I am not able to figure out the mistake.
    Kindly guide me out.
    Reg,
    NJ

    Hi nishu,
    in operation you need type a name againasi the parameter XYZ.
    XYZ----
    ABC
    and in configuration when you will use this operation mapping in interface determination then it will ask for the value of ABC.
    so
    suppose channel name---CC_TEST
    So in Interface mapping you will assign
    ABC=CC_TEST
    So in Operation mapping you have assigned
    XYZ=ABC
    means XYZ=CC_TEST(beacuse ABC=CC_TEST)
    Simple Math 

  • Lookup value mapping table through message mapping.

    Hello All,
    I am working on a graphical mapping (message mapping). When trying to map the source message to the target message, I need to find out it a particular <b>key</b> exists in the <b>value mapping table</b>. Depending on the result, I need to map different source fields to the target field.
    Is there any inbuilt function which will allow me to do a lookup on a value mapping table, or is it possible to lookup a value mapping table from a UDF?
    Please help!
    Warm Regards,
    Keerti

    Hi,
    Please see the below links for Value mapping ..
    Value mapping /people/sukumar.natarajan/blog/2006/10/23/accessing-value-mapping-defined-in-directory-using-java-functions
    Value mapping in XSLT /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    Value Mapping replication - /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
    Also see
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    Regards
    Pradeep N

  • Soap response mapping error

    hi
    i got payload of response from webservice as below;
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <m:requestResponse xmlns:m="http://tempuri.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <result xsi:type="xsd:string">20060911tt11</result>
      </m:requestResponse>
    when i test mapping with above contents in mapping test tab, i got mapping error as blow;
    16:03:59 Start of test
    Cannot produce target element /ns1:Rnumber_MT/rnum. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element /ns1:Rnumber_MT/rnum. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    16:03:59 End of test
    source side in MM_response, comming from wsdl for MT.
    result          xsd:string
    target side in MM_response, i created DT, MT.
    Rnumber_MT
             |__
                 rnum  xsd:string
    i sent data to webservice succesfully, and i can see return value as well, but mapping error.
    please guide me.
    thanks in advance
    venjamin

    hi
    in response procedure;
    my scenario abap proxy 2 soap sync
    1. response from webserivce --> r/3
      there is no DT, MT due to coming from wsdl.
      only i can see result xsd:string
    2. data type for r/3
       Rnumber_DT
           rnum xsd:string
       message type Rnumber_MT
       Rnumber_MT
           |_
               rnum  xsd:string     
    3. mapping for response
       1. source (webservice)
         external message : requestResponse
         result xsd:string
       2. target  (r/3)
       Rnumber_MT
           |_
               rnum  xsd:string  
       i did map ,,, result ---> rnum..
      here is payload for response from webservice....
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!-- Request Message Mapping
    -->
    - <m:requestResponse xmlns:m="http://tempuri.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <result xsi:type="xsd:string">20060911tt11</result>
    </m:requestResponse>
    please help me
    thanks in advance
    venjamin

  • Synch SOAP scenario - access request data as part of response mapping?

    Hello experts,
    I have a synch SOAP scenario which is working but I want to improve the error handling.
    Under normal situation I send the SOAP request and the remote web service responds with a given message structure which includes my invoice number as a key field. I then create an IDOC with this number and processing is great.
    However, sometimes there is an error response from the web service which follows a different message structure and does not include the invoice number :-(
    There could be many reasons for this error such as a field was missing or wrong format or even we ran out of prepaid web service calls (this is to get a government approval of invoice which we pay for in groups of approvals).
    When they respond with an error I would like to send this information in IDOC to SAP, but I have no invoice number to tie the response to. Therefore the information is kind of useless in ERP. Is there a way in PI for a response message to reference the synchronous request data we sent to the web service in the first place?
    Many thanks for your ideas,
    -Aaron

    Hi Aaron,
    Also you can define static variables Sharing data between message mapping in PI 7.1
    About Mark suggestion you have an interesting Adarsh Dhingra's blog here Sharing data between two message mappings through Dynamic Configuration
    I think the better way is to use the Harish approximation because is the solution more standard.
    Regards.

Maybe you are looking for