2022 May 07 5:26 PM
I've twice come across the same issue: I'm looking for a user exit that triggers AFTER SAP has updated everything in the database, but all the available user exits and BAdI methods trigger before the update or during. Is there any way to run some code after SAP is done with everything? It would suffice if I could say, in an existing user exit, "run this other bit of code 10 seconds from now", but I'm not finding a way to do that either (I've tried calling a function IN UPDATE TASK and putting a "wait up to 10 seconds" in that, but that won't work). So I've solved it with a job that runs every 5 minutes or so, which is of course a terrible solution.
My particular case here is that I want to change a Purchase Requisition item text, after SAP has created a PR from a service order (in IW32). None of the user exits or BAdI's allow me to do that, because the text doesn't exist yet and isn't in the parameters either. But I've run across this same problem before: I don't know how to act AFTER the db update. So perhaps this is just a gaping hole in my ABAP knowledge and someone can help me fill it.
I've twice come across the same issue: I'm looking for a user exit that triggers AFTER SAP has updated everything in the database, but all the available user exits and BAdI methods trigger before the update or during. Is there any way to run some code after SAP is done with everything? It would suffice if I could say, in an existing user exit, "run this other bit of code 10 seconds from now", but I'm not finding a way to do that either (I've tried calling a function IN UPDATE TASK and putting a "wait up to 10 seconds" in that, but that won't work). So I've solved it with a job that runs every 5 minutes or so, which is of course a terrible solution.
My particular case here is that I want to change a Purchase Requisition item text, after SAP has created a PR from a service order (in IW32). None of the user exits or BAdI's allow me to do that, because the text doesn't exist yet and isn't in the parameters either. But I've run across this same problem before: I don't know how to act AFTER the db update. So perhaps this is just a gaping hole in my ABAP knowledge and someone can help me fill it.
2022 May 07 7:58 PM
Maybe your update function module is called before the standard function module for updating the long texts.
In that case, you may register a handler method of the event CL_SYSTEM_TRANSACTION_STATE=>TRANSACTION_FINISHED which is triggered right after the database commit in the update task.
You may also call another function module in the background task, it will be started asychronously after all update function modules (hopefully should actually execute after the database commit).
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |