on 12-03-2008 6:49 AM
Hi Experts,
I am using Visual Studio 2003 and SAP.Net Connector for Microsoft .NET 2.0.
I am creating sales order from web application but when I am calling BAPI for commit .....
proxy.Bapi_Transaction_Commit("X",out bapiReturn2);
It throws me an error like below.
The XML element named 'BAPI_TRANSACTION_COMMIT' from namespace 'urn:sap-com:document:sap:rfc:functions' references a method and a type.
Change the method's message name using WebMethodAttribute
or change the type's root element using the XmlRootAttribute.
Does any one have idea how to deal with this problem
Thanks in Advanced
Sunil Pawar
Sunil,
You should consider creating a wrapper that includes the BAPI you want to execute along with the COMMIT. That way you only have to make one call to SAP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I solved this problem by adding following line of code instead of giving separate call to BAPI_TRANSACTION_COMMIT.
SAPProxy1 BAPI = new SAPProxy1(conStr);
BAPI.Bapi_Salesorder_Createfromdat2(list of parameters)
BAPI.CommitWork();
Now its working.If any one needed more information on this give reply to this post
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunhil I was having the same problem and I tried to correct it the same way you have here albeit for bapi_Salesdocument_Copy.
The trouble was it would return no document because the BAPI dows not work on its own even nativly in SAP. S by the time I got to the proxy.bapi_transaction_commit() line of code it was to late. The statelessness of the bapi seems to be the problem. Any thoughts?
Thanks,
Mark
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.