cancel
Showing results for 
Search instead for 
Did you mean: 

Error handling in JDBC

Former Member
0 Kudos

Hi All,

i am using store procedure to fetch the data from Oracle Data base and send the data to SAP system using PI.

I get some 1,00,000 records at a timeall needs to be sent to SAP. Suppose 1 record fails either in PI or inSAP, i need to rollback all the records and reprocess them.

is there any other alterantive way to reprocess only the failed records?

Thanks,

Hemanth.

Accepted Solutions (0)

Answers (2)

Answers (2)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

I recommend you to have 2 SP, one into the other. the main SP will be called from PI, this SP run internaly the second SP wich will validate each record to be exchanged. those record that are corrected should be marked in the same table or in an auxiliar table. i recomend the same table. later the main SP will pass only the records that are right. but consider that all the records that are right(all field are completed for example) doesnt mean that wont fails by functional errors in SAP.

now as your requirement if any records fails you must do a rollback, so reprocess all the fails record is not possible because you send all data -->right and wrong.

i recommend you to validate if is possible to save in SAP all the failed record and the trigger and alert to check those record in the DB and the send only those records in another interface(for example). because if one record fails you do a rollback and only capture this record but you don know if there are others.

for example. you send 1000 records and at SAP side the record 200 fails and you do a rollback and notify that this record is wrong. but maybe others record could be wrong if you continue executing. record 350,356,400, etc.

is clear my point?

former_member206760
Active Contributor
0 Kudos

you have to use a BPM for this.

Here you need to split the records and send them one by one using PAR FOR EACH mode in the block...here the records will be sent to SAP one by one so if some are in error others will not be affected.

you can then reprocess the failed ones only.