Peter
Peter

Reputation: 1021

Proper handling of IDoc errors?

I have implemented a JCoIDocHandler for SAP, everything worked fine, but our partner company changed something with the user rights and now the handleRequest() fails with an exception.

My problem is that even I got an exception, the partner company marked their IDocs as OK. In my JCoServerTIDHandler the method rollback was called, so I assume that the SAP system recognized the error.

My code for rollback is just:

void rollback(JCoServerContext serverCtx, String tid) {
            //some logging stuff here
}

In my handleRequest method of the JCoIDocHandler I catch the exception and also just do some logging.

My question is: is there anything I have to do in handleRequest or rollback to inform the SAP system of the error?

Or is there an error in the SAP System itself, that the IDoc is not marked with an error even the foreign Sap System throw the exception?

I do not have any access to the SAP system and I do not have SAP knowledge so I wonder if it is my fault or the fault of the SAP system that the IDoc is not marked with any error.

Upvotes: 1

Views: 217

Answers (1)

Trixx
Trixx

Reputation: 1885

If handleRequest() finishes with an exception the sending partner system will see the failure. I don't think that the sender is an SAP system using the standard ALE mechanism if the IDoc status in this case is marked to be OK at the other side.

Upvotes: 0

Related Questions