Hi Experts,
Would like to know when exactly the business object events get triggered. Is it before database COMMIT or after database COMMIT. If there is any FM associated with this FM, does it get executed in same LUW or separate LUW ? Also can we use COMMIT WORK inside this new FM.
Request clarification before answering.
Hi,
Well, to monitor the events within the system you need to activate the event trace by using SWELS and you can check the in SWEL transaction.
Every workflow event is triggered before COMMIT WORK. To put in other way workflow events are committed and fired in the system only after the COMMIT WORK statement. All the updates associated with LUW are committed or completed upon or after COMMIT WORK statement and my understanding is that the LUW gets completed.
May I know, what exactly you are looking for?
Thanks
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan,
Thanks for explaining. I have to trigger an idoc immediately whenever an order ( pm notification) gets created or changed. I have found some customer exits like qqma*, but not sure if we can use that as the data could be changed in later stages. Also it is for check before save. I have checked in swel, but no log is there.
i am thinking to link it with business object event which trigger FM where i put in my IDoc building. So wanted to know if in such case the event execution/trigger happens before commit work of std transaction or after commit work.
hi,
when i linked event with fm, no event in swel.
i have manually triggered event using fm sww*event*create* in my badi, and now i could see an event in swel. but the linked fm was not triggered.
i have to achieve this functionality https://answers.sap.com/questions/11812826/trigger-idoc-when-saving-or-changing-service-order.html
Hi Pavan,
No, I have raised an event in a badi of STD transaction just before commit work. The commit work was raised from STD program.
Hi,
Also check fm SWE_EVENT_CREATE_IN_UPD_TASK .
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Either you need to write the commit work statement immediately after calling the SWE_EVENT_CREATE or the other possibility is to call this function module by using the addition IN UPDATE TASK of CALL FUNCTION. So that as soon as the commit work is executed by standard program the event is triggered.
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SWE_EVENT_CREATE cannot be called directly in update task, instead use:
CALL FUNCTION 'SWE_EVENT_CREATE_IN_UPD_TASK' IN UPDATE TASK ...
SWE_EVENT_CREATE is not an update function module, you can't call it directly in update task, you need a "wrapper".
Hi Sandra,
I have used object linking and raised event in UPD mode. The event is now getting raised and the associated FM is also getting executed. But as I am triggering Idoc in Update mode, and in that again we would be having COMMIT WORK, would this pose a problem ? Right now we dont have any error messages. But if Idoc generation fails, what would be impact on other updates ?
Also i think this will run as V1 update, anyway we can make this as V2 ? Does 'start with delay' make this V2 ?
I have used object linking and raised event in UPD mode. The event is now getting raised and the associated FM is also getting executed. But as I am triggering Idoc in Update mode, and in that again we would be having COMMIT WORK, would this pose a problem ? Right now we dont have any error messages. But if Idoc generation fails, what would be impact on other updates ?
Also i think this will run as V1 update, anyway we can make this as V2 ? Does 'start with delay' make this V2 ?
Using COMMIT WORK inside an update task will trigger a short dump (it doesn't make sense to use COMMIT WORK again because the update task is triggered by COMMIT WORK). So, just create and process the IDoc inside the update task (don't run it in "another" update task, that wouldn't work anyway), no need of using COMMIT WORK. IDoc is processed via RFC. Yes, V2 = start with delay, but why do you want to make it V2? (it's for logs and so on, whose failures would lead to database integrity errors which are considered as tolerable)
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.