We are developing an order processing system that receives an order message from a trading partner and creates and ORDERS05 IDOC. When we hand the IDOC to the SAP business system it might go right into the system as a valid order or might fail for any number of business reasons. (out of stock, contract expired, etc)
In the case that an order can not be processed, we will need to send a negative acknowledgment to the trading partner.
What's the best way to generate that negative acknowledgment?
Two ideas have been floated in our team:
(1) Write a program to poll for failed IDOC's and send a message.
(2) Can we find a way to use ALE to reroute an in failed state (say status 51) to XI where I can generate a negative acknowledgment?
Your suggestions and experiences are welcome!