Skip to Content
1
Oct 28, 2019 at 05:53 PM

Badi implementations that trigger on notif/order events are happening too early.

126 Views

I am using IF_EX_NOTIF_EVENT_POST and IF_EX_WORKORDER_UPDATE to send a message to our middle-ware whenever a notification or an order is created/updated. This lets the middle-ware know what data it needs to pull. It is possible for the update even to hit our middle-ware and re-poll the data before SAP has had a chance to save the data. When this happens we don't see any changes to the object and the updated data is not received.

For notifications we send the event message in the IF_EX_NOTIF_EVENT_POST~CHECK_DATA_AT_POST method implementation. For orders we send the event message in either IF_EX_WORKORDER_UPDATE~AT_SAVE if it is being updated, or if the order still has a temporary aufnr, in IF_EX_WORKORDER_UPDATE~NUMBER_SWITCH.

It seems that these messages are sent too early in the update process, but with these badis I don't know it's possible to fix this particular issue here. I'm not sure if there is any badi method call that we could use that would be later in the process than this. This may be something we have to fix with how our middle-ware polls data.