Proxy to JDBC- Array mapping

Hi,
In my scenario Proxy to JDBC - synchronous call.
In the receiver side using JDBC adapter a stored procedure is invoked and that returns some values say... IndentNumber,EmployeeNumber and ResumeNumbers (Which is array type.), Status(which is again array) -- ResumeNumbers may have multiple resume numbers and status has status flag corresponding to each resume.
How do I go about this in XI mapping.
Please guide me on this.
Regards,
chem
Edited by: Chemmanz on Mar 15, 2008 3:39 PM

Hi,
For this you need to make the occurance of the proxy structure as 1...unbounded.
If the fields have to mapped then make the Unbouded occurance and map it as it is.
OR for mulitple records....
For e.g.
Your JDBC side structure will be as
<root>
<StatementName5>
<storedProcedureName action=” EXECUTE”>
    <table>realStoredProcedureeName</table>
<param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>IndentNumber</param1>
</storedProcedureName > 
  </StatementName5>
</root>
Here make the occurance of IndentNumber as Unbounded so you will get whole array.
Now On Proxy side make the related structure and try to map the any one internal field i.e. array to root node
i.e. if proxy structure is
<root>
<IndentNumber></IndentNumber>
</root>
Then map JDBC response field IndentNumber -
> Root
This will create the multiple records for proxy.
Then all fields map as one to one mapping
IndentNumber (JDBC)->splitByValue>IndentNumber (Proxy)
Thnaks
Swarup

