cancel
Showing results for 
Search instead for 
Did you mean: 

NCO 2.0 problem in commit and wait

Former Member
0 Kudos

Hi there,

I use NCO 2.0. It provides a SAPClient.CommitWork() method to implement BAPI_TRANSACTION_COMMIT. However, it doesn't support commitandwait function. Now, my problem is how do I know my BAPI execution has committed ?

here is my scenario:

I execute BAPI_SALESORDER_CHANGE to create a sales order items. Then I use SAPClient.CommitWork() method to commit the work. Sequently, I execute a RFC function to write WBS for each order item. The error occured and showed that "the salesdocument was locked". I think it is because the commit action has not finished.

If I add thread.Sleep() to wait 5 seconds, then I can successfully execute the RFC function to update WBS.

So, how could I know the SAPClient.Commit() has finished ? In BAPI_TRANSACTION_COMMIT, it provides WAIT function. But NCO 2.0 can't add BAPI_TRANSACTION_COMMIT proxy class and SAPClient.CommitandWait() method was intentionally disabled. does anyone meet this problem, too ?

Please tell me how to solve it.

Thanks in advanced

BTW, I already know I can wrapper BAPI_TRANSACTION_COMMIT. That's the way I don't want to do. Since it could result in Deadlock. I want to know is there any method that I can know the commit work has finished.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Idealy, if the calling program could be automatically notified as soon as the commitwork is finished. Unfortunately, there is not such method and even not a method that is a little eleganter than polling, i.e., waiting and trying.

Regards,

Guangwei