cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to JDBC :Error handling in Query execution

former_member203631
Participant
0 Kudos

Hi,

I have a scenario idoc to JDBC, here I will get 'n' number of segments in an idoc corresponding to 'n' records which needs to be updated in SQL Database table.

In this scenario how we can handle the error when any record is failing while updating into the table?

Is there any method by which we can know which records are successfull and which records are unsuccessfull?

Please provide your valuable ideas.

Regards,

Shiva.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shiva,

As you have mentioned in the previous eg, if one IDOC is sent from R/3 with 10 segments(tat corresponds to 10 records in the receiver), even if XI not able to insert/update one record also into the database...then the rest of the 9 segments (i.e 9 records) also will not be inserted/updated in the receiver...

once if it is able to send the entire payload only(all the ten segments only ),all the 10 records will be inserted in the receiver..So if u get any errors,you can check the field causing error from Message monitor and debug the same..

If u want to create a record for every segment created in IDOC,then u can make the receiver data type as minoccurs=1

and maxoccurs=unbounded and perform a one to one message mapping b/w sender structure and receiver structure.

Thanks,

Laawanya

Former Member
0 Kudos

Hi Shiva,

Can you please send the actual format you want to send through IDOC and what is the type of format you are observing on XI adapter. Are using any mapping in receiver JDBC adapter so that the xml file which is sending the is in perfect format which the JDBC adapter is expecting.

Soorya

former_member203631
Participant
0 Kudos

Hi Soorya,

thanks for the response.

Actually I want to know how to handle the situation when we are trying to insert/update 10 records and if 6th,7th and 8th records failed to insert/update then

1. Will the other records are insert/updated in to the DB?

If yes : then how to get know the failed records(6th , 7th and 8th) i.e., how the response msg will be?

If no : then how the response msg will be?

2. Is this achieved thru normal sql query or need to use stored procedure?

Regards,

Shiv.

Former Member
0 Kudos

hi,

you can see the information about the message in the RWB environment.

Go to that and check with the message ID and go to message content.

Soorya,