Similar Messages

  • ABAP Mapping for Error handling in Proxy to JDBC

    Hi All,
    I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool)
    I am following the below steps,
    step 1 - In message mapping a UDF is created to catch errors and store them in a variable using  dynamic configuration
    step 2 - writing abap mapping for handling this thrown exception and im reading the dynamic configuration in the abap class and raising exception. The exception format expected is
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1>ZPI_THROW_EXCEPTION</SAP:P1>
      <SAP:P2>001</SAP:P2/>
      <SAP:P3>Mandatory field is missing[BUKRS] </SAP:P3>
       <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I have written the following ABAP code to achieve this:
    method IF_MAPPING~EXECUTE.
      DATA l_record type mpp_dynamic.
    DATA error type String.
    getting dynamic configuration value
    filled in by any previous mapping
    CALL METHOD DYNAMIC_CONFIGURATION->GET_RECORD
      EXPORTING
        NAMESPACE = 'http://sap.com/xi/XI/System/ERROR'
        NAME      = 'ERROR'
      RECEIVING
        RECORD    = l_record.
    error = l_record-value.
    *raising exception with our message
    RAISE EXCEPTION TYPE CX_MAPPING_FAULT
      EXPORTING
       TEXTID =
       PREVIOUS =
        ERROR_CODE = '001'
        ERROR_TEXT = error .
    RAISE EXCEPTION TYPE CX_MAPPING_FAULT
      EXPORTING
       TEXTID =
       PREVIOUS =
        ERROR_CODE = '003'
        ERROR_TEXT = error .
    endmethod.
    I am gettign the following message for our code:
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Could you please help in finding the solution for getting currect error message from ABAP class?
    Edited by: SwethaC on Jan 21, 2011 8:18 AM

    The error is due to RFC Call fail from PI system to your ECC Application System.
    Check your RFC Destination for ECC System type 3 in PI System.
    When you are receiving data from ECC System using Proxies & again you are going to ECC System for Validation.
    Why you are not doing this validation on ECC System only in your proxy code ?
    In your proxy code, it will be much better for performance to check your data there on same system.

  • Sender ABAP Synchronous proxy -- PI -- JDBC sync scenario pls!!

    Hi Guys,
    Can any one help to find one sample scenario like ABAP Proxy --> PI --> JDBC Sync call ? Sync ABAP proxy sample code any 2 or more filelds going from ABAP proxy and maps on JDBC sync request, up date target side SQL server database tables, in case if any error happens error/success message must go back to SAP one Z table with response.
    Any help would be really great!!
    Many thanks in advance
    San

    up date target side SQL server database tables, in case if any error happens error/success message must go back to SAP
    one Z table with response.
    When you do an update you can get back the number of rows updated in the JDBC response....you can find this in the help page showing JDBC structure. If you are looking for any other response then probably the message needs to be genarated by PI itself after checking the response from JDBC.
    Regards,
    Abhishek.

  • Proxy to JDBC Sync, with Idoc Receiver

    Hello all,
    I have to set up following synchronous scenario.
    PROXY -> PI -> JDBC   |   JDBC -> PI -> PROXY
                                           JDBC -> PI -> IDOC
    In other words, I need that the response from the JDBC Receiver adapter is sent back to R3 to an IDOC and the originating PROXY.
    How can I achive this? I mean how can I send the synchronuos response back to the originating PROXY, and in the other hand send an asynchronous message to the IDOC.
    This is a message with a large quantity of info, so I'm not sure what to use or how to use it.
    Thanks for your help.
    Felipe

    Hi Felipe
    PROXY -> PI -> JDBC | JDBC -> PI -> PROXY
    JDBC -> PI -> IDOC
    The message to the IDOC need to be sent from response ?
    Is your proxy SYNC?
    Use a BPM for this
    1. receive the message from Proxy.(SYNC)
    2. Send it to JDBC (SYNC)
    3. Map the proxy request to JDBC request and JDBC response to Proxy response.
    4. Send the JDBC response to IDOC
    Thanks
    Gaurav

  • Proxy to JDBC a small issue

    Hi friends,
    I had a scnario where i am using proxy to JDBC this is sync scnario. when i am triggring the proxy with help of a report.
    If the data is present every thing is working fine.. in one case if data is not there in the sender side . mean payloade is blank then the interface is throughing error. the error is..
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Regards
    Viajy

    Hi Vijay,
    1. Your target message to JDBC adapter should look like-
      <StatementName2>
          <dbTableName action=u201DINSERTu201D>
             <table>realDbTableName</table>
             <access>
                <col1>val1</col1>
                <col2>val2</col2>
             </access>
          </dbTableName> 
      </StatementName2>
    So change the mapping/data type as requried.
    2. Go to the runtime workbench and check the JDBC communication channel error messages. It will give you enough information as to what causes the error.
    Regards.

  • Proxy to JDBC scenario need dynamic sql query for sender .

    Hi Experts,
    I am developing proxy to jdbc scenario. in this i need to pass dynamic sql query  whre we are passing classical method like below.
    while we are passing select stmt in constant and mapped with access field  and key field mapped with key field.
    MY requirement is like instead of passing select stmt in constant where i can generate dynamically and passed in one field and mapped with access field.

    Hi Ravinder,
    A simple UDF or use of graphical mapping functions in most cases should provide you everything you need to construct a dynamic SQL statement for your requirement.
    Regards,
    Ryan Crosby

  • Kerberos to JDBC user mapping

    Hi,
    I have a requirement to map a kerberos authenticated user through to the JDBC connection username.
    This is well outside my comfort zone and I don't even know where to start looking. Can anyone suggest the topics / products I need to familiarize myself with.
    Thanks.

    Hi,
    Thanks for the reply. I think I wasn't quite clear in my own head what I was asking for! I've chatted to our DBA and am a little clearer now.
    So, I'd like Weblogic to authenticate a user against active directory. I'm pretty happy with that process (I've done Kerberos before, it's painful but that's more Kerberos system config than the application software).
    I've then got two options:
    1. Map the Weblogic user (from the Kerberos authentication) to a proper database user with a separate username and password. I've done this with X509 authentication, so I guess it's a similar process. Enable identity-based connection pooling on the data-source and set-up a JDBC credential mapping. As here: [http://docs.oracle.com/cd/E21764_01/web.1111/e13737/jdbc_datasources.htm#i1204171]
    One thing I'm not clear about is how to automate configuring the credential mappings - I wouldn't want to have to create mappings for each of the users of the system.
    2. The same, but use a database proxy user. I can see how this is possible on Weblogic 12.1.1 - [http://docs.oracle.com/cd/E24329_01/web.1211/e24367/ds_oracledriver.htm#CJAFCGGB] , but this option isn't available on Oracle datasources in 10.3.5.
    Many thanks.
    Edited by: 913882 on 18-Feb-2012 03:30

  • Data coming in receiver side by using proxy to jdbc scenario

    Hi experts ,
    I have scenario Proxy (client proxy) to JDBC (IVR system) Asynchronous method,
    I execute se38 its working fine and go SXMB_MONI here also success flag  in development server  same way I checking PI side also SXMB_MONI everything fine  but data not coming IVR side if write select query
    In runtime workbench the Communication channel status id green  and Message processing completed successfully
    My question is when I writing select query like select * from table name ,Why data not coming  receiver side ?   execute  query here IVR side also mention  query status is successfully ,but IVR side  data not coming, I have access right in receiver side
    Please provide valuable inputs.
    Thanks
    INASH NALLA

    Refer the following link for more details:
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    Also, in the reciever JDBC adapter you dont write a SQL query anywhere but it is the target MT structure and corresponding mapping,which generates the query.
    Refer the blog:
    http://www.riyaz.net/blog/jdbc-adapter-configuration/technology/ 1200/

  • Performance issues in Proxy-XI-Jdbc scenario

    Hello,
    I have developed a proxy to JDBC synchronous scenario.
    My scenario works like this.
    *i run an abap program which calls a client proxy,
    the proxy fetches the data from database table and returns the data in the ABAP program.(select query)
    there are serious performance issues when we are running the report
    it is taking around 2-5 minutes and at times multiple users are logged in , it takes around 5-20 minutes.
    it seems that most of the time is consumed in the data fetching.
    please help me to find some solution so that we can fine tune the performance on the PI side.
    Are there any options on JDBC CC which can help  us in making the queries faster
    thanks
    kannu.

    Kanu16 ,
    Issue seems to be at r/3 end..
    1. Make sur ethat report program is using select query in proper fashion .
    2. avoid using nested loops.
    3.  Hope not much validations are being done on selected data .
    Abaper can help you optimizing this .
    By debugging you can find out the exact reason behind.
    Regards ,

  • Problem in JDBC Adapter Mapping

    Hi all,
    I am working on a scenario wherein i am trying to connect an ORACLE DB to SAP 4.7 system using XI 3.0 . I configured the JDBC Adapter and the JDBC adpter is picking up the message but i have a problem in JDBC adpter Mapping.
    The error message is like this:
    <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_ORACLE_MSGMAP_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>During the application mapping com/sap/xi/tf/_ORACLE_MSGMAP_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    How to map the "Resultset" from the Adapter to a target message? Can anybody throw some light on how to get the message from the JDBC adpter and map it to some other message format...Any documents regarding this ?
    Waitin for ur replies...
    Bye,
    Romit Shankar Arun.

    Hi,
    Does your other SDN post "Inserting data through JDBC adapter" refer to the same problem?
    I assume you use XMLSPY for creating XSDs.
    I used the XSD posted by you in the other forum thread and tried to generate the XML structure and it does not seem to generate the XML structure in the format required by the JDBC adapter.
    sample file generated from your XSD posted in the other forum thread:
    <?xml version="1.0" encoding="UTF-8"?>
    <resultset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Untitled1.xsd">
         <row action="INSERT">
              <CUSTOMER_NUMBER>String</CUSTOMER_NUMBER>
              <COUNTRY_KEY>String</COUNTRY_KEY>
              <FIRST_NAME>String</FIRST_NAME>
              <LAST_NAME>String</LAST_NAME>
              <AUTHORIZATION_GROUP>String</AUTHORIZATION_GROUP>
              <INDUSTRY_KEY>String</INDUSTRY_KEY>
              <ACCOUNT_GROUP>String</ACCOUNT_GROUP>
              <INTIAL_CONTACT>String</INTIAL_CONTACT>
              <COMPANY_CODE>String</COMPANY_CODE>
              <CITY>String</CITY>
              <CITY_CODE>String</CITY_CODE>
              <COUNTRY_CODE>String</COUNTRY_CODE>
              <DISTRICT>String</DISTRICT>
              <FAX_NUMBER>String</FAX_NUMBER>
              <HOUSE_NUMBER>String</HOUSE_NUMBER>
              <POSTAL_CODE>String</POSTAL_CODE>
              <REGION>String</REGION>
              <TELEPHONE_NUMBER>String</TELEPHONE_NUMBER>
         </row>
    </resultset>
    Compare the above to the template i have mentioned.
    Hope this helps.
    Regards,
    Sridhar

  • No response message in Proxy to JDBC synchronous scenario

    Dear Team,
    I am working on synchronous scenario Sender ABAP proxy <===> SAP PI 7.31 <===> Oracle Database.All the necessary proxy configuration has been successfully tested.
    Business Scenario:
    ABAP proxy will send a single Vendor Id to Oracle DB as request and in return , it has to retrieve all the columns related to Vendor as response.Oracle Database stores all the Vendor information.There are 11 columns including the vendor Id in the view for the Vendor records.
    Design :
    For Request structure:
    a-->Created MT for Sender ABAP Proxy with only 1 field for Vendor Id.
    b-->Created MT for Receiver JDBC  with Action as SELECT , Table with "View Name" , Access with Constant Blank for all 11 column and Key as Vendor Id.
    I have been following  the link and Bhavesh Kantilal document.
    http://help.sap.com/saphelp_nw73/helpdata/en/44/7b7171fde93673e10000000a114a6b/content.htm?frameset=/en/44/7b7855fde93673e10000000a114a6b/f
    rameset.htm&current_toc=/en/ca/b977f1c7814201954f20bb87ad7aab/plain.htm&node_id=71
    For Response structure:
    Created MT for Receiver JDBC with All the column names.
    Created MT for target ABAP ECC with the same 11 column name of JDBC response.
    Note :
    1.Database team shared a excel file as a sample payload which has all the column names of a vendor and I created my DT with the same naming conventions as they are maintaining in their database i.e. Column names are in CAPs, in the same order and even the special characters in the column name.
    2. The PING test connection for Cc works fine to database.
    Please read out my queries as the I am not receiving any response from Oracle DB and gives error as timeout exception:
    1.Since I am trying to retrieve all the column of the view , am I doing the correct procedure of putting all the column name in the JDBC request structure and making a Select statement. Can I add < * > to fetch all the column name and if so where can I add it.
    2. Whats the difference between SELECT and SQL_QUERY and on what circumstances I can add it?
    3. How can I test ICO in ID?
    4. Can I use any SOAP tool to test the messages? Is there any functionality in NWA to test the messages directly to JDBC .
    Hope all your inputs can improve my design part.
    Regards
    Rebecca

    Hi Rebecca,
    Did you go through all of these links below?
    PROXY to JDBC- SYNC
    Proxy to JDBC Sync, with Idoc Receiver
    JDBC to PROXY Sync Scenario | SCN
    JBDC Receiver Insert Statement Response
    Re: Synchronous JDBC select
    receiver JDBC structure
    Regards,
    Jannus Botha

  • An error Handling in Asynchronous Proxy to JDBC Scenario?

    Hey,
    In my scenario, we'll send data from erp to third-party database.
    If it occurred an error while saving the data to database, I want to manage that error in ERP.
    Is it possible to make this scenario with asynchronous proxy to JDBC?
    If it was possible, how should do I?
    Thank you,

    Also
    go thru the following thread (Similar problem discussed)
    Re: RFC to JDBC response
    regards
    krishna

  • ABAP Proxy to JDBC syncronous method

    Hi Experts,
    I am very new to ABAP Proxy to JDBC syncronous method.
    I have used 4 DT, 4 MT, 2 MI, 2 MM and 1 IM.
    I have used reference from
    SYNCHRONOUS SOAP TO JDBC - END TO END WALKTHROUGH
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3928. [original link is broken] [original link is broken]
    My question is in Integration Directory how many sender agrement, receiver agrement, receiver determination and interface determination should i use?
    Is my above DT , MT , MI , MM and IM is correct?
    I am not using any BPM.
    Thank you in advanced.
    regards,
    S.Saravannan

    mrsaravannan wrote:
    > My question is in Integration Directory how many sender agrement, receiver agrement, receiver determination and interface determination should i use?
    for a Sync sceanrio, you will create
    1 RD
    1 ID
    1 SA (since its a ABAP proxy call this is optional)
    1 RA
    >
    > Is my above DT , MT , MI , MM and IM is correct?
    Yes

  • Authorizations required in Communication Channel for JDBC Lookup mapping

    Is there of list of required authorizations and or patch needed to use a JDBC Lookup in a message mapping?  We are using PI 7.1, and trying to use the new JDBC Lookup feature.  We currently have a user that is not an ower of the DB tables, this does work in our current solution of using UDFs, but we would like to avoid switching it to a user that has full access on the tables, e.g. SAPXI*
    Current environment: PI 7.1 (not EhP1)
    Thanks,
    Matt

    Do you know what those authorizations should be when using a standard JDBC Lookup mapping function?  Currently we have a custom UDF that calls the table via a <schema>.<table name> and the current user in the Receiver Comm Channel works just fine.  It appears that when using the standard SAP JDBC Lookup function it calls the table directly and the user in the Comm Channel no longer has the correct permissions.
    I would expact that the JDBC Lookup function would allow for a standard "Read" on any table as long as the user has that level of access...but not in this case.  I am going to bring it up to our SAP XI software development team and see what they say, but wanted to get some views from our other experts as well.
    Thanks,
    Matt

  • BPM flow Proxy to File and then Acknowledgement back to Proxy or JDBC.

    hi All,
    I have to create an BPM scnario to get acknowledgement from receiver file adapter.
    Steps created in BPM are:
    receive -> send (Transport Acknowledgement is selected) as per blog /people/michal.krawczyk2/blog/2006/06/22/xi-playing-with-the-file-adapters-acknowledgments
    Now what i want to do is whenever any type of acknowledgement is obtained i need to send success or failure message to proxy or JDBC(have alreay seen how to request for acknowledgements through client proxy).
    What i need to do in order to achieve this scenario?
    Thanks,
    Mayank

    hi,
    If we are getting exception for some reason and error text as visible in moni  for example is:
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: An error occurred while retrieving an FTP connection from the connection pool: com.sap.aii.af.lib.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect</SAP:AdditionalText>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
    Is it possible to capture Additional Text somewhere in BPM, so that in case if deadline limit is exceeded we can send exception text back to the sender?
    thanks.

Maybe you are looking for