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

Perform ... ON COMMIT is not working

Former Member
0 Likes
854

Hello,

I have to change Exclusion/Inclusion Flag in Invoice document after pressing SAVE button. I wrote code in FM 'RV_INVOICE_DOCUMENT_ADD'. I used implicit enhancement and put my logic at the end of FM. In Development server, since data is very less, so my code is running without using PERFORM.. ON COMMIT but is testing server, since data is very huge. So, my logic is not getting triggered.

Actually, I am calling table VBRP and EIKP in this FM and at the time of selecting records from VBRP and EIKP, records are not present in these tables. But in Development, since data is very so it works fine. But in testing, it is getting failed.

So, I used PERFORM.. ON COMMIT. But this is not calling my code even in Developemnt server.

Please, help me, how to use PERFORM.. ON COMMIT. Or is there another place where in, I can put my code. BTW this FM is the last place where I am getting values in VBRP and EIKP tables. Before this FM, we don't get any values in VBRP and EIKP.

Regards

Arpit

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
736

Hi Arpit,

Can't you use another condition like import parameter WITH_POSTING to determine the execution of the code?

And maybe placing your code in a function and call it with starting new task instruction where you can wait for the table updates.

regards,

Arpit

4 REPLIES 4
Read only

Former Member
0 Likes
737

Hi Arpit,

Can't you use another condition like import parameter WITH_POSTING to determine the execution of the code?

And maybe placing your code in a function and call it with starting new task instruction where you can wait for the table updates.

regards,

Arpit

Read only

0 Likes
736

Thanks Edgar,

Let me try your proposed solution.

Read only

Former Member
0 Likes
736

Hi Arpit,

You must ensure that any subroutines called using ON COMMIT can be delayed until the next COMMIT WORK in the calling program so please check whether commit work correctly getting executed after your perform routine for all scenarios.

Regards,

Sudeesh Soni

Read only

0 Likes
736


let me check that Sudeesh. Thanks