on ‎2005 Apr 18 2:39 PM
Hi,
I know this question has been asked before but I've searched the forums and have tried all the suggestions and nothing worked.
I'm creating a sales order using BAPI_SALESORDER_CREATEFROMDAT2 populating all the mandatory fields and I get 3 success messages, 1 warning message (saying the data in incomplete) and a Sales Order number at the end.
After finding no error messages I run BAPI_TRANSACTION_COMMIT which comes back with no messages at all in the return table.
But if I go to VA03 to view the sales order I get 'Sales Order xxxx is not available'. Can anyone tell me what I'm doing wrong?
Thanks,
Gill
Request clarification before answering.
Hi Gill,
If your are calling BAPI_SALESORDER_CREATEFROMDAT2 in Se37 , you need to call with Test Sequence combing with
Another FM BAPI_TRANSACTION_COMMIT.
If it is in a Report call BAPI_TRANSACTION_COMMIT to commit the work (recommended to have a WAIT flag set).
Regards,
Manohar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your suggestions. I've found a part solution, I did test the sequence BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_TRANSACTION_COMMIT and this worked from SAP. However I'm need to run both these from Business Connector which still doesn't work. I've created a FM which calls both BAPIs one after the other in the hope that this will solve my problem.
If anyone has had a similar problem or can suggest a solution, anything would be welcome. Thanks.
Gill,
When connecting externally, you need to maintain the same session. I'm not sure exactly how this is handled from Business Connector, but its important that your process goes something like:
- Open connection
- ...
- Call sales order BAPI
- Call commit work
- ...
- Close connection
If the connection is maintained you are still operating within one LUW and then the Commit will apply to the call of the sales order BAPI. If the commit is issued via a seperate connection then it will have no effect.
I think it would be fruitfull to dig a little bit further on the Business Connector side on how this can be achieved.
Cheers,
Brad
In case someone is still interested ...
Here are the specifics of how the process outlined by Brad Williams works in the BC
- Open connection
> run the function sap:createTID which is inlcuded in the SAP package.
This function returns a transaction ID
- Call sales order BAPI
> Call the BAPI_SALESORDER_CREATEFROMDAT2 and pass the TID retrieved in the previous step along with the call (parameter $tid)
- Call commit work
> If you are successful call BAPI_TRANSACTION_COMMIT, passing along the same TID
- ...
- Close connection
> Done
I created a service consisting of this three step flow (create TID, create sales order, commit). I then was able to expose it as a Web service and had a number of different client applications leverage this service.
Now my quest is to do the same in XI with the RFC adapter, let me know if you have the answer! (mhaines@uwm.edu)
Regards,
Marc
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.