Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member600549
Participant

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.

2 REPLIES 2

former_member600549
Participant

Right now I am calling the send_event message method in an rfc call during the event trigger using IN BACKGROUND TASK. This waits until after the commit is executed to create the message. I'm looking at PERFORM ON COMMIT to see the pros/cons they have compared to each other.

0 Kudos

Hi Max,

I also got a similar requirement where I made changes using enhancement in end of FM isq1_post_notification.

Can I know how you are sending data to the other system. Is it through idocs or similar thing ?

Regards,

Aditya