Skip to Content
avatar image
Former Member

JDBC

I am trying to insert or Update rows in a Database.

File to XI to database(DB2).

The question I have is

1) I need to insert the row what I read from File into the DB if that row doesnot exists, if the row is already there then I need to Update that row in the database.

2) When I run my scenario, if there is a problem in the DB while Inserting or Updating, the error message is available only in my RTW, but my Message Monitoring shows the Successful flag and just by seeing the Message monitoring , I may fail to attend a Failure that happened earlier.

Please assist me.

Thanks.

Ram Mohan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 16, 2006 at 02:06 PM

    Hi Mohan,

    You can use the Statement structure for "UPDATE_INSERT" for the JDBC reciever channel...

    see the help link from sap and the section where it talks about acyion UPDATE_INSERT...

    Regarding the seeing a succesful status...that is meaning that the Integration engine has processed it successfuly and trasferred it over to the adapter engine...however the message would have a error status in the adapter engine...

    If you goto RWB ..message monitoring and see messages in the Adapter Engine...you should be able to see one in error...

    Thanks,

    Renjith.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 16, 2006 at 02:08 PM

    Hi ram,

    Can you please give us your destination message along with the content so that it will help us understand your problem better.

    Also, give us the error u find in the RWB.

    Rather than going for a direct insert / update, I would recommend a Stored Procedure execution that will do the coressponding checking and then either insert or update.

    For JDBC adapter and how you can execute stored procedures or direct insertion, i would recommend going through this link,

    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

    Hope this helps,

    Regards,

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 16, 2006 at 03:18 PM

    Hi Mohan,

    1) Use "UPDATE_INSERT"

    2) Use a bussiness process with an exception branch to send the error message. The business process is described in my blog:

    /people/udo.martens/blog/2005/09/30/one-logical-system-name-for-serveral-bpm-acknowledgements

    Regards,

    Udo

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 16, 2006 at 09:12 PM

    Hi,

    The Message monitoring shows successfull bcos the message has been transfered to the Integration engine successfully .. and the Failure to insert/Update to the database is the Adapter failure and you can monitor such type of error in the Adapter monitioring.

    Let me know if you have any question.

    thankx,

    Sri..

    Add comment
    10|10000 characters needed characters exceeded