Reputation: 19469
I'm using the SAP .NET Connector 3.0 to receive inbound IDocs. I can get them fine most of the time, but sometimes there is a problem in receipt (disk full/DB connection down, etc), and there does not appear to be a way to report back to the sender that the receipt failed.
Throwing an exception still results in a status "3" (Good) for the IDoc in SAP.
Does anyone know how to report back to the caller that the receipt was not successful?
Example...
[RfcServerFunction(Name = "IDOC_INBOUND_ASYNCHRONOUS")]
public void ReceiveInboundIdocAsync(RfcServerContext context, IRfcFunction function)
{
throw new Exception("SM59 still reports status 3 for this idoc");
}
Upvotes: 1
Views: 525
Reputation: 16595
You need to distinguish between the "tRFC status" and the "ALE status".
If you throw an exception from your server function, the tRFC status should be set to "Rolled Back", and you should be able to verify this in transaction SM58. Can you please check this?
However, that does not influence the ALE status... ALE is basically asynchronous and does not wait for the tRFC, which transports the IDoc, to finish. So the ALE status "03" only means "IDoc transferred to communication layer successfully". Whether the communication layer (the tRFC layer in this case) has actually succeeded in delivering the IDoc or is still trying, is not reported back to the IDoc monitor...
If you want to do that, you have two options:
Upvotes: 1