Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC Status Code 51 error inserting record into custom table

ankeshjindal
Explorer
0 Kudos
225

Hi.

In one scenario, records in Inbound IDOC are coming at the same time(even the same second) and there can be multiple line items in that one IDOC. Data is dumped into the Custom table and then process further.

Now suppose one IDOC has 3 line items, 1st line item is pushed to the custom table successfully, next one is giving an error in some instances - 'Error inserting a record into custom table Z*'.

It is only happening in that instance when 2 or more records come at the same item then one of the items in IDOC result in below error

Please suggest how to resolve or any workaround so that all record will save in custom table.

1 REPLY 1

raymond_giuseppi
Active Contributor
0 Kudos
163

How were unique keys defined in the intermediate Z-table, can you consider

  • updating records when they already exist
  • using a lock process (on the table for example, lock table with ENQUEUE_E_TABLE, do it some limited times with wait if already locked, insert records and COMMIT WORK to relase lock and validate database)