Integration error- System.Runtime.InteropServices.COMException (0xFFFFFBA4): (101) Invoice already

Integration error- System.Runtime.InteropServices.COMException (0xFFFFFBA4): (101) Invoice already

Problem 

Records were stuck in the integration failure monitor.


Symptom 

Records were failed with error "Invoice already exists with the same transaction key."


Below is the detailed exception logged in the Integration failure monitor


System.Runtime.InteropServices.COMException (0xFFFFFBA4): (101) Invoice already exists with the same transaction key.

at SAPbobsCOM.CompanyClass.EndTransaction(BoWfTransOpt endType)

at ReplicationSBOIntegrationWinSer.IntegrationObjects.LayAway.CreateLayAway(DataRow[] DSTransaction, DataSet DSTransactionSurcharge, DataSet DSTransactionPayment, DataSet DSARPayment, DataSet ObjDataSetTransactionAttribute, DataSet ObjDataSetTransactionLineAttribute, LayawayDocumentType layawayDocumentType)


Observation

The failed integration records were reviewed and it was found to be a Sales invoice. As the error says invoice already exists so the sourcekey of the failed integration record was checked in the SAP AR Invoice screen and there was already an invoice with that key. So the Error was correct. It was an SAP B1 Validation exception.


Cause 

 Error is coming as a duplicate record for the same Sales invoice is being tried to be posted in SAP. This generally happens when multiple integration services configured (for the same SAP database) are in running state. 


Resolution 

1)To avoid that situation, customers need to make sure that multiple integration MUST NOT be running on the same SAP database. If there are any such instances, then there is a need to check and disable the duplicate service instances.


2)As the failed integration record was a duplicate invoice , it need not be integrated. It should be ignored from the integration failure monitor (with help of support team)


Note: At times Customer is also not aware about the presence of the duplicate service. So in that scenario, customers can opt to change the password of the SAP SQL server database and keep that secret. This will ensure that if the other (unknown) instance of service remains active, it will not work.