Sender jdbc adapter - no update query

hi ,
i am using pi 731 single stack.
the scenario is - PI has to pick data from view of a hana database. i am using jdbc sender for it.
pi will not have access to update the table,only pi can read the view of database.So,PI can't use UPDATE query.
If in jdbc sender channel ,I use SELECT query only and no UPDATE query - will it work ? what will happen if there are 100 records in the view and PI failed after fetching 43 records..will it pick from 44th record next time OR it will start from 0 again ?
rgds

Hi SAP PI,
It has no sense to use the sender JDBC without update query because then always will be taken the same records.
If you cant update the source DB you only have the choice to talk with the DB administrators that they develop for you a stored procedure that it has to do the work to get different records in every PI access.
If the PI record process fail with impossible source database update update, the only way (afaik) is to do a PI alert and to communicate it to db sender administrators. There are another option like to store the data in a intermediate table, and so on but all possibilities that i can think now are not to enough good.
Regards.

Similar Messages

  • Sender JDBC Adapter Select/Update Issue

    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

    Amit
    Did you ever get a solution to your question ?
       Sender JDBC Adapter Select/Update Issue  
    Posted: Apr 24, 2008 2:29 PM           Reply 
    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

  • Sender JDBC adapter SELECT / UPDATE issue - updates more rows than selected

    Hi,
    We have configured a Sender JDBC Adapter to poll records from an Oracle table based on a flag field and then update the flag for the selected records. When tested in DEV and QA environments (where test data comes in intermittently and not in huge volumes), itu2019s working fine.
    Both SELECT and UPDATE queries written in the Sender JDBC adapter are getting properly executed and are changing the status of the flag for the selected records from Y to N once read from the database.
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But in the PROD environment (with records getting updated in the database every second), after XI executes the SELECT query and just before the UPDATE query is executed, new records come into the Oracle table with status flag 'N". So when the UPDATE query runs just after the SELECT query, then these unselected records also get updated to 'Y'. Thus these records never get into the resultset and hence XI and thus remain unprocessed.
    So when XI does a SELECT and UPDATE on the Oracle DB table and concurrently there is an INSERT happening into the table from the other end, the JDBC sender adapter is picking up a certain number of records but updating the status of more records than it picked up.
    So how does XI deal with such a common scenario without dropping records?
    Thanks,
    Vishak

    The condition being checked is the same for both SELECT and UPDATE statements.
    Initially I tried setting transaction isolation levels on the database to repeatable_read and serializable but it was throwing me a java.sql.SQLException error saying that these transaction levels were not valid.
    I asked for these transaction level permissions for the XI user from my DBA but the DB I am accessing provides only a view into other databases and so it's not possible.

  • Reg: JDBC Adapter without Update Query

    hi friends
    i have designed a scenario where JDBC as a sender. i need to configure the adapter without using update query

    Hi,
    I believe the date field will store along with the time filed in the same column. At least oracle does that.
    So in your select query you can write as below(from oracle, as i dont have a ms sql now)
    assume
    your table name = yourtable
    date column      = dtcolumn
    select * from yourtable where dtcolumn = sysdate - interval '1' minute;
    This query assumes that the dtcolumn will be always having the value of the date time stamp when data is inserted.
    To be frank you should not do this. I dont understand why you cannot add a column "processed" and add update that. Any specific business requirement?
    For best performance, typically in my implementation I suggest using a shadow table from which XI deletes the records. The actual table has the column saying if this got inserted to the shadow table.
    Regards
    Unni

  • Sender JDBC adapter : Update SQL Statement : stored procedure

    Hi,
    Can we use a stored procedure in the sender jdbc adapter in 'Update SQL Statement'.
    The problem i am facing is like, we are selecting data from two tables in 'SQL statement for query' and then in 'Update SQL Statement' , we need to delete that data from these two tables.
    Please let me know if it is possible.
    Thanks,
    Rohit

    you can use a Stored procedure in the
    Query SQL Statement
    You have the following options:
    ·        Specify a valid SQL SELECT statement to select the data to be sent from the specified database.
    ·        Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.
    so have your whole select and update as part of this single Stored procedure

  • Sender JDBC adapter donot want to update database..

    Hi,
    We have JDBC to RFC scenario. In This we need to read only database table , we should not update it. As in sender JDBC adapter configuration Update SQL Statement is mandatory, so what needs to be done in this case?

    Hi,
    In place of the SQL statement, you can also enter <TEST>. Once the data determined from Query SQL Statement has been successfully sent, the data in the database remains unaltered.
    This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.
    http://help.sap.com/saphelp_nw04/helpdata/EN/7e/5df96381ec72468a00815dd80f8b63/frameset.htm
    Regards,
    Manjusha

  • Configuring sender jdbc adapter

    Hi all,
    I have a requirement in which i have to select certain data from Oracle table and send it to an IDOC via SAP XI.
    Problem is the select can happen from several tables. For example:
    SELECT col1,col2,col3 FROM <tablename>
    The <tablename> has to be variable. I do not need to do any JOIN. At a time select will be only from a single table i.e. col1, col2, col3 will all belong to the same table. But the adapter should poll multiple tables.
    One more requirement is that once a particular record from a particular table has been selected some UPDATE also need to be done on the same record.
    Pls can anybody provide me with a proper solution.
    This requirement is a bit urgent.
    Thanks in advance.
    Regards
    Neetu

    Neetu,
    You need to have the Table name dynamic in the Sender JDBC adapter's Select Query . This is not possible
    You can consider using a Reciver JDBC adapter for which you can have a look at this blog ,
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    Or, you need a Separate sender JDBC adapter for every table to be polled.
    >><i>One more requirement is that once a particular record from a particular table has been selected some UPDATE also need to be done on the same record.</i>
    If you are using the Sender JDBC adapter, this would be simple using the UPDATE field of the Sender JDBC adapter .
    If you are planning to use Receiver JDBC adapter, then You need a separate Send Step for this Update.
    Better way to go would be to have separate sender JDBC adapters.
    Regards,
    Bhavesh

  • Dynamic query configuration in sender jdbc adapter

    Hi,
    According my undertsnading in XI.3.0 dynamic query in sender JDBC adapter is not possible.
    could any one confirms the possibility of this feature in XI 7.0 .
    Thanks,
    venu

    Hi VJ,
    sorry for late responding to your answer.
    One of our requirements is the query statement that we write in sender communication channel should be changed dynamically, for example in where condition the condition parameters values required to change.
    Thanks,
    venu

  • Stored procedure in Sender JDBC Adapter

    Hi All,
    My Scenrio goes like this ...
    Stored Procedure(SQL Server) --- PI  -
    File
    I need to write the results of  stored procedure to File.Here I don't need any mapping.So how many DT , MT and MI need to be created?
    The interface need to run by 6AM from Monday to Thrusday, how can i achieve this ?
    Stored Procedure has only select statement and no Update statement , but it takes Date as Input parameter , so what i need to provide in sender JDBC adapter.
    Thanks,
    Monish

    Hi Monish,
    As per your requirement it is JDBC to File. Please be careful with the structure to be created for sender JDBC. I am unable to understand why you donot require a mapping for this. How XI will send the data to a file then.As per my knowledge if it's file to file and just pick and drop then we can neglect IR and go for ID.But here you are working with JDBC and File so you will be in need of it.
    IR:
    DT: 2
    JDBC_Sender_DT
    File_Output_DT(Optional)
    You can use the JDBC sender data type structure for File output also.
    MT as per your DT
    MI:2
    Outbound MI: JDBC structure
    Inbound MI : File structure
    MM: 1
    IM: 1
    ID as similar to other scenarios.All 1 objects for RD,ID,Sender Agreement and Receiver Agreement.
    Sender JDBC channel:
    Query: Select * from table where date
    But I have a query how are you providing date in input paramerter.It will be dynamically entered into the query right.
    You can mention the Avalibility planning for your interface to work in RWB.
    Go to RWB>Component Monitoring>Adapter Engine->Communication Channel Monitoring>Avaliablity Planning
    Please explain.
    Regards,
    Nutan

  • Problem in sender JDBC adapter

    hello,
    I am facing one typical problem in sender JDBC adapter.
    Here is the issue,
    JDBC API method getString threw an exception: java.sql.SQLException: Cursor state not valid.
    Can anyone please help me out in solving this problem?
    Actually after a retry of 3 times the message has been successfully sent. Till then i am getting these error
    On 1st attempt ,
    Error during conversion of query result  to XML java.sql.SQLException: Cursor state not valid
    On 2nd attempt,
    Error during conversion of query result  to XML java.sql.SQLException: Internal driver error                                                                               
    (class.java.lang.InterruptedException)
    On 3rd attempt,
    Processing finished successfully.
    This is the scenario that i can see in the audit log.
    Can you please help me out in solving this issue.
    Thanks,
    Soorya

    Hi gaurav,
    It was a good response from your side.
    I have gone through the FAQ but could not able to find anything.
    Can you please help me out in this regard ?
    Also i am using select query of this kind,
    SELECT
    SEFVHRC.VHRBRCD,SEFVHRC.VHRCUCD,SEFVHRC.VHRVIN,SEFVHRC.VHRMOCD,SEFVHRC.VHRCHAS,
    SEFVHRC.VHRSLOR,SEFVHRC.VHRDIVI,SEFVHRC.VHRMGCD,SEFVHRC.VHRMOCH,SEFVHRC.VHRVHTY,
    SEFVHRC.VHRBDTY,SEFVHRC.VHRMFYR,SEFVHRC.VHRMOYR,SEFVHRC.VHRMODS,
    SEFVHRC.VHRMDTL,SEFVHRC.VHRCLBR,SEFVHRC.VHRRCID,SEFVHRC.VHRARDT,
    SEFVHRC.VHRLUTM,SEFVHRC.VHRLUDT,SEFVHRC.VHRKEYN,SEFVHRC.VHRCTORN,
    SEFVHRC.VHRCTIMP,SEFVHRC.VHRPRDT,SEFVHRC.VHRPRDT,SEFVHRC.VHRRCDT,
    SEFVHFT.VHFCLCD,SEFVHFT.VHFCAT,SEFVHFT.VHFCADSC,SEFVHFT.VHFKEY,SEFVHFT.VHFTEXT1,
    SEFVHFT.VHFTEXT2,SEFVHFT.VHFTEXT3,SEFVHFT.VHFTEXT4
    FROM
    SAPTESTLIB.SEFVHRC,SAPTESTLIB.SEFVHFT
    WHERE
    SEFVHRC.VHRVIN = SEFVHFT.VHFVIN AND SEFVHRC.VHRSTTS = ' '
    and update query of this kind,
    Update SEFVHRC SET VHRSTTS = 'R' WHERE VHRSTTS = ' '
    I am using prity big select query. is there any option to optimize it?
    Can you please help me out in solving this problem
    urs,
    Soorya

  • Stored procedure : how to call SP in sender JDBC adapter for mysql

    HI friends ,
    we have JDBC---->XI--
    >SAP  scenario. For some business requirement, we have to call STORED PROCEDURE , please let me know how to call  SP in sender JDBC adapter for mysql .
    Thanks
    mojib

    Hi Mojib,
    Please create a sample stored procedure like this which contains select statement and in communication channel give
    wite stored procedure name only to sql query statment and in update statement write <test>.
    I am executing this stored procedure successfully.
    Create Proc GetResultX As
    Begin
    Select * From TESTX
    End
    Execute statement for stored procedure is :
    Exec GetResultX
    Regards
    Laxmi Bhushan Jha
    Rewards point if found usful
    I have given same answer to one of the same  thread

  • JDBC adapter - no UPDATE to database

    Hi,
    I have the scenario ABAP Proxy to XI to JDBC to read some data from a database and return some info back to BW. Is it mandatory to UPDATE the selected records in some way or can the UPDATE part of the adapter be disabled by putting something in the UPDATE parameter on the comm channel ?
    Cheers
    Colin.

    Hi Colin,
    if you are talking about a sender JDBC adapter: you can put <TEST> in the update statement.
    See this snippet from the help:
    <i>Update SQL Statement
    You have the following options:
    Enter a valid SQL statement that is to be applied to the database once the data (determined from the Query SQL Statement) has been successfully sent to the Integration Server/PCK.
    It must be an INSERT, UPDATE, or DELETE statement.
    In place of the SQL statement, you can also enter <TEST>. Once the data determined from Query SQL Statement has been successfully sent, the data in the database remains unaltered.
    This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.</i>
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    If you want to synchronously call a receiver JDBC adapter, i think you can use action=SELECT without an update.
    Regards
    Christine

  • Sender JDBC Adapter - Stored procedure

    Hello all, I just read a lot of topics in this forum about this subject.
    I found two indications in contracdictions in the documentation :<a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm">Configuring the Sender JDBC Adapter</a>
    1. Concerning Query SQL Statement
    You have the following options:
    &#9679;     Specify a valid SQL SELECT statement to select the data to be sent from the specified database.
    &#9679;     Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    2. Concerning Update SQL Statement :
    This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.
    It is ambigous, isn't it ?
    My question is simple :
    Does somebody already use Sender JDBC Adapter with Stored procedure as Select statement including many steps :
    - update actions on database
    - select query to return data to XI adapter
    (Update statement stay empty or with value <TEST>.
    To provide more information, I have a reference table to read. But this reference table must be updated by a stored procedure before being able to be read accordingly.
    So As I can't do both process with Sender Adapter (call a procedure and execute a select statement) => I want to include both actions (updates and select) in an alone stored procedure.
    Could I get wanted data as a resultset ?

    Hi,
    >><i>Update statement stay empty or with value <TEST>.</i>
    It should be <TEST> if you do not want an Update to happen.
    Regarding Sender JDBC adapter with stored procedures, which DB are you trying to access. Sender JDBC adapter does not support Oracle Stored Procedures as they return Cursors and Sender JDBC adapter can deal with only Resultset.
    As for executing both Update and Select in the SP, though I havent tried, this should surely be possible.
    Regards,
    Bhavesh

  • Sender JDBC Adapter Supports Stored Procedures????

    Dear All,
    I was trying to use the Sender JDBC adapter to call the Stored procedure in the Sender JDBC adapter is possible to do this???
    I don't think Sender JDBC Adapter is supported to execute the Oracle Started Procedures. With my understanding only the Receiver JDBC Adapter will supported for the Stored Procedures using the message mapping Action = EXECUTE and Table = DBO.EmployeeMasterTable.
    Please let me know how to achieve the below scenario.
    My Scenario JDBC to RFC
    Query SQL Statement:
    select * from dbo.emp where flag = 'Insert' or flag = 'Update' or flag = 'Delete'
    Update SQL Statement:
    UPDATE dbo.emp SET flag = null WHERE flag IN ('Insert', 'Update');
    DELETE dbo.emp WHERE flag = 'Delete';
    In the my update statement I need to update few data flag with Insert , Update and need to delete the of the old records as mentioned above the query.
    In the response mapping I am using the Action = INSERT and Table = emp.
    Thanks,
    Jane F.

    Hi Jane,
    >>My requirment is to select from the DB and update and delete needs to be done. How I need to call this stored procedure in Sender JDBC adapter.
    An example of SP call is mentioned in the previous note Note 941317 - XI / PI JDBC Adapter: Known Problems / Incompatibilities
    SP Code
              ---------- pkg1 ----------
    CREATE PACKAGE pkg1 AS
      TYPE numset_t IS TABLE OF NUMBER;
      FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED;
    END pkg1;
    CREATE PACKAGE BODY pkg1 AS
    -- FUNCTION f1 returns a collection of elements (1,2,3,... x)
    FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED IS
      BEGIN
        FOR i IN 1..x LOOP
          PIPE ROW(i);
        END LOOP;
        RETURN;
      END;
    END pkg1;
    In sender channel mention
    >> SELECT * FROM TABLE(pkg1.f1(5));
    >>Is this need to be in the one stored procedure right. Can ou let me know how it should be handled in JDBC Adapter.
    Yes it shoudl be a single SP. Mention a select statement as given in above example.
    What is your Oracle version?
    Regards
    Suraj

  • Sender JDBC Adapter in a synchronous szenario

    Hi,
    i am trying to set up following szenario:
    A JDBC Sender Adapter is polling data from a database, this data is beeing mapped to a synchronous RFC-Call to the R/3 backend. The result from the RFC-Call contains an order-number, which should be stored in the database.
    The query of the DB and the rfc-call works fine. The query is also doing the UPDATE statement to the DB, marking this line of data as beeing processed.
    The QOS in the sender-jdbc-adapter is set to "Best Effort", which should allow a synchronous communication.
    I am mapping the response of the rfc-call to a jdbc-receiver-like structure, in the monitoring i can see the rfc-result and also the message to update the databae. There are no errors in the adapter-monitoring and everything looks fine, except that the database is not beeing updated.
    Is there another messageformat for the synchronous answer to a sender-jdbc-adapter?  Or is it possible, that the commit for the answer is not beeing sent?
    We have an XI3.0 with SP16 installed.
    Thanks for your help.
    Ingo

    hi,
    you cannot use the Sender JDBC adapter to Upate.
    Create a receibver JDBC adapter with the format as mentioned and use it to update the DB.
    the steps in BPM wil be ,
    1. Receive -- for Sender JDBC adapter
    2- Send Synchronous -- RFC call synchrnous
    3 - Send -- using Receievr JDBC adapter to Insert / Update the DB.
    Do let me know if u need further info,
    regards,
    Bhavesh

Maybe you are looking for

  • Start up problems iMac 27"

    Would anyone be able to help? The power in the house has been down, and now my iMac doesn't start. (it is a bit more than a year old). When I push the power button on the back of the screen, the fan starts on quite high rev and go for a minute or so,

  • In iCal can't assign .ICS calendar event to non-"on my mac" calendars

    In apple mail, I click on the the .ICS file [sent by windows outlook user] and can see that it is added into iCal. Great, as expected. However, if I right click on this event, under "calendars" I can only assign it to either "home" or "work" i.e. tho

  • Problems with Disk Utility

    Hi, iPhoto crashed my computer in a big way and after leaving the rainbow wheel for about an hour, with very sluggish response I kept the power button down and reset (without doing a shutdown). Unfortunately it has a created a massive problem with my

  • Tool Button Not Working in Adobe Reader 9

    Hello, I have a custom tool button - folder level script (with a trusted function) to digitally sign a drawing template. The tool button works in Reader 8 and Reader X, but is not working in Reader 9. The error message is shown "Not Allowed Error: Se

  • How to move music files within "Gallery"

    I have music files in "Tracks" and in "Sound clips", how do I move those in "Sound clips" to "Tracks"? I didn't see any options which enable me to do that. Also all my music files are in memory card's "Sound clip" "digital" folder, so why does some f