Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 15, 2006 at 06:15 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Nilkanth,

      I realized that I cannot use the temp table solution as I have to <u>update the source database</u> table with the return data (unique field) from R/3 to the corresponding row.

      Thanks

      Steve

  • avatar image
    Former Member
    Jun 15, 2006 at 05:20 PM

    Hi Steve,

    I think, the only option is using the Update statement as you mentioned.

    There was a discussion on this-

    Messges are created twice.

    Also just check to use some of Advance Mode Parameters of the Sender JDBC Adapter..

    http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

    Regards,

    Moorthy

    Add comment
    10|10000 characters needed characters exceeded