JDBC Receiver: Check INSERT Query.

Hi Experts,
I am working on IDOC To JDBC(INSERT) Scenario.
Is there any possibility to check the INSERT Query that triggered by Receiver Adapter? If its possible please guide me how .
Thanks,
Vijay.

Hi Vijay,
Configure parameter logSQLStatement = true in advanced parameter of JDBC receiver channel. It will show the INSER query in audit log of message which you can see from message monitoring of RWB.
Regards
Sushil

Similar Messages

  • JDBC Receiver adapter ( INSERT/UPDATE with SELECT)

    Is it possible to have following kind of SQL Statement comming out JDBC Receiver Adatpter. If yes what would be the corresponding XML Document format for this.
    UPDATE suppliers 
    SET supplier_name = ( SELECT customers.name
    FROM customers
    WHERE customers.customer_id = suppliers.supplier_id)
    This condition also needs to be applied for Insert condition. Any pointer would be useful.
    Thanks,
    Samir

    Hi
    Refer this links,
    http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm
    Regards,
    Suryanaryana

  • JDBC receiver adapter: Insert of CLOB into Oracle DB

    Hi,
    I've got a short question:
    Is it possible to insert CLOB fields (larger than 4kB) into an Orcale database using the JDBC receiver adapter without using a stored procedure?
    We are on XI 3.0 SP20.
    I had someting in mind that this is only possible with a stored procedure but I am not sure on this.
    Thanks and Regards,
    Helmut

    HI,
    Is it possible to insert CLOB fields (larger than 4kB) into an Orcale database using the JDBC receiver adapter without using a stored procedure?
       yes, you can do it but it is not a best practise, but using Stored Procedure is .
    Regards,
    karna...

  • How to Prevent the Duplicate record insertion by JDBC Receiver?

    HI Experts,
    I have File Sender to JDBC Receiver scenario.I am using SAP PI 7.1 system.
    Purpose of this Scenario is to read the data from specified file and INSERT or  UPDATE the same records in Oracle Database.
    Before inserting the data I want to check in the same table for prventing runtime error(Key fields Duplicatin).
    So if records with the same key fields are available in table then I want to UPDATE the same record instead of INSERT.
    Please Suggest me the poosbile way.
    Thanks & Regards
    Jagesh

    Hi Jagdesh,
    The JDBC receiver format has the following structure
    <root>
    <StatementName1>
    <dbTableName action=u201DUPDATEu201D | u201CUPDATE_INSERTu201D>
    <table>Table1</table>
    <access>
    <col1>val1</col1>
    <col2>val2new</col2>
    </access>
    <key>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key>
    This structure creates a query in this way :
    UPDATE( OR UPDATE_INSERT) into Table1 set col1=val1 and col2 = val2new WHERE col2=val2old and col4=val4.
    The key field works like a Where clause. So for the receiver format when you specify the key, it checks the DB with that field as the where criteria. Hence for a UPDATE_INSERT query, when you specify the key field, it checks whether that value specified within the key field exists in the DB or not. Then it proceeds to execute the statement for only those values.
    Hence it makes sense to provide a primary key attribute in the key field of the JDBC receiver format.
    Regards,
    Kshitij

  • Not able to insert the data in JDBC receiver

    hi Team,
    Please help me i am working on IDOC - JDBC interface i am not able to insert data into the table.
    error says that table doesn't exists, but if i check in the database the table exists..
    below is the error getting triggered.
    could not execute statement for table/stored proc."A_PORDER_REG"(structure " STATEMENT") due to
    java.sql.SQLException: ORA - 00942 table does not exist
    Thanks & Regards,
    Vishnu vardhan.

    Might be u have given table name is diffarent, table name must be match in table field of jdbc receiver structure and table name of data base tables.both places u must give the same table names . this is one reason another one u might be given jdbc structure is wrong. u must specify jdbc structure like this.
       STATEMENT
       TEST
        action(attribute) (action u specify as INSERT)
       TABLE( here  u give the table name )
    access ( below u write the fields)
    and one more is u check the receiver communication channel in that u check properly u have given jdbc drivers, connections , user name and pass word.
    check all those things definatly u wil find the error.

  • Checking the status of the insert query in JSP

    frendz,
    i am working with JSP .i have some content to be inserted in the database.i have used the insert query in SQL for that.i am able to check whether it has been inserted properly in the SQL but i want to check the status of the insert query with its return value(so that i can confirm it does not return a error).so please help.

    The Statement#executeUpdate() returns an int with the row count. Get hold of it.
    Also see the Statement API: http://java.sun.com/javase/6/docs/api/java/sql/Statement.html
    Apart from this, I recommend you to use PreparedStatement instead. It will not only ease setting Java objects in a query (no hassle anymore with quotes), but it will also prevent you from SQL injections.
    Prepare here: http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html
    SQL injections: http://en.wikipedia.org/wiki/SQL_injection

  • To check the success of failure of the insert query in JSP

    frendz,
    i am working with JSP .i have some content to be inserted in the database.i have used the insert query in SQL for that.i am able to check whether it has been inserted properly in the SQL but i want to check the status of the insert query with its return value(so that i can confirm it does not return a error).so please help.

    gymm wrote:
    This is not the right forum to ask technical questions. Please try the JSP forum:
    http://forum.java.sun.com/forum.jspa?forumID=45
    Where do you think that we are in? Didn't you mean the JDBC forum? It is here: http://forum.java.sun.com/forum.jspa?forumID=48
    Anyway, the topic continues here: http://forum.java.sun.com/thread.jspa?threadID=5257050

  • JDBC receiver adapter for AS400-query time out due to Escape Symbol

    Hello,
    I am uisng JDBC receiver adapter for AS 400, When I execute query, the query needs to have arguments in the open and close single ticks ('    12345' )
    My XML pay load looks like this, which is RFC sender. Look at dcudcstmr in <i><b>(' 838912')</b></i>.  When receiver gets this message the ' (single quotes are disappeared.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MT_Cma_Customer_Select_Request xmlns:ns1="http://freemanco.com/xi/Get_Customer">
    - <Statement>
    - <LawsonCustomer action="SQL_QUERY">
      <access>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <i><b>(' 838912')</b></i> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)</access>
      </LawsonCustomer>
      </Statement>
      </ns1:MT_Cma_Customer_Select_Request>
    On the Receiver JDBC adapter I have tried with different combinations of Escape Symbol for Aposrophe as follows
    <b>   \
       '</b>
    As you know this is related to epcape character, I get following error all the time. Looks like the query is not able to execute in the specified time. My question is how do I get single quote as part of query.
    <b>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in ( 100001) and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr) 2007-09-20 15:56:42 Error Unable to execute statement for table or stored procedure. 'LawsonCustomer' (Structure 'Statement') due to java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000.. Setting message to status failed. 2007-09-20 15:56:42 Error The message status set to FAIL. 2007-09-20 15:56:42 Error Returning synchronous error message to calling application: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000</b>
    Any feedback or helpfull tips appreciated.
    Thank you,
    Balaji

    Raj,
    Thank you for the reponse. I am using UDF on sender to generate sql statement as you see in sender XML message. After the message reaching receiver, gets executed but no response from AS400 becasue of missing single quotes in the sql query executed.
    Sender XML sends
    <access>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <u><b>(' 838912')</b></u> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)</access>
    Receiver executes as
    select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in ( <b><u>838912</u></b>) and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)
    As you see the single quotes are missing. Like I said in previous posting I tried with following Escape Symbol for Aposrophe.
    Let me know if you need more information.
    Thank you,
    Balaji

  • How many messsages can we insert using JDBC receiver adapter in to DB

    Hi Friends,
    We are having 30 JDBC receiver interfaces in my current implementation project; load of JDBC receiver interfaces was 50 k messages per day and Performing only INSERT operation on data base.
    We have created individual communication channel for every JDBC receiver interface and max concurrency value set in CC was 5.
    Now we are testing all interfaces in quality with all possible cases, but we found that JDBC receiver adapter unable to process 50 k messages per day, we are on PI 7.1 EHP1 SP7.
    Please share your experiences with JDBC adapter receiver like per day how many messages we can transfer.
    Thanks a Ton,
    Raj

    Raja Sekhar Reddy T wrote:
    we are processing 50 k individual messages.
    >
    > I have increased max threads for JDBC receiver to 20 but no luck same rate only . My questions here is how many messages we can trasfer using JDBC receiver adapter?
    >
    > Regards,
    > Raj
    Hi raj,
    I have seen some interfaces that deal with upload of 5000 rows at a rime.. I don't there will be a restriction in the no of messages that can be transferred using the JDBC adapter as such  unless until the requirement is so para-normal and in your case it is not
    Kind regards
    XA

  • JDBC Receiver : Handling NULL return from SELECT query

    Hi All,
    I have a Proxy <-> XI <-> JDBC synchronous scenario. I have designed my message mapping to perform a select query using JDBC receiver adapter. The request message mapping structure at the JDBC end is as follows.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Matmvmt_Jdbc_Request xmlns:ns0="http://esag.com/xi/bat/MatMovementRead">
       <StatementSelect>
          <Tablename action="SELECT">
             <Table>MM_DATA</Table>
             <access>
                <SEQNO/>
                <MATERIAL/>
                <UOM/>
                <SOLDQTY/>
                <SAPUPD/>
             </access>
             <key compareOperation="EQ">
                <SAPUPD>N</SAPUPD>
             </key>
          </Tablename>
       </StatementSelect>
    </ns0:MT_Matmvmt_Jdbc_Request>
    The scenario works fine when there are records matching the select condition, but when there are no records matching the select condition (i.e. if there are no record with value SAPUPD = 'N' ) then my response message is returning the empty message strucuture as given below.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Matmvmt_Jdbc_Request_response xmlns:ns0="http://esag.com/xi/bat/MatMovementRead">
       <StatementSelect_response/>
    </ns0:MT_Matmvmt_Jdbc_Request_response>
    My requirement is that if there are no records matching the select condition then my response message should look like below.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Matmvmt_Jdbc_Request_response xmlns:ns0="http://esag.com/xi/bat/MatMovementRead">
       <StatementSelect_response>
          <row>
             <SEQNO/>
             <MATERIAL/>
             <UOM/>
             <SOLDQTY/>
             <SAPUPD/>
          </row>
       </StatementSelect_response>
    </ns0:MT_Matmvmt_Jdbc_Request_response>
    Note : I have made the occurence of the request and response message elements as miniccurs = 0 and maxoccurs = 1.
    Any inputs in this regard will be highly appreciated.
    Regards,
    Sandeep

    Hi Sandeep,
    you can not expect structure like <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Matmvmt_Jdbc_Request_response xmlns:ns0="http://esag.com/xi/bat/MatMovementRead">
       <StatementSelect_response>
          <row>
             <SEQNO/>
             <MATERIAL/>
             <UOM/>
             <SOLDQTY/>
             <SAPUPD/>
          </row>
       </StatementSelect_response>
    </ns0:MT_Matmvmt_Jdbc_Request_response>
       if there is no data in table. The response which you are geting is standard format which you can not change. Instead you map this response with mapwithdefault node function while mapping to target to make the response mapping success, even though there is no data in response message.
    thanks,
    madhu

  • JDBC Receiver - Insertions

    Hello all,
    I want to use JDBC adapter to insert data in an Oracle database. Inbound message is an idoc.
    My question concerns the error handling following an insertion failed. Example : entry key already exists...
    If possible I want to use asynchronous interface without BPM. I see the JDBC adapter ability to execute more than one time the query... Once last retry mechanism fails, how does XI react ? Is The message considered as an error one ?
    Is it possible to reprocess it later ?
    Thanks in advance,

    Hi,
    <i>
    Once last retry mechanism fails, how does XI react ? Is The message considered as an error one ?</i>
    >>>After last retry it will go for failure status..
    To handle errors :
    1) Using Sync Interface- here you can use stored procedure also for this. SO in this case, JDBC adapter will give you the response back
    2) To handle alert for the Adapter level-if you want to handle errors , you can go with either Adapter Alerts without BPM. If any error in the adapter level , because of insertion failure it will throw alert.
    3) With BPM -Send with Acknowledgement.
    Hope this helps,
    Regards,
    Moorthy

  • Executing Select query using JDBC Receiver Adapter

    I created couple types in Oracle and also new function instead of procedure
    Can I execute the above query using JDBC Receiver Adapter.
    select *
    from  the ( select cast( apr.get_distribut('', '', '', 'hdfcgd', 'CAN') as dsrTable )
             from dual );
    If possible how my message structure should look like...

    Hi vikram,
       If you use JDBC as Receiver Adapter you can only post the data to the data base I do no think so we can select the records from the data base.
       If you use JDBC as Sender hope,we can the select query in the sender communication channel.
        Hope I am clear.
      Thanks and Regardds,
      Chandu.

  • JDBC Receiver side query

    Dear Freinds,
    I am using Proxy Sender(Asyn) ---> JDBC Receiver(Asyn). I have to update a table in Oracle System based on various conditions.
    In R/3 there is a table where i have to pick 2 fields for updation at Oracle System based on 5 other fields.
    Now my question is at JDBC Receiver side is it possible to control the UPDATE query according to various parameters being passed for e.g
    Assume this is the Receiver side Data Type..
        Statement
           TableName
              Action
              Table
           Access         
              SAP_Update
              SAP_Prod_Order
           Key
              Parent_Coil
                 operation
              Coil_No
                 operation
              Sale_Ord_Item
              operation      
              Sale_Ord_No
              operation       
              Prod_Flag
              operation            
              Size_Flag      
    Operation is the attribute that will be used for the operator.
    In some messages Under Access out of 2 fields only 1 might come from sender and also in the Key (where clause) some all fields might come or some could come.
    Under these various circumstances will the Update query gets generated properly by the JDBC receiver.
    What all i should need to do ??
    Please advice.
    Thanks & Regards
    K.Ramesh

    Dear Friends,
    Below given query has to be executed at the JDBC Receiver (Asyn).
    How to define braces () and Boolean AND/OR etc in the datatype.
    UPDATE PROD_INV SET SAP_PROD_ORDER = :WA_PROD-SAP_PROD_ORDER
    WHERE  PARENT_COIL = :WA_TRAN_CTRL-PARENT_COIL AND ( ( PROD_FLAG = :C_Y AND SIZE_FLAG = :C_SPACE ) OR ( PROD_FLAG = :C_Y AND SIZE_FLAG IS NULL ) ) AND ORD_NO = :WA_TRAN_CTRL-SALE_ORD_NO AND ORD_ITEM_NO = :WA_TRAN_CTRL-SALE_ORD_ITEM
    Moreover the query that is getting generated must change based on the where clause dynamically.
    Just tell me how to do in such cases.
    Thanks & Regards
    K.Ramesh

  • Jdbc insert query hangs

    We have 2 instances of the same program running in parallel. The application inserts data to a database table. one of the instance just hangs when it is trying to insert a query to database i.e. when executing statement.executeUpdate(). We are using a prepared statement to bind all parameter values. Instance 1 keeps running but instance 2 hangs and goes in a waiting state.
    Is there any suggestions on how can this issue be investigated. I know a possible reason for hanging could be database lock, but I cannot understand, how it can have a database lock for insert query.
    oracle : 9.2.0.7
    java : jre 1.4

    user551224,
    Are you running two separate Threads that both use the same database connection?
    This issue has been discussed previously in this forum.
    Search the forum archives for more details.
    It could also be because of a database lock.
    Are you trying to insert rows into the same table?
    You could try using the FOR UPDATE NOWAIT clause to verify.
    Good Luck,
    Avi.

  • Issue with processing time of JDBC receiver adapter

    Hi all,
    We are using PI 7.1 EHP1.
    We have an issue with JDBC receiver adapter taking too much time to process messages.
    We are using XML SQL format message protocol with INSERT_UPDATE as the document format.
    Each message can contain multiple records, i.e. 1 single message can result in many updates/inserts.
    Currently, time taken to process in 6-12 secs which is quite high considering the messages are not very large in size.
    We sent the statements to Oracle DBA to see if anything about the queries being used is causing issues. Awaiting inputs.
    In the mean time, wanted to check if there is anything that can be done from PI side that will help us improving the processing time.
    Thanks in Advance,
    Sailaja.

    Hi,
           i think the main cause is  query taking long time to execute in DataBase.
          -> increase the read time and response time in the JDBC receiver adapter.
      In the advanced mode table section of sender channel and receiver channel configurations, we can set driver properties for each DB connection. Any such property would have to contain prefix 'driver:'(with out quotes).
    For Oracle Database JDBC thin driver 10.2.0.3 version, the property oracle.jdbc.ReadTimeout helps to set read timeout while reading from the socket. Also for setting login time out in Oracle, we use oracle.net.CONNECT_TIMEOUT. To set these two properties use as follows: driver:oracle.jdbc.ReadTimeout 1000 driver:oracle.net.CONNECT_TIMEOUT 1000 The TimeOut Driver properties like ReadTimeout and CONNECT_TIMEOUT are in milliseconds.
    Refer note 1078420 for more details
    please go through this blog i hope it will help you.
        http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c059d583-a551-2c10-e095-eb5d95e03747
    regards,
      ganesh
    Edited by: ganesh.nijampudi on Oct 25, 2011 12:00 PM

