JDBC adapter questions

Hello all,
I have been playing around with the JDBC adapter on my XI sandbox to figure it out.  I read through a few guides and I almost have a good handle on it, but there is still a big question lingering.  I have configured an example scenario in which I would like to pull data out of the USR01 table from the XI database and transform some user data and place it back in the same table.  I was able to get my connections correct and have the communication channel successfully execute SQL statements to alter the data.  For example, my <b>Query SQL Statement</b> in the sender communication channel is as follows:
SELECT * FROM USR01 WHERE BNAME='ZTEST2'
And the <b>Update SQL Statement</b> in the sender communication channel is:
UPDATE USR01 SET BNAME='ZTEST'  WHERE BNAME='ZTEST2'
This works fine and when I go to transaction se16 and pull up that table I see that the username gets modified when the interface is activated.  However, I haven't really figured out exactly how to configure the communication channel / data types so that I can run a SQL statement that will populate my data type that I created for mapping.  In other words, lets say I created a data type that looks as follows:
mt_sender
    row
         MANDT
         BNAME
         STCOD
And I want to populate that data type with data from the USR01 table (in the corresponding fields), what would my SQL statement look like in the sender communication channel?  I read a few weblogs on how to do scenarios like this, so I built my receiving Data Type to look like this:
mt_receiver
     STATEMENT
          ROW
               action
               TABLE
               access
                    MANDT
                    BNAME
                    STCOD
But I still don't understand how exactly XI correlates the data types / mapping and transformations to the SQL statements....
I'm having a hard time putting this into words, but basically I'm asking a rather high level question I think.  How does XI relate the data types to the data it pulls from the SQL statements?  How do I actually get the SQL statement to populate my data types so I can do mapping and then repopulate the database table again?  Does this make sense?

Hi Harrison,
      Also check out these JDBC structure links related to your question:
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm</a>
Regards,
Subhasha Ranjan

