on 10-10-2022 2:23 PM
Hi all!
Created SM62 event to run a scheduled background job.
The event is raised in background task during MIGO posting using Function Module 'BP_EVENT_RAISE' (which in turn calls method CL_BATCH_EVENT=>RAISE).
This used to work perfectly fine in older SAP version 1610. But after upgrade to version 2021, it stopped working.
So, I debugged the method CL_BATCH_EVENT=>RAISE and found that a new piece of standard code was added in the method:
IF p_eventid <> cl_batch_event=>event_sap_end_of_job.
DATA(lv_trigger_immediately) = lcl_handle_raise_event=>handle_event(
iv_eventid = p_eventid
iv_eventparm = i_eventparm
iv_server = p_server
iv_force_event = i_force_event ).
IF lv_trigger_immediately = abap_false.
RETURN.
ENDIF.
ENDIF.
As you can see, the method lcl_handle_raise_event=>handle_event, returns the 'trigger immediately' flag and, in my case, this always comes back as ABAP_FALSE.
So, debugging this method, I find that if the event is found to be stored in table btcraiseevt, it will never return 'trigger immediately' flag.
Thus, my question is how to ensure that a custom event always triggers immediately?
Can you apply that note?
https://launchpad.support.sap.com/?sap-support-headless=true#/notes/3113617
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then I would open an incident at SAP.
Yes, I have raised it to SAP. But I found that in another similar system, this issue is not occurring. Root cause is due to the entry in table btcraiseevt for the custom event. If entry is found that is when the issue arises. Do you have any idea when and how an entry is populated in this table or how to remove it in a standard way?
Hi @Wilbert_Jeuken,
Really sorry for super late reply, but I did not pursue this further with SAP because our client needed immediate resolution and therefore, I implemented alternative solution (using Background Task in FM and directly submitting the program) instead of originally using background unit FM and raising event in SM62 to run the program.
User | Count |
---|---|
105 | |
9 | |
7 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.