on 07-25-2005 10:50 AM
Hi there!
I've got a little problem with changing orders in SAP R/3 via Adaptive RFC using the above mentioned BAPIS.
When I call the first one - either changing an order-position or a disposition - , it returns the Message "order xxx changed successfully".
Afterwards, I call the 2nd bapi to commit the transaction, which returns an empty line.
Unfortunatly, neither the changes have been adopted nor the lock on the tables EKKO & EKPO is released and - additionally - I find the RFC session to be still open.
Any comments are more than appreciated!
BR
Thomas
Hi Thomas,
Are you returning Messege "order xxx changed successfully" from the BAPI itself? or you are showing this messege from your webdynpro application only?
And have you checked that you BAPI is working correctly with the same data when you test it in R/3 only?
Check the same for another BAPI.
And for open connections, by default your models are set to Application scope and because of this it will retain connections. If you want to close this connections you have to write following one line code after executing your model.
wdcontext.current<node name>element().modelObject().modelInstance().disconnectIfAlive();
it will close your connection to the SAP R/3.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Bhavik!
Thank you very much for your answer!
The message "... successfully" comes from the BAPI, which works fine when testing it in SE37. I also only try to commit the transaction, if the change-bapi returns "S" for success.
Inserted the disconnectIfAlive() into the finally-clause of my execution-block, but unfortunatly didn't do its job.
Any ideas? Once again thanks for your kind efforts!
BR
Thomas
Hi Thomas
Well first of all i dont think there is a problem with your Commit. Well like Bhavik suggested always ensure to close the connection if not used.
Ensure that you have not selected TESTRUN import parameter. This will just simulate and will not create a PO.
Second if you have set some parameters in the import structure "PO_HEADER" then ensure that the same parameters are set to 'X' in the import structure "PO_HEADERX".
As far as i can see this could be one of your problem.Check and let me know.
Hope that was helpful.
regards
ravi
Try building a wrapper around the BAPI's which you call from your Web Dynpro. This wrapper has the same interface as BAPI_PO_CHANGE. The wrapper first calls BAPI_PO_CHANGE, then checks BAPI_RETURN for an 'S' message and calls BAPI_TRANSACTION_COMMIT if required.
This has three advantages:
1. Only one RFC call
2. Improved performance
3. Your Web Dynpro implementation becomes simpler
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.