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: 

How to submit program after database commit of CJ20N

0 Kudos
580

Hello experts,

I need to submit a executed program after a project or wbs element is created. I try to use badi WORKBREAKDOWN_UPDATE and PROJECTDEF_UPDATE to do that. But these badi were working when database not commit.

How can i be sure to submit my program after the database COMMIT of the CJ20N?

Thanks a lot for your time.

Regards,

Son

3 REPLIES 3

Sandra_Rossi
Active Contributor
481

One of the possibilities is to set a handler on the event TRANSACTION_FINISHED of class CL_SYSTEM_TRANSACTION_STATE, so that to trigger your own method. The event is raised both for COMMIT WORK and ROLLBACK WORK, so test the parameter KIND for the value CL_SYSTEM_TRANSACTION_STATE=>COMMIT_WORK (not rollback).

See the ABAP documentation for more information.

DominikTylczyn
SAP Champion
SAP Champion
0 Kudos
481

Hello nguyencongson1807_96

I can basically see two options:

Best regards

Dominik Tylczynski

raymond_giuseppi
Active Contributor
0 Kudos
481