Maybe you are looking for

  • Open items switch on for a GL(FS00)

    Hi Experts, I have a GL a/c which need to be changed to be open item(Now it is line item  management and have approx 100 line items posting) I have opened a new GL having open items(for transfering the amount from old GL) I have blocked the old GL fo

  • Define read-only authorization for specific field(s) on a form for 11.5.9

    Dear all, Can you pls let me know how is it possible to define read-only authorization access for specific field(s) per responsibility / user on a form in 11.5.9? For example I want to protect the item master file by assigning for example to users wi

  • When Podcast Producer says it's running but isn't (apache fails to start)

    We've set up a new Intel XServe up with Leopard Server (10.5.6) and are having trouble persuading the Podcast Producer engine from starting. First, we've set up all the accounts and settings exactly per Apple's PP documentation. Yes, I'm aware of the

  • Weird text in forwarding message

    Information added that is non relevent to the reciver of a forwarded message. For example. X-Account-Key: account1 X-UIDL: 41CAAF885C432D7C65DF69F3D9AE258A X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 X-Mozilla-Keys: And alot more see image on

  • Itunes could not back up iPhone

    iTunes could not back up iPhone "name" because an error occurred. Not on the computer and not in the Cloud. When I try to sync I always get this message. I have a iPhone 4S with version 6.1.2 / iMac 2012 with 10.8.2 / iTunes version 11.0.2 I also hav