on 10-19-2005 3:13 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.