Idoc- JDBC

Hi Team,
I have a scenario from Idoc->JDBC ,where the idoc comming to XI ultimately needs to update fields from more than 1 tables in a database.Under such case how can I design my JDBC adapter?
Thanks and Regards
Atanu Mazumdar

>needs to update fields from more than 1 tables in a database.Under such case how can I design my JDBC adapter?
There are two possible ways we can do this.
option 1) using seperate statement tag for every update table.
option  2) If you have mulitple tables say 5 or even greater than 5, you might want to try this...
In  this create a query for updating all the 6 tables and pass this string in access field below.
<StatementName>
<anyName action=u201D SQL_DMLu201D>
<access>SQL-String with optional placeholder(s)</access>
<key>
  <placeholder1>value1</placeholder1>
  <placeholder2>value2<placeholder2>    
</key>
</anyName > 
</StatementName>
Note: If one of the table update fails all other updates will not go through. JDBC adapter treat entire structure elements as one transaction in both the options. Just remember this.

Similar Messages

  • IDOC- JDBC    ---  ORA-00936: missing expression  - Error

    Hi all,
    I am working on a IDOC-> JDBC scenario.
    it works fine in development but in quality i amgetting the following message.
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_SAP_COST' (structure 'Statement2'): java.sql.SQLException: ORA-00936: missing expression
    there is no issue with mapping and i compared and everything is exactly the same as development.
    Has someone come accross a similar issue.
    Regards,
    Tarun Bahal

    This is not an error with respect to XI. There is some problem with the SQL query generated after the mapping. Generally ORA____ kind of errors are comman in JDBC Senario and even Oracle maintains something like our SAP Note for each ORA errors. I am not sure about the URL for searching this error. You can check in this URL too, [ORA-00936 |http://ora-00936.ora-code.com/] http://ora-00936.ora-code.com/
    Since you are saying that it works fine in developement, you can check with the data. Whether it is generating the SQL Statement properly or not. Also confirm whether you have sufficient data in the quality systems to generate the SQL Statement properly.
    Edited by: Prasad Ulagappan on Oct 16, 2008 11:34 AM

  • XI idoc-jdbc  scenario in details

    Hi Experts,
    Please provide me this scenario pn detail.
    Cheers
    Aman

    Hi,
    For IDOC to JDBC scenario:
    Refer the below weblog for help:
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
    1) First you need to install the JDBC drivers on XI server refer the below link for installation process.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    2) You need to do the IDOC configuration at R3 as well as at Xi end:
    Refer the below configuration steps:
    ALE configuration for pushing idocs from SAP to XI
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
    IDOC testing using WE19
    /people/sameer.shadab/blog/2005/07/25/reposting-idocs-instead-of-recreating--for-testing-purpose-xi
    Pre-requisites for Outbound IDoc from R/3 to PI:
    Configurations required in R/3:
    Maintain Logical System (SALE)
    Define RFC Destination (SM59) which points to PI system
    Maintain Port (WE21)
    Maintain partner profile. (WE20):
    Maintain Distribution Model (BD64):
    Configuration required at Xi side:
    Go to IDX2: load the DOC metadata.
    3) For updating the table you need to write the stored procedure:
    Refer the below link for stored prcedure.
    JDBC:
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    Stored Procedures-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    Thnx
    Chirag
    Reward points if it helps and close the threads.

  • Best approach for IDOC - JDBC scenario

    Hi,
    In my scenarion I am creating sales order(ORDERS04) in R/3 system and which need to be replicated in a SQL Server system. I am sending the order to XI as an IDoc and want to use JDBC for sending data to SQL Server. I need to insert data in two tables(header & details). Is it possible without BPM?  Or what is the best approach for this?
    Thanks,
    Sri.

    Yes, this is possible without the BPM.
    Just create the Corresponding Datatype for the insertion.
    if the records to be inserted are different, then there wil be 2 different datatypes ( one for header and one for detail).
    Do a mutlimapping, where your Source is mapped into the header and details datatype and then send using the JDBC sender adapter.
    For the strucutre of your Datatype for insertion , just check this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    To access any Database from XI, you will have to install the corresponding Driver on your XI server.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    Regards,
    Bhavesh

  • Help needed on Idoc - Jdbc scenario

    Hi ,
      We have a IDOC - XI - JDBC scenario.when we post a IDOC from R3 it is showing successful in we02 with status 03 and there are no errors in SM58 of R3 system but the Idoc Is not reaching XI.This interface has been working fine from many months and there are no ports or anything changed.
    Please provide me with some pointers to check where the Idocs are missing.
    Thanks
    Raghu.

    Hi vijay...
      I even checked in IDX5 but there are no Idocs found there also.
      Any other pointers.
    Thanks
    Raghu.

  • IDOC---JDBC scenario error: "INTERNAL" HTTP_RESP_STATUS_CODE_NOT_OK

    i have a IDOC-XI--JDBC   scenario,
    the scenario fails at  the Call Adpater Pipeline step............giving following error:
    <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
      <SAP:P1>401</SAP:P1>
      <SAP:P2>Unauthorized</SAP:P2>
    <SAP:Stack>HTTP response contains status code 401 with the description Unauthorized Authorization error when sending using HTTP (error code: 401, error text: Unauthorized)</SAP:Stack>
    pls help me.....
    Message was edited by:
            sudeep dhar

    but this error occurs after few message pass successfully.....
    means at an interval this error happens...then again few messgae pass successfully,
    This is the error which i get in MONI:
    ERROR_CATEGORY: INTERNAL
    ERROR_ID: HTTP_RESP_STATUS_CODE_NOT_OK
    and in the pipeline step i can see the 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="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
      <SAP:P1>401</SAP:P1>
      <SAP:P2>Unauthorized</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      </SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP response contains status code 401 with the description Unauthorized Authorization error when sending using HTTP (error code: 401, error text: Unauthorized)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • PI 7.4 - interface from ECC(idoc) JDBC, idoc not making it from sm58 '

    Hi Experts,
    I've got an interface  which works in our dev and 2 of our test systems but NOT the 3rd test system. It doesnt work in our live system either. (essentially its a split receiver determination - goes to both jdbc and a file).
    I've reintroduced the config from the dev system to the 3rd test system and overwritten its ico/scenario in the hope that it might work - it didnt make any difference as was getting the first error below in bold.
    I've checked all RFC connections, destinations, partner profiles and ports, all seem in order and mirror systems that work, bar the naming conventions.
    I've checked The FM version, its the same version as the system which works.
    In sm58 I was originally getting the error 'Commit fault: ASJ.ejb.005043 (Failed in component:sap.com/com.sap.aii.ad', upon 'googling' this error it was suggested on SCN to essentially delete old config and reimport / rebuild the interface (Commit fault: ASJ.ejb.005043) . I've tried to reimport the config scenario / ico, i then deleted the config scenario and reimported it. This hasnt worked.
    I have had our Basis team double check the NWA settings, and the ResourceAdaptor settings were reset. 
    When re running the trfc in sm58, i now get the error ' Failed to resolve repository reference @XI_IDOC_DE FAULT_DESTINATION_DEV'
    Would appreciate some feedback as to what to try next..

    Hi George,
    We have seen this issue sporadically too while deploying to our QA system.  What I have generally done in the past to get it working is the following (I have run all the steps because I don't know if they are all required to get it going again):
    1. Open ID and clear the SLD data cache
    2. Open sender system in ID and do compare of adapter specific identifiers with SLD and then apply
    3. Deactivate sender IDoc channel and then reactivate (I would double check your destination in the settings also)
    Hopefully this will help.
    Regards,
    Ryan Crosby

  • Availability time plan for recevier JDBC adapater ( IDOC-JDBC)

    Hi
    I am doing IDOC-XI-JDBC ( insert) .
    We can use availability time plan for sender communication channels ( eg: Sender JDBC ). So the channel is available for only the specified period ( for example : 9AM to 8PM)
    Query :
    1) Can we use the Availability time plan for Receiver channel ( JDBC )?
    2) If Yes, when I activate the time from 9AM to 10 AM , Then after 10 AM if it gets any data, I am getting error in communication channel monitoring adapter level.
    If I start the channel with in 5 min then the message processed succefully. But how much time the adapter retries sending message to JDBC. It is giving error at adapter level which it shoudn't.
    How to use availability time plan for receiver channel??. Why the message is giving error at adapter level instead of waiting?? will the waiting message success even after 2 hr or more also??
    Thanks
    Murali

    > {quote:ti> Query :
    > 1) Can we use the Availability time plan for Receiver channel ( JDBC )?
    >
    Not Possible.
    > 2) If Yes, when I activate the time from 9AM to 10 AM , Then after 10 AM if it gets any data, I am getting error in communication channel monitoring adapter level.
    Better way to handle this requirement is, schedule back ground job in ECC to trigger IDoc at specific time interval.>
    > If I start the channel with in 5 min then the message processed succefully. But how much time the adapter retries sending message to JDBC. It is giving error at adapter level which it shoudn't.
    >
    >
    Suppose you have started Receiver communictaion channel , when ever Adapter engine receive the message then JDBC adapter
    will deliver the message to Data base, if data base connection failed due to some reason like Network issue or Data base down, in this case Receiver adapter tries min 3 times to deliver data to Data base, after that it will give error message.
    You can set number retries and time interface by your self.
    > How to use availability time plan for receiver channel??. Why the message is giving error at adapter level instead of waiting?? will the waiting message success even after 2 hr or more also??
    Check audit log ,and post the exception here, there could be number of reasons.
    Regards,
    Raj
    Edited by: Raja Sekhar Reddy T on Apr 25, 2011 6:32 AM

  • XI:Concerns regarding CCMS alerts,IDOC,JDBC,FILE,PROXY

    Dear Experts,
    I have some doubts regarding below listed points.Please,help Me to find thesuitable answer for these.
    *1.if multiple messages to be sent(IDOC) through same JDBC adapter,how we'll do it(THROUGH SAME jdbc Aadpter,in same config scenario)?*
    *2.in receiver determination,if we have to send to multiple receivers according to payload content(conditional passing to receiver depends on payload),**how we'll acheive it?*
    *3.what is file content conversion?*
    *4.why proxy is known as adpterless scenario?*
    *5.in case of idoc/proxy why sender side no communication channel but in receiver side we are using communication channel?*
    **6.what is CCMS alert?
    *7.in a file2file scenario,if we want to convert one file content to other file content in a different form(as x->1,y>2),*
    *how we'll acheive it?*
    *7.if lots of data checkings are there in case of SAP R/3,by whcih way we'll go?(idoc/proxy/rfc)
    *8.how we'll decide whether to go for SOAP scenario?*
    *9.what is adapter module?whan we'll go for different adapter modules other than standard?*
    *how we can develop our own adapter modules?*
    *10. how to map one field to other field,when they are present in different noad with respect to source and target strucrture?*
    Eagerly waiting for youyr valuable opinion.
    Regards,
    Rasmiraj Tripathy

    Do a search in SDN first for these questions.
    You will find the answers to the most.
    Else post specific questions

  • IDoc - JDBC, acknowledgment not possible

    Hi Guys.
    I've this scenario, It makes a branch, to a BPM and to a JDBC. The problem is, i got an error at the JDBC acknowledgment response (Acknowledgment not possible)
                            IDOC
    Branch
                   BPM                 JDBC
              No errors              Acknowledgment
            in acknowledgment        not possible
    This scenario was made by a external consultant, and i don't know where is the JDBC acknowledgment defined.
    Does anyone know, where can i modified this and disable the acknowledgment response for the JDBC?
    Thanks in advance.

    HI,
    Go to BPM and check the Send Step .. Is it has mode as acknowledgement etc ?
    Also check is Exception Branch has been defined ?
    to suppress the ack for Idoc -[page no 10 - entry in table IDXNOALE in XI system
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f6d2d790-0201-0010-9382-b50b499b3fbe
    Regards,
    Moorthy

  • IDOC-- JDBC server with synchronous communication.

    Hi  SAP PI Experts,
    we have requirement as per the below. could you suggest the best possible way to execute this below.
    we need to send the outbound IDOC to JDBC and reponse file from JDBC should be posted to ECC in IDOC format.
    as per my knowledge synchronous communication is not prefered for IDOC scenaioro.
    please advise the best possible solution in PI 7.1
    Regards,
    Krushi.

    IDoc not supports Sync communication but JDBC Receiver channel supports it.
    if you have any limitation like not to use ccBPM then 2 options
    1)Change IDoc to ABAP Client Proxy ,Proxy supports sync communication.
    2)IDoc-->PI(JDBC Lookup)--->IDoc(recv).
    if the response message from JDBC is not huge then try option 2.
    Regards,
    Raj

  • IDOC - JDBC - RNIF SCENARIO

    Hi Experts,
    Currently i am working on invoice idoc to JDBC(synchronous) to rnif. could you please help me the steps. depending on the bill to or soldto or plant i have to get the 14 fields from sql server and send it to the RNIF adapter. could you please send me the steps for this scenario. using BPM.
    Advanced Thanks
    Regards
    Sundher

    Hi,
    In BPM: without mapping lookup , but with Sync JDBC call
    1) Receive Step to receive the Idoc message
    2) Call the JDBC synchronously
    3). Map the Response to RNIF Receiver Message
    4) Send the Message to RNIF
    You can make the Sync. Mapping i,e Mapping between Idoc message to JDBC call and JDBC Response to RNIF outside the BPM..
    Check out this blog-/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    btw, what is the volume of data? based on that, you can decide to choose, mapping lookup or Sync JDBC call with BPM
    Rgds,
    Moorthy

  • IDOC-JDBC Mapping

    Hi,
    I am mapping idoc to jdbc structure. My problem is i am not getting the data for some fields in the idoc structure and there is a custom field under a custom segment and i am also not getting the data for this field.
    I have seen the incoming XML payload and there is no data for these fields.
    can anybody suggest me how can i solve this issue. 
    Thanks,
    sneha

    Hi,
    1. at first check TCODE : WE02 in R3
    and check if your custom segment is there
    2. if so then reload metadata (IDX2 from XI)
    3. also check if the IDOC signature that you've uploaded to XI
    (via repository) has those custom fields
    4. you can also delete the cache to be sure
    XI has the valid data in it
    Regards,
    michal

  • Idoc - jdbc context object problem

    hi all,
    in my scenario i am sending message from 1 idoc to 3 oracle table,
    i have one condition for one oracle table.
    That if "e_code" field of idoc is empty then no record should be insert into table1.
    so what i have to do.
    i also try context object but i have define context object but it is not showing in id.
    is there any other way to resolve my problem.

    Hi Alex,
    No need to go upto MI and IM
    u control on Message Mapping MM front.
    Just check "e_code" is "0 - empty" or exists
    based on that generate u r Statement node of u r table1.
    this would do
    rgds
    srini

  • IDOC to JDBC Synchronous interface

    Hi Experts,
    I am using PI 7.1.
    Having requirement of IDOC to JDBC synchronous scenario. When data is coming from SAP to DB it is updating data in to u201CXu201D table, when data response from DB is u201CYu201D table.
    How can I configure this interface, Please suggest me.
    Best Regards,
    Pasi...

    Hello,
    For special problematic of IDOC -> JDBC and sending back acknowledgement have a look to One Logical System Name for serveral BPM Acknowledgements
    One Logical System Name for serveral BPM Acknowledgements
    Step by Step JDBC Synchornous
    JDBC Receiver Adapter -- Synchronous Select – Step by Step
    Integration with database made easy
    Integration with Databases made easy – Part 1.
    SOAP <=> JDBC Synchronous
    SYNCHRONOUS SOAP TO JDBC - END TO END WALKTHROUGH
    Serialize IDOC XML
    How to serialize IDoc XML messages fed into XI
    Regards,
    Phani

Maybe you are looking for