Hi Ratnakar,
Event Handler:
- If your setting is Asynchronous, when you create a sales order, it will be placed in queue (Transaction code SMQ1) to post in SAP EM System. It calls BAPI /SAPTRX/BAPI_EH_POST & /SAPTRX/BAPI_EH_ADDEVENTMSG_02 .
- Check this FM /SAPTRX/AOTREF_UPDATE_DB & /SAPTRX/APPLOG_UPDATE_DB for logs when you create sales order.
- Go to the program /SAPTRX/LASC2F01 and set the breakpoint in form POST_TRACKING_OBJECT_DATA.
- Check in call function /SAPTRX/BAPI_EH_POST returned value of ‘ LT_OBJECTSTATUS’ & ‘P_BAPIRETURN[]’
- Check POSTSTATUS A - Object Posted to Event Handler or B - Object Acknowledged by Event Handler or C - Object Posting Rejected Due to Lock on Event Handler or D - Object Posting Rejected Due to Error in Event Handler (This data is coming from /SAPTRX/BAPI_EH_POST -> /SAPTRX/BAPIAOTYREF -> /SAPTRX/AOTRKSTAT)
- In tracking object status it gives you Tracking Object Number to track it for each sales order.
- Now, simulate your scenario with successful and unsuccessful sales order to check how to achieve.
- Also, try this /SAPTRX/LEH_BAPISU02 ->/SAPTRX/BAPI_EH_POST - CALL BADI l_badi_eh_s->before_eh_post
Event Message:
Go to the program /SAPTRX/LASC2F05 and set the breakpoint /SAPTRX/BAPI_EH_ADDEVENTMSG_02
You can stop reprocessing of same expect event if event message has already been received in SAP Event Management... Just uncheck the box of Reprocess Expected Event then it will ignore subsequent messages after first message is received.
Regards
GGOPII
P.S: Transaction code - SLG1 gives full log of sales order, however it has lot of records and may slow down.