‎2009 Mar 02 9:46 AM
Has anyone tried a PERFORM ON COMMIT within a BADI? It doesn't work and i don't know why.
I am working with the HR Module, and i have a BADI, which is fired when the user hits the 'SAVE' button (PA30 Transaction).. when this happens, i execute a PERFORM ON COMMIT and the subroutine is never called...
Does anyone know anything about this?
Regards
‎2009 Mar 02 9:50 AM
‎2009 Mar 02 9:55 AM
‎2009 Mar 02 9:57 AM
Hi,
Same was the case with me.
I also used statement PERFORM <sub_routine_name> ON COMMIT but it was not working.
So I used statement WAIT UP TO 5 SECONDS
Hope it works in your case.
Regards,
Tarun
‎2009 Mar 02 10:08 AM
Hi,
'perform on commit' only works when 'BAPI_TRASACTION_COMMIT' is executed successfully .
check sy-subrc = 0 after this BAPI.
Thanks,
Krishna..
‎2009 Mar 02 11:19 AM
‎2009 Mar 02 11:48 AM
Hi Yashir,
Have you tried debugging it with "UPDATE DEBUGGING" option?
I have no idea if this is applicable to "perform on commit" but incase of "call function in update task" you have to use update debugging option then only you can debug function module. Normal debugging does not work in that case as function module executes in separate luw after commit statement.
Hope this information helps you.
Regards,
Vishal
‎2009 Mar 02 1:45 PM
I never get any (unsolvable) problem with PERFORM ON COMMIT, be it fired from COMMIT WORK or BAPI_TRANSACTION_COMMIT. So i suppose your BADI is executed when the transaction is in update task, so the commit event has already been triggered, can you check. (debug)
example: in BADI HRPAD00INFTY, method IN_UPDATE is executed in update task, so PERFORM AT COMMIT will not be triggered.
Regards
‎2009 Mar 02 3:29 PM
That's exactly my case.
I'm trying to update infotype 0001, just after the infotype 0002 is saved, via PA30, so i'm using the method IN_UPDATE to do so, and obviously is not working at all.
Do you have any idea on what should i do? I've been thinking of a separate batch input so i could update the second infotype....
Thanks a lot.
‎2009 Mar 02 3:52 PM
In your BADI submit a function module [IN BACKGROUND TASK|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=inBACKGROUNDTASK&adv=false&sortby=cm_rnd_rankvalue] to update the second infotype via FM [HR_INFOTYPE_OPERATION|https://www.sdn.sap.com/irj/scn/advancedsearch?query=hr_infotype_operation&cat=sdn_all] (create a RFC enabled Z-FM that call the standard FM)
Regards