Skip to Content

JDBC sender: Requirement

Hi Friends,

My scenario is JDBC to PROXY (INBOUND Scenario).

Every day We are getting the lot of records from oracle database and those are posted in sap system .

My Query is , for example we got the data around 1000 records at a time from the oracle database.

In those 1000 records, one record is error record(say invalid date format is coming from database),

because of this 1 error record, remaining 999 records also not going to sap table.

How to handle this?

how to send remaining 999 records to sap system?

is there any option to send these records?

Please do the needful

Regards,

Ravi

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Jul 13, 2016 at 08:45 AM

    Hello Ravi,

    I see two options for you:

    1) Reducing the polling time for you sender JDBC channel so that you get less rows for every process.

    2) Adding ROWNUM < 10 or 50 to your Select query, so that you only get a certain number of results for every select.

    This way, if you have any errors, you will still update most of the records...

    However, the best way would be to understand why this single record is failing and somehow handle this "exception" in your mapping so that you don't face this problem anymore.

    Thanks,

    Luis

    Add comment
    10|10000 characters needed characters exceeded

    • I mean, where do you get error? In sender adapter, during mapping or when posting data to ECC?

      Actualy, the only right decision in this case is to provide validation of data before it is stored to DB. I hardly can imagine how wrong date for example could be stored to DB table unless all data is stored just as text.

      I also think that changing polling interval will not help you much because you can fall in situation when your "error" record is selected each time your adapter polls data from DB.

      Regards, Evgeniy

  • Jul 13, 2016 at 09:38 AM

    Hi Ravi,

    I have jdbc scenarios with 5 seconds in the poll, in these cases i don't check "Disconnect from Database After Processing Each Message" for not overload the Database with consecutive calls.

    I don't like the option of the rownum because you can't assure the result of the Select will the same of the Update, i have problems with this. I prefer to use a stored procedure (like this example )

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

    • HI Vila,

      My Query is , for example we got the data around 1000 records at a time from the oracle database.

      In those 1000 records, one record is error record(say invalid date format is coming from database),

      because of this 1 error record, remaining 999 records also not going to sap table.

      How to handle this?

      how to send remaining 999 records to sap system?

      Regards,

      Ravi

  • Jul 13, 2016 at 10:21 AM

    Hi,

    The only option to handle this is to opt for audit trail. Audit trail means you need to use multi mapping. Create 2 separate inbound SIs . One will be same as the inbound SI you have now that to process all correct data. Second one is to create a audit file where all error records will be put.

    Now you need to write one UDF using Global Container variable. In this UDF you will validate all correct data and push them to the first SI for processing and at the same time if you can see any wring data is there like wrong date format or any other business specific validation fail then put them to the second SI. So that you can review this file later and send it to the ORACLE database maintenance team to correct.

    So your scenario will become -

    JDBC - Proxy

    File

    Please let me know if you need further clarification.

    Thnaks,

    Apu

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 13, 2016 at 09:09 PM

    Hi Ravi,

    you are trying to solve application errors in PI. These data validations should be pointed out in testing phase and database team should resolve the issues.

    Please go back to database team and ask them to fix at the source.

    Ambrish

    Add comment
    10|10000 characters needed characters exceeded