Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to peform work after commit?

former_member333493
Participant
0 Kudos
2,591

PEFORM subroutine on COMMIT executes the subroutine before the actual commit happens. Is there any way to call a function module or subroutine AFTER the actual commit happens?

1 ACCEPTED SOLUTION
Read only

rajad
Participant
2,238

(1) Create an event handler method for TRANSACTION_FINISHED event of CL_SYSTEM_TRANSACTION_STATE class and implement your logic there.

(2)SET handler in your enhancement logic

7 REPLIES 7
Read only

rajad
Participant
2,239

(1) Create an event handler method for TRANSACTION_FINISHED event of CL_SYSTEM_TRANSACTION_STATE class and implement your logic there.

(2)SET handler in your enhancement logic

Read only

0 Kudos
2,238

Thanks for the solution. My follow-up question is: how do I export parameters from my SET HANDLER context to my event handler method? (I tried to add parameters to my event handler, but I get the error "Event parameter <param> does not exist" )

Read only

Sandra_Rossi
Active Contributor
2,238
Aveek Kumar Baruah in the class containing your event handler, define and initialize attributes with the values you need.
Read only

Sandra_Rossi
Active Contributor
0 Kudos
2,238

You mean, that during the internal processing of ABAP "COMMIT WORK", all recorded "PERFORM subroutine ON COMMIT" (before COMMIT WORK) are actually processed before the database commit occurs.

Read only

GK817
Active Contributor
0 Kudos
2,238

Hi

You can try implementing your logic in function modules and use the update option as V1 or V2. Though all the FMs will be triggered on COMMIT, you can determine which FMs trigger first at commit. See if it serves your requirement.

Regards

GK

Read only

Sandra_Rossi
Active Contributor
0 Kudos
2,238

There are several solutions proposed by SAP. So that to limit the number of answers, can you explain what kind of logic you want to perform?

Read only

former_member333493
Participant
0 Kudos
2,238

Agreed with your clarification of the question sandra.rossi (I am unable to edit the question now).