Similar Messages

  • Questions about sender JDBC adapter

    Normally we use sender jdbc adapter in this way:
    query statement:
    SELECT * FROM table WHERE processed = 0
    update statement:
    UPDATE table SET processed = 1 WHERE processed = 0;
    The update statement will be executed after the message has been successfully sent to XI.
    My questions is that what will happen in this scenario:
    A new record (processed=0) is added to the database table when a message is sent to XI with query statement but not finished?
    After the message is sent to XI successfully, XI will execute the update statement. Then  the new added reocrd will also be updated to 1 although it hasn't been sent to XI.
    Does XI have some control or special check for this issue?
    Regards
    Hui

    Hi,
    this can be handled by the ISOLATION LEVEL FOR TRANSACTION  setting of the sender Jdbc adapter.
    make the transaction handling to SERIALIZABLE  or REPEATABLE READ and then until the data is not read from the JDBC adapter and it is not updated by the UPDATE statement , no new rows will be allowed to be inserted into the database. The database will be write locked.
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    <i>Isolation Level for Transaction
    There are different levels of database transactions known as isolation levels. The isolation level determines how transactions running in parallel influence each other. The options correspond to the JDBC constants:
       Default (default setting of the respective database)
         None
        read_uncommitted (weakest setting)
        read_committed
         repeatable_read
         serializable (strongest setting)</i>
    Regards,
    Bhavesh

  • JDBC Adapter Newbie question

    Hi,
    I'm learning about XI and have a question regarding the JDBC adapter.
    Is it possible to generate interfaces and data types in the design view from the jdbc adapter under XI or do the interfaces have to be designed manually?
    Kind regards,
    Heiko

    hi,
    they have to be degined manually in XI
    have a look at this page:
    http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/content.htm
    and check how interfaces for sender and receiver adapter have to look like
    Regards,
    michal
    Message was edited by: Michal Krawczyk

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

  • QUESTION abt "SQL_DML" of the Receiver JDBC Adapter

    HI ALL,
    i hav a doubt abt "SQL_DML" of the Receiver JDBC Adapter.
    i wanna use two SQL Statements in the "SQL_DML" structure to manipulate two tables.
    i.e.
    <root>
      <stmt>
        <Customers action="SQL_DML">
          <access>
                          INSERT INTO Customers VALUES (u2019$NAME$u2019, u2019$ADDRESS$', '$KEYFIELD$u2019);
                          INSERT INTO Companys VALUES('$NAME$')    
          </access>
          <key>
            <NAME>Company</NAME>
            <ADDRESS>Street 3 </ADDRESS>
            <KEYFIELD>CO</KEYFIELD>
          </key>
        </Customers>
      </stmt>
    </root>
    BUT i cant ascertain if it permit like this writting above ??
    Requset help in this regards.
    Thx in advance.
    brian

    Hi,
    You need to have two different statements. Each for one insert query. Your query will come under access tag and palceholders under kay tag. Action will remain same as you have given, but under both statements.
    Ex:
    <root>
    <stmt1>
    <Customers action="SQL_DML">
    <access>
    INSERT INTO Customers VALUES (u2019$NAME$u2019, u2019$ADDRESS$', '$KEYFIELD$u2019);
    </access>
    <key>
    <NAME>Company</NAME>
    <ADDRESS>Street 3 </ADDRESS>
    <KEYFIELD>CO</KEYFIELD>
    </key>
    </Customers>
    </stmt1>
    <stmt2>
    <Customers action="SQL_DML">
    <access>
    INSERT INTO Companys VALUES('$NAME$')
    </access>
    <key>
    <NAME>Company</NAME>
    </key>
    </Customers>
    </stmt2>
    </root>
    Hope this helps.
    Regards,
    Siddhesh S.Tawate
    Edited by: siddhesh tawate on Apr 24, 2009 8:10 AM

  • About 2 questions for jdbc adapter.

    1.
        which transaction isolation level should i set for jdbc sender adapter to guarantee data to be selected correctly?
        not error occurs.
    2.
        how to reslove time_out error for jdbc adapter. especially sync query in volume data case.

    Hi,
    If you want to maintain the sequence and data consistency, then use isolation level "serializable" and QoS as EOIO.
    Set / Increase the time_out parameter in the adapter module.
    Regards,
    Neetesh

  • The Question Set about JDBC Adapter

    Hello Experts,
    I have some confusion about the JDBC Adapter as below, pls help me :
    1. While the JDBC Sender Channel is executing the select statement then I interrupt it, if the ResultSet ought to have 5000
        records, so I stop the Channel that it just can select 3000 records.
        I wanna know if the 3000 records will go ahead to the Receiver Channel ?
    2.If there are 7000 records ought to insert DB via JDBC Receiver Channel, but I interrupt the Receiver Channel when it is
       running, now there are 4000 records have be insert DB (I know it doesnt commit, because I dont choose the option of
       u201CAuto-Commit-Enabledu201D in the Communication Channel), then what will occur ??
       a rollback? or commit? or other circs?
    3.By the way, the sender channel have sent some Msgs but the receiver channel is stopped now, I dont wanna the
       Receiver Channel getting the Msgs when start the Receiver channel, how can I get the goal?
    THX for ur time and effort,
    Brian

    Hi Brain,
    3.By the way, the sender channel have sent some Msgs but the receiver channel is stopped now, I dont wanna the
    Receiver Channel getting the Msgs when start the Receiver channel, how can I get the goal?
    In order to achieve this go to RWB --> Message Monitoring --> Search your Messages and Cancel all the Messages before you START the Reciever Channel.
    Once the messages are canceled.....you can START the Reciver Channel it will not receive them.
    Cheers
    Dhwani

  • Reg: How to Stop Polling of JDBC Adapter without Scheduling the adapter

    Dear Gurus,
    Here I am having one requirement. My clients wants to send data from JDBC adapter (ORcale System table) to R3 system via RFC.
    His Requirement::
    1. He is not telling the time of data flow from Oracle server so that based on that we can schedule the adapter in the Communication Channel monitoring (Availablitiy Time Planning) or Else we can Schedule by deciding the setting of the polling interval time.
    2. He is telling that When ever he waants to send the data he will place one dummy file in the File Adapter FTP location so that it will became an Indication for u to poll the jdbc adapter and to transfer the data to R3.
    3. Untill he keeps the file or gives indication he doesn;t want to communicate with Oracle server due to some security and it s a most important data base he doesn't want to disturb that Oracle Server as so many business are running  on that.....
    We Proposed::
    1. Atleast you need to tell the scheduling time or poll interval time so that we can schedule our adapter.
    but he s not accepting for this
    2. Atleast U need to give access for Data base to enter one more extra field like STATUS CODE so that we will add one number and we keep on Update in the Update table and based on that Update table statement it will poll.
    but he s not even accepting for this
    3. Finally we prposed that to create another table in the Oracle SYstem as Dulplicate Table which is similar to Standard Orginal table when ever he wants to pick the data please keep that data in this Duplicate TABle so that JDBC adapter will pick the data from thsi TABLE instead of picking the data from that standard table so that it will not effect any standard table data in the table.
    but he s not even accepting for this
    We have done some R & D:::
    1. WE approached even through BPM and via switch conditions is one scenario
       FILE RECEIVE >SWITCH CONDITION> RECEIVE AND SEND or else EXIT
    2. Using correlation in anotehr scenario means correlating File adapter and JDBC and based on one dynamica value it will goes to SEND STEP ( RECE IVE --> RECEIVE --> SEND STEPS )
    Even though we know this...concept that...we jsut tried::
    In BPM we can control the flow in XI 3.0 but we cannot Stop the Polling of JDBC adapter at backend because one the data comes from FILE adapter it will keep on HOLD untill it receives the JDBC from Oracle then based on the condition or Correlation it will goes futher SEND step means after that file adapter is picking file or not ...what ever it may be JDBC will polls at backend and brings that data to BPM"
    Hence sugest me How to Stop Polling of JDBC Adapter without Scheduling the adapter or else using STATUS CODE Update statements in JDBC Tables 
    Regards:
    Amar Srinivas Eli

    Hi! All,
    Finally I decided to do the scenario in two steps:
    1: FILE REQ --> JDBC REQ -->JDBC RES --> FILE RECV
    2: FILE RECV --> RFC
    But I am getting issue while doing first scenario
    Desgn :
    I have created 2 Synchronous interfaces :
    1) FILE 2 JDBC REQ
    In this a) out put message is FILE  Req
              b) Input msage:; FILE RES
    2} JDBC2FILE RECV
            a) Output mesage;; JDBC REQ
            b) Input Msge :: JDBC Response
    Mappings:
    1) File REQ-->JDBC REQ
    2) JDBC RES-->FILE RES
    Interface mappings:
    1: FILE 2 JDBC REQ--> JDBC 2 FLE RECV
    CONFIGURATION ::
    1: One Seder File CC
    2: Two reciever CC's one is for JDBC RECEIVER and other s FILE RECEIVER
    3; One Sender Agreement
    4: 2 Recver agreements
    5: One Interface Determination and
    6: One RECCV Determination
    My Question;;
    1. First let confirm whether my development steps are right or not ?
    2: Another thing s I am not sure reg Configuration Steps means
    whetehr one interface determination and one Receiver Determinations are required or not as these are synchronous Interfaces
    3: main Issue is::::
    If my scenario s FILE2RFC2FILE then I will get RFC response automatically but here issue is this is JDBC
    My reqquirement is By sending one Field from fILE to JDBC REQ it needs to send entire TAbLE records as a Response to file as XML
    without having Sender JDBC how can I send the JDBC Res to FILE and If that is the case then again JDBC adapter is polling which is contradict to the client requuirement which i explained above.
    pleas suggest me the Detailed steps mainly Colloboration agreements and logical routings and
    also explain in detail if i can  go for BPM
    Also give cleear blogs but before giving make sure that it contains detailed screen shots because aIready gone thorugh
    Scenario File-JDBC-RFC
    File<-->JDBC Sync coomunication.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/file-rfc-file(Without+BPM)
    /people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough
    Regards::
    Amar Srinivas Eli

  • Sender JDBC Adapter issue.

    Hi folks,
    I would like to know how can I configure a sender JDBC channel without specify a poll interval? I know that I can specify this poll interval with a period of time that I want; it could be in seconds and even in mseconds. But, this can cause a lot of access to the Data Base SQL Server and consequently can cause network slowness.
    I would like to know if there is any data base event that can trigger my jdbc sender adapter or any other workaround that can prevent many accesses to one Data Base.
    Any ideas are appreciated.
    Thanks in advance,
    Ricardo.

    Hi,
    with XI SP19 you can schedule your jdbc adapter easily:
    (in standard)
    /people/shabarish.vijayakumar/blog/2006/11/26/adapter-scheduling--hail-sp-19-
    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>

  • Calling Stored Procedure without JDBC-Adapter

    Hallo,
    as it is not possible calling Stored Procedures with the parameter Typ Record in Oracle my question: It is possible connecting to DB using native java-code for example in Mapping?
    Thanks in advance,
    Frank

    Hi Frank,
    Maybe you can use the DB look up using the JDBC adapter in your mapping.
    Just check this blog for the same,
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    As for calling an Oracle Strored Procedure, it is possible using a RECEIVER JDBC adapter, but not a SENDER JDBC adapter.
    <i> import the jdbc-driver (oracle) in an archive in Designer.</i>
    Also, this imported archive should be under any Namespace, but, it should be in the same SWCV as the one in which the mapping is being executed.
    Regards,
    Bhavesh

  • Xi JDBC Adapter - Query SQL Statement & Update SQL Statement

    Hi!
    I configure the JDBC adapter sender (XI) to take data from Oracle database.
    I set the Query and Update SQL Statement in the Processing parameters of the communication channel in this way:
    Query SQL Statement :
    SELECT * FROM XI_TABLE WHERE STATUS = 'WAIT' ORDER BY ROW_NUM
    Update SQL Statement :
    UPDATE XI_TABLE SET STATUS = 'DONE', DATE = SYSDATE WHERE STATUS = 'WAIT'
    My question is :
    If a new record with the field STATUS = 'WAIT' is added to the table (xi_table) during the time between the execution of the query statement and the start of the update statement, what will happen to that record during the update?
    There is a way to avoid the update of that record? or to pass to the update statement only the record selected in the query statement?
    Please, may you give me some example?
    Thanks,
    Francesco

    hi,
    did you check "Isolation Level for Transaction"
    for the sender jdbc adapter?
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    michal

  • JDBC adapter access to iSeries DB files in libraries

    Hello,
    We try to connect to an AS400 iSeries system via JDBC adapter!!! (not a typical scenario I think!)
    The files (so called by IBM but we identify them as tables in our understanding ) are stored in libraries.
    The question is how to add this library (like a path?) into JDBC adapter and interface description.
    Adapter:
    JDBC Driver: <driver name>
    Conenction: <physical address of iSeries DB>
    LogIn data: xxx
    Interface description:
    MESSAGE
        STATEMENT   = []
        TABLENAME
                ACTION    = select
                TABLE      =  DBNAME.TABLENAME
    The interface description is from another successful implementation on an ORACLE DB.
    I think the table definition should contaion the library like
      <DBNAME>.<LIBRARY>.<TABLENAME>
    separated by dots!
    I am not sure. So can anyone correct or agree?
    Currently we are not ready for a first try because the driver installation is next week.
    But it would help to know what we have to do instead of spending possibly a lot of time for trial and error.
    Kind Regards
    Dirk
    Of course, helpful answers are valued by points!

    I don't know this mechanism of high availability with 2 IP, but if you really have 2 hostname you should think to a method to switch from a node to the other in easy way, deactivating one and activating the other (for instance with the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/45/0c86aab4d14dece10000000a11466f/frameset.htm">Controlling a Communication Channel Externally</a>)
    I suggest you to verify how it will be in production instance: real cluster ? switch over ? virtual IP ?
    Regards,
    Sandro

  • JDBC Adapter - transaction handling

    Hi,
    I have a question. I use graphical Message Mapping and standard documents formats for Receiver JDBC Adapter.
    Now I need to push a delete call and insert calls in one message looks like that one f.e.:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_CostcentreUpdate xmlns:ns0="http://rtl.de/xi/TransCostcenter">
    - <StmName>
    - <dbTableName action="DELETE">
      <table>KOSTENSTELLEN</table>
      </dbTableName>
    - <dbTableName action="INSERT">
      <table>KOSTENSTELLEN</table>
    - <access>
      <KOSTL>0000001000</KOSTL>
      <GUELTVON>2005-09-01</GUELTVON>
      <GUELTBIS>9999-12-31</GUELTBIS>
      <ABTEI>Test1</ABTEI>
      <VERAK>Name1</VERAK>
      <KHINR>K1000_1010</KHINR>
      <KTEXT>Test1</KTEXT>
      </access>
    - <access>
      <KOSTL>0000001001</KOSTL>
      <GUELTVON>2005-03-01</GUELTVON>
      <GUELTBIS>9999-12-31</GUELTBIS>
      <ABTEI>Test1</ABTEI>
      <VERAK>Name2</VERAK>
      <KHINR>K1000_1010</KHINR>
      <KTEXT>Test2</KTEXT>
      </access>
    - <access>
      <KOSTL>0000001006</KOSTL>
      <GUELTVON>2006-04-01</GUELTVON>
      <GUELTBIS>9999-12-31</GUELTBIS>
      <ABTEI>Test1</ABTEI>
      <VERAK>Name3</VERAK>
      <KHINR>K1000_1010</KHINR>
      <KTEXT>Test3</KTEXT>
      </access>
      </dbTableName>
    </StmName>
    </ns0:MT_CostcentreUpdate>
    Because I need to do both (delete & insert) in one transaction mode. But i will not work at the moment
    I always get error:
    com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'KOSTENSTELLEN' (structure 'StmName'): java.sql.SQLException: FATAL ERROR document format: invalid level 5' found (structure 'StmName')
    Thanks for any help
    Matt

    Hi Matthias,
    you need to have two statements (StmName), one for delete, one for insert.
    Regards,
    Udo

  • Problem with Polling interval at sender side in JDBC adapter

    Hello,
    I have some problem in investigating one serious issue using this polling interval,
    I am using the sender JDBC adapter where i used polling interval as
    60(in secs) and 1(in Msecs).
    So it comes upto 60.001 secs of polling interval.
    There are nearly lots of threads which are in sleeping state on one particular sender channel making the J2EE hang. When i went to look inside the CPA cache i saw that the polling interval was mentioned as only 1Msec rather than 60.001 Secs because of which with in some seconds all the threads are blocked and J2EE hangs due to lack of threads.
    Can you please provide some solution to this problem as soon as possible?
    Here are few questions which i got when i am doing this process,
    1. Is that the polling interval is sum of 60(secs) and 1(msec)?
    2. Which value is been read either secs or msecs?
    3. Will there be any precedence among those two values(secs and msecs)?
    THanks,
    Soorya

    Poll Interval (secs)
    Number of seconds that the adapter must wait if no files are found for processing.
    &#9679;      Poll Interval (msecs)
    Additional waiting time in milliseconds.
    If you set Poll Interval (secs) to null, processing times will be short and close to real time.
    If you set Poll Interval (secs) and Poll Interval (msecs) to null, the adapter is only called once.
    &#9679;      Retry Interval (secs)
    Specify the number of seconds that the adapter is to wait before a file processed with errors is processed again.
    If the value is set to null, then the adapter is canceled if an error occurs, even if a value greater than null is specified for Poll Interval (secs).

  • Sender JDBC adapter can be Synchronous?

    Hi,
    can we use sender JDBC adapter as synchronous in JDBC-XI-RFC Scenario without BPM?
    thank you
    babu

    thank you for your reply.
    Agasthuri,
    that link doesn't explain about sender JDBC,it explains about reciever JDBC adapter and more over using BPM,I have asked without BPM.
    Chandra
    do you know how can we achieve this?please stick to my question sender JDBC-xi-RFC without BPM.
    thank you again.
    babu

Maybe you are looking for

  • Footer at the bottom of every page

    I need to place a footer in every page of an application. The footer can be a jspf or html file. What I want is to place the footer after the last item of each page (can be a table, text field, etc). I would like it to render correctly both in IE and

  • CD or DVD drives for a sat pro 6000

    any one know if i can put a Model number SD-C2302 dvd player in to a sat pro 6000 lab top or no of any that i can put in please?

  • Mail stops receiving messages after a period of time

    Every since installing Mavericks my Mail app stops receiving messages after a period of time. I know because I get the email on my phone, but I try to grab them in Mail and nothing. If I restart Mail then they come through. I'm using Gmail as my emai

  • Need to update task info

    Hi, In my application I need to update task custom attributes. please suggest me. my task has 5 message attributes 1. Actual_completion_date 2. jobassignmentType 3. MatrixID 4. OffierID now my task has been created with these inputs. and I want to up

  • Indirect sales rebate or indirect extended sales rebate

    hi friends,                     Anyone worked on indirect sales rebate help me out with the process scenario of indirect sales rebate or indirect extended sales rebate. i do have the configuration document but want to know where or for what scenario