Fundamnental question on jdbc sender adapter

Hi ,
I have a scneario like
DB System „³ JDBC Adapter „³ XI  -„³ RFC Adapter „³ SAP R/3 --„³ True „³ response thru same RFC adapter „³ XI BPM will call JDBC Apdapter with Update statement
                                                                                False „³ response thru same RFC Adapter „³ XI BPM will call File adapter with Append
now when i use send jdbc adapter , i wld need to have a status flag in my database which would be update when ever data is transmitted sucessfully else the same data would always be picked up .
i want to know do i need to create a reciever jdbc adapater too for this . because when ever i use sender jdbc adapter and this must be a very common situation . that i have to update the table so that the rows are not picked up again . jdbc senser  has an update statement . writtng an updtae query will it not solve my problem.

Hi Amit,
A JDBC sender adapter has 2 essential fields,
1. SQL Statement
2. Update Statement
Your SQL statement will contain your SELECT statement and once your SQL statement is executed, UPDATE statement is executed. This is done so that records that have been selected by the SQL statement should not be selected again as the JDBC sender adapter will poll over the database for every poll interval.
If you want to SELECT something from your Database, then you will have to go for a JDBC sender adapter.
But, if you want to insert/update your Database, then you can go for a JDBC receiver adapter.
Multiple insertions are possible for a JDBC receiver, but multiple Selection queries (different select queries) are not possible for a single JDBC sender adapter.
Just check these links to understand how JDBC adapters work,
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm">Configuring the Sender JDBC Adapter</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm">Configuring the Receiver JDBC Adapter</a>
A few initial steps required to be followed for your Scenario are:
1. Then create a sender agreement using jdbc o/b interface.
In receiver determination specify ur bpm as receiver.
In interface determination specify the abstract interface tht u created for jdbc.
(u should copy the jdbc interface and then create abstarct interfce of it)
No receiver agreement required for BPM.
2. Create receiver determination, using BPM and the abstract interface for legacy tht u created,
Receiver as legacy system.
Create Interface determination and receiver agreements.
Also see through this blog which talks about <a href="/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter sender and receiver adapters</a>
Regards,
Abhy

Similar Messages

  • JDBC sender adapter Q - db.disconnect - option

    I have a question in JDBC sender Adapter configuration.
    The value for db.disconnect = NO|YES,
    The database connection is released and then reestablished before each poll interval.
    The default value is NO.
    Which value is preferred, taking the performance into consideration? Can anyone please explain...
    reg

    Which value is preferred, taking the performance into consideration?
    Connection increases load on the system. Thats why it is always preferred to disconnect after the completion of operation. But logically, if the polling interval is so small that the disconnect and reconnection will take an equivalent time, then it is better to let the earlier connection open.
    In general terms, performance wise, disconnect and reconnect is a better option.
    Regards,
    Prateek

  • JDBC Sender adapter question

    Hi,
    Scenario: JDBC-XI-R/3
    I am trying to run the JDBC sender adapter every 3 minutes based on the poll interval to select rows from Oracle db.
    In the select and update statements when I use the rownum < '11' and flag condition (Y or N), then I see XI is picking up 10 rows in a two times and I see two parallel processes in SXMB_MONI.
    I want XI to run only pickup 10 rows for every 3 minutes and update only 10 rows in Oracle to "N" from "Y".
    When I take out the rownum condition from update I do not see this issue.
    <u>Update statement:</u>
    Update <TABLE> set status_flag = 'N' WHERE status_flag = 'Y' and rownum < '11'.
    Can some body point me in the right direction ?
    Thanks
    Steve

    Hi there,
    See if this works. Though I never came across such a scenario, I can think what to be done in this case.
    Create a staging table as same structure as from where our JDBC adapter is picking up the data currently.
    Whrite a tigger(after delete) on staging table to call a stored procedure.
    stored procedure will select the data from source table and insert them in to staging table (rownum<11) as well as update the flag column in source table.
    Now load the staging table initially from source table with only 10 rows (one time process). Configure your JDBC adapter on staging table. In update sqlquery field of JDBC adapter write delete statement for all the data from staging table to be purged, as there will not be more than 10 rows at any time and after each time the adapter supplied Delete statement will purge the data so you dont have to worry about selecting 10 rows or updating 10 rows from JDBC adapter. As every time the trigger after delete statement will fire and load only 10 rows from source marking those 10 rows as read_already status.
    NOTE: for Calling stored procedure from trigger follow your database SQL reference documentation.
    Thanks.
    -Nilkanth.

  • JDBC Sender Adapter - Records sent one at a time

    Hello everyone,
    Here's a summary of my scenario JDBC > XI > RFC.
    My select statement (JDBC) looks like this:
    SELECT * FROM BATCH WHERE STATUS='Y'
    The problem is, whenever it returns multiple rows, the RFC can only accept one record at a time (1...1), so I need to pick up the records from the DB and send them one at a time.
    Currently, this is how the output XML looks like:
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <row>
      <number>200000000472</number>
      <status>Y</status>
      </row>
      <row>
      <number>200000000473</number>
      <status>Y</status>
      </row>
      <row>
      <number>200000000474</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    Instead, I need each row to be picked up and sent one at a time.
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <row>
      <number>200000000472</number>
      <status>Y</status>
    </ns:SQL_RESP_MT>
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <number>200000000473</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <number>200000000474</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    Does anyone know the changes I need to make in my current SELECT statement or the JDBC Sender Adapter to make this possible.
    Thanks in advance!
    Glenn

    Thank you all for your replies. I'll check out your link in a bit, Phani. Thanks!
    A SpliByValue won't work since the BAPI Header is (1...1).
    Luckily, during testing, I found out that the BAPI (BAPI_PRODORDCONF_CREATE_TT) handles multiple lines in one of the subelements of the header so that was where I mapped the Rows.
    I might need to trigger multiple BAPIs in the future, so I'll take a good look at your suggestions, but for now, I'm marking this question answered.
    Warm regards,
    Glenn

  • JDBC Sender Adapter

    Hi everybody
    I have the following error in my JDBC to JDBC scenario; I  configured the JDBC sender adapter and receive the following message back. In the Configuration I set “Document Name” to MT_ScanningStatus:
      <?xml version="1.0" encoding="utf-8" ?>
    <MT_ScanningStatus>
    <row>
      <ScannerNb>1</ScannerNb>
      <Status>0</Status>
      </row>
    <row>
      <ScannerNb>2</ScannerNb>
      <Status>2</Status>
      </row>
    <row>
    <ScannerNb>3</ScannerNb>
      <Status>0</Status>
      </row>
    <row>
      <ScannerNb>4</ScannerNb>
      <Status>2</Status>
      </row>
      </MT_ScanningStatus>
    I defined the  corresponding datatype as follow:
    DT_ScanningStatus Complex Type
            row              Element 1...unbounded
              ScannerNb      Element 1
              STatus         Element 1
    In the following Mapping I tried to Map this structure to the Structure used to send an Update SQL Statement to the JDBC Receiver to update the same table.  A normal Test in the Mapping Tool runs fine but when I enter under source the above incoming Message from the JDBC Adapter I got the following error. I think the incoming message cannot be interpreted. Can someone support me? I read the documentation for the JDBC adapter and also a lot of weblogs and discussion threads. Maybe someone knows a weblog describing more detailed the sender adapter and how to handle the incoming Message!!
    Thanks in advance Oliver
    14:58:03 Start of test
    Compilation of MM_JDBC_to_JDBC_test successful
    Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)
    at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:130)
    at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:68)
    Root Cause:
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)(:main:, row=1, col=8) -> com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)
    at com.sap.engine.lib.xml.parser.XMLParser.scanPI(XMLParser.java:2009)
    at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2657)
    at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2713)
    at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:162)
    at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:132)
    at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:142)
    at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:245)
    at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:276)
    at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:338)
    at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:128)
    at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:68)
    at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:144)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:128)
    at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:68)
    Caused by: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)
    at com.sap.engine.lib.xml.parser.XMLParser.scanPI(XMLParser.java:2009)
    at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2657)
    at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2713)
    at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:162)
    at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:132)
    at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:142)
    at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:245)
    at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:276)
    at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:338)
    at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125)
    ... 3 more
    Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)

    Hi Oliver,
    >>>>source the above incoming Message from the JDBC Adapter I got the following error. I think the incoming message cannot be interpreted.
    do this:
    in the test tab try your mapping once more
    (the correct one)
    then save the source xml as file
    next compare this saved file with the one
    you get from the jdbc sender
    >>>>>Declaration not allowed here.(:main:, row:1, col:8)
    and compare the first lines in those two XML files
    are they the same?
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • PI 7.1 JDBC sender adapter huge load from DB select

    Hi,
    We have the problem that the JDBC sender adapter is selecting a huge amount of data from a Oracle DB. The Adapter seems to be able to cope the load but when sending to the integration server it causes problems. We found values to adjust but I dont think increasing them is a good solution.
    My question is:
    Is there any way to send the data in blocks with using the PI standard JDBC adapter ?
    Thank you and regards,
    Andreas

    Hi,
    You can use the below parameter in JDBC sender.
       Specify additional Parameter Names and Parameter Values in the table.
    Due to messages of large size it may cause issue
    Following are the parameters to be set in the table to limit the message size per polling:
    ●      msgLimit :
    ●      maxMsgSize :  SAP note 1253826.
    ●      maxRowSize : SAP note 1253826.
    Additional parameters are published in SAP Note 801367.
    Refer the link.
    Defining Additional Parameters in Advanced mode
    http://help.sap.com/saphelp_nw73/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

  • JDBC Sender adapter - Oracle - Stored Procedure - Error

    Hello,
    Need few clarifications on JDBC sender adapter and stored procedures when connecting to Oracle DB.
    My scenario is, Oracle to SAPBW. So in sender JDBC adapter, we have used a SP having multiple SQL statements it, esp. one of the SELECT statment having Joins on a table and View.
    My questions are,
    1) Is it possible to have more SQL statements in SP for Sender JDBC?
    2) Is the SP of Oracle DB returns resultset or cursor?
    I have tried in searching the forum perticularly for connecting to Oracle as Sender and below like said  that there is a limitation of XI JDBC when connecting to Oracle.
    Executing an Oracle Stored Procedure from Sender JDBC adapter
    So please clarify the doubts and help me.
    With regards,
    Jilan

    Hi Jilan,
    Unlike what was mentioned in the link given by you that oracle returns cursor and not resultset is not completely true. It may be difficult but certainly not impossible.
    Refer : http://www.enterprisedt.com/publications/oracle/result_set.html
    regards
    joel

  • JDBC Sender Adapter - Restrict number of rows fetched, Oracle

    Hi,
    Is it possible to restrict the number of rows fetched by the JDBC Sender adapter at each run? What would the appropriate Select and Update statements be to make sure a limited number of rows are selected and flagged as processed?
    We are connecting to a Oracle RDBMS.
    //Johan

    hi,
    have a look at this info:
    about oracle and limiting number of rows
    http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • JDBC Sender Adapter Configuration

    Hi All,
       i want to know if we can configure JDBC sender adapter to run only when we ask it to.
    Normally what happens is tht the JDBC Sender Adapter polls the database at specified intervals, i dont want that. I only want it to poll the database when i get a file from RFC.
    Regards,
    Sumit

    Hi,
    Thank you.I had posted a similar questions a few dayz back and someone said that if we make the jdbc adapter synchronous it would solve our purpose, but it wont.
    Bhavesh i went thru ur blog in the mornin b4 postin d question..btw itz a nice blog
    Domenico : this is not what im looking for.
    Cheers,
    Sumit
    Message was edited by: Sumit Khetawat

  • JDBC Sender Adapter - SQL-Statement

    Hi,
    I'm using the JDBC-Sender-Adapter and need to use a SQL-Statement like this:
    SELECT * FROM myTable WHERE myDate = <current_date>
    Is such a dynamic-sql possible, or can I only use static sql-statements. And if yes how can I solve this problem.
    many thx

    Hi Werner,
    inside the <b>Query SQL Statement</b> you can use <b>SQL EXECUTE</b>
    which can execute a stored procedure
    in which you can do
    SELECT * FROM myTable WHERE myDate = <current_date>
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • JDBC Sender Adapter Threads and DB connections

    Hello,
    I have got a few questions regarding the behaviour of the JDBC sender adapter.
    Suppose I have configured a short polling intervall of 10 seconds. On the first poll a message is processed. How does the JDBC sender adapter behave when there is a second poll after 10 seconds and data is available? Does it wait until the first poll has been processed completely or does it start a second thread processing a second message in parallel? If the latter is true, would a second database connection be retrieved or would both threads share one database connection? What would happen if a large number of unprocessed threads were waiting?
    Kind regards,
    Heiko

    hi heiko,
    whether the first thread is successful or not automatically a new thread is created after the polling interval.if the previous thread is accessing a data the database would lock that one for theat thread so until the lock is released the other thread has to wait for it.so you can see the thread waiting in SAP WEb GUI.There you can see a green indicator on the status column corresponding to the service.
    so a new service is created after the pollling interval irrespective of the pevious service's result and it waits in the queue till its resource is otained.
    configuring sender jdbc to poll a databe is not an advisable one that too this short polling interval.this will increase the queue length and obviously cause performance issues...........

  • Update- statement in JDBC sender Adapter

    Hi ,
    I have a requirement where I am trying to fetch data from ODS based on some flag and immediately I want to update the flag status . So I used selected and update in JDBC sender adapter .
    But I have one question , in the small timeframe where  XI has done a select and just before  XI could  issue the update statement  if a new record is added to ODS . Then  that new record will also get updated though it wasnot selected in select statement .
    Can someone let me know how to overcome this problem ; as I want to make sure I update only those recrods which are selected in select statement ??
    Thanks & Regards,
    Suvarna

    Hi,
    Check out the following thread. It gives the exact answer to this question.
    JDBC Sender Update Query
    One of the replies in the above thread:
    I put in an OSS note asking this exact question with your specific example, and got a reply. I was referred to OSS note 0000831162, where it is explained very unambiguously that the SELECT and UPDATE queries are run in the same transaction.
    Regards,
    P.Venkat
    Message was edited by:
            Venkataramanan

  • JDBC Sender Adapter - NOT FETCHING RECORDS...

    Hello Experts,
    I know this was answered in a separate thread (JDBC Sender Adapter -  NOT FETCHING RECORDS -PROCESSING STARTED).
    However, my question is, Is there a way that we can be notified if a channel has stopped fetching records?
    or is there a reporting tool that can be used to check/monitor if a channel is not processing any messages?
    Thanks & Kregards,
    allar

    Hi Sreedhar,
    Thanks for your reply.
    These case is not being captured by our alert configuration because its not throwing any error.
    in the communication channel monitoring, we see only something like this..:
    3/16/09 8:25:19 PM Processing started
    3/16/09 8:34:20 PM Processing started
    3/16/09 8:33:55 PM Processing started
    3/16/09 8:32:54 PM Processing started
    but no error is being displayed nor sent.
    Also, there was a case that the channel just stopped fetching, even though everything is active.
    example log:
            3/12/09 8:32:54 PM Processing started
    We're looking for ways on how we can trap these scenarios as early as possible,  get us notified and   perform adapter-lock release when needed.
    Regards,
    allar

  • Can we proceed even if no ResultSet Returned In JDBC Sender Adapter ?

    Hi friends ,
                           My scenario  is  JDBC to RFC .  I am reading table using JDBC Sender Adapter  and i am passing values to RFC .
                          If my select Query has not returned  any row then it won't come to Pipeline right ?
                            What i want is
                          <b>  If no rows returned then call one RFC  to insert the remarks .
                            If rows found call another RFC  to insert the values </b>
                           How can i handle the Situtation ?
                          Expecting your reply asap
    Regards.,
    V.Rangarajan

    Hi Rangarajan,
    i answered your question and shown up a solution: If Connection Lost in JDBC or no resultset returned how to handle ?.
    Double postings makes it difficult for all involved people to inform theirselfes about the point of discussion.
    The polling sender adapter is doing nothing, if no rows selected. So how do want to send a message?
    You have to use the JDBC receiver adapter, invoke the message by a job in ERP, for example with a self written RFC or a proxy. You can decide at ERP side, which function module it to be called. Of coz there are other possibilities, for example to put the logic into a business process, but you wont have success with the sender adapter.
    Regards,
    Udo

  • Storedprocedure trigger using JDBC sender adapter.

    Hi All,
    How can i execute the storedprocedure using JDBC sender adapter. I need to trigger the storedprocedure once in every hour. so i would like to use the JDBC sender adapter. My question is what is the SQL i need use in the SQLstatement parameter..?? I don't want to send parameters and not expecting any return values. It should just trigger the procedure.
    Thanks in adv.
    Regards,

    Hi Murali,
    it is possible to execute a stored porcedure using a sender JDBC adapter.
    Just Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    This will have to be done for your SELECT statement in JDBC adapter. ALso, make the UPDATE as either TEST, if you dont want any updations or give an UPDATE statement for the UPDATE query.
    Set the polling interval of your JDBC adapter to 1 hour and it will work like u want.
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    Bhavesh

Maybe you are looking for

  • Child package cannot read param value from parent ssis package

    Hi all, I think I must be crazy !! i have a big problem in my ssis project . i have more than 40 package one parent and 39 childs  i use configuration method to get variable values from parent to child packages and it work well .. but when i copy my

  • SDM Server is not starting up in SAPMMC

    SDM is not starting up in SAPMMC, the status is stopped. If I look at developer trace the error msg is following. Any help !! [Thr 6048] Mon Aug 13 11:46:26 2007 [Thr 6048] JLaunchIExitJava: exit hook is called (rc = 16) [Thr 6048] ******************

  • Error message while runing the Synch Job in Background job after Patch Upgd

    Friends We are 5.3 GRC CC on Windows 2003 and ECC 6.0  BI 7.0 We just upgraded the patches to 12 for GRC CC and ran the Synch job in background.... Eveytime we run the Synch job for Usre Roles and profiles or Batch Risk Analysis in Background, job fi

  • Importing clip with Title

    (first time this way) I created an animated titles clip (in After Effects) and imported it into my FCP session. How do I get rid of the black background in the title clip. I know it's not an Apple product but when I've created titles in FCP in the pa

  • Why won't videos open and play?

    Using Safari, I try to open video from Facebook and other sites and they won't open or play. I can sometimes get them to load and play if I download them and open them in a separate window. Also, I have been opening them in Chrome and they all open a