cancel
Showing results for 
Search instead for 
Did you mean: 

Create Sales Order via Web Service

Former Member
0 Kudos

Hello All,

I am trying to create a standard sales order using a Web Service and having some problems.

I am using BAPI_SALESORDER_CREATEFROMDAT2 and it is working EXCEPT that it needs to be followed immediately by a BAPI_TRANSACTION_COMMIT for the sales order to be saved in the database.

There doesn't seem to be any session state being saved between my first request and my second so the COMMIT doesn't work.

Can anybody tell me how session state is maintained in Web Services on the NetWeaver platform?

Or is there another SOA service that will do the COMMIT as part of its operation?

Any help would be GREATLY appreciated!

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

sorry, this post was accidentially.

Message was edited by:

Anton Wenzelhuemer

former_member188702
Participant
0 Kudos

Hi Randy i faced a similar problem some time back.

Since thie BAPI works only when the COMMIT is called the wrapper should take care of this as mentioned above.

Here is the tutorial which will depicts how to wrap an RFC to make it as a webservice.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6ac00e8a-0d01-0010-10a7-de2...

Easiset solution is if you can somehow get hold of the ESA service

Regards

Former Member
0 Kudos

Many thanks for this Karthik!

Why can't I get hold of the ESA service? I try to log on to the site but it refuses me.

On my system the Web Service Creation Wizard (depicted in the example you sent me) times out so I can't actually create the service.

There's a support package for this but I've never installed one so I am stuck until I can find someone here who knows how to do it.

Isn't this fun?

Former Member
0 Kudos

Hello Randy,

did you find a solution for the "commit issue"? I am facing the same problem.

Thanks,

all the best,

Felix

nilayghosh
Active Participant
0 Kudos

Hi Randy,

If you install the SAP ERP ES (enterprise service pack), you will get a ready list of standard list of enterprise services. Out of these, the enterprise services for creating/editing sales order are also there. To check out, please go to the Enterprise Service Workplace https://www.sdn.sap.com/irj/sdn/esworkplace and check the Ent. Services at http://erp.esworkplace.sap.com/socoview(bD1lbiZjPTgwMCZkPW1pbg==)/smdisplay.asp?id=7AB0BCC20B1611DA1...

Regards

Nilay

Former Member
0 Kudos

Felix,

No, I haven't gotten a fix yet - it times out when I try to use the Service Creation Wizard to change the service to be stateful instead of stateless.

Is this what you are seeing?

Thanks

Randy

Former Member
0 Kudos

Nilay,

Thanks for this - when I click on the ES definition link it times out on me though.

Randy

nilayghosh
Active Participant
0 Kudos

Hi Randy,

I assume you have been able to enter the ES Workplace successfully. I also faced the same "timeout" problem this morning. This is a temporary problem as I have access these definitions many time in the past. So, either you can retry or access the Enterprise service directly through the WebGUI http://erp.esworkplace.sap.com/sap/bc/gui/sap/its/webgui?sap-system-login-basic_auth=X&sap-client=80.... You can also try the Enterprise Service Registry http://xi.esworkplace.sap.com:50200/webdynpro/dispatcher/sap.com/tcesiesperui/Menu.

Regards

Nilay

nilayghosh
Active Participant
0 Kudos

Hi Randy,

Any success in getting into the ES Workplace. I hope you have been able to find out your target Enterprise Service. Please let me know if not.

Regards

Former Member
0 Kudos

Hi Nilay,

No, I still have not been able to access the ES Workplace. Any ideas?

Thanks for your help! For some reason, the radio buttons that let me rate responses aren't appearing so I can't award points or I definitely would!

Cheers

Randy

nilayghosh
Active Participant
0 Kudos

Hi Randy,

If you are still facing problem in accessing the ES Workplace, then please send a mail to esworkplace@sap.com with the screenshot of the error. In the initial days, I did face this kind of problem which gets resolved very fast by the ES Workplace Team.

Regards

Nilay

gajendra_bhakuni
Active Participant
0 Kudos

Hi Randy,

One quick workaround can be to create a wrapper around BAPI_SALESORDER_CREATEFROMDAT2. The wrapper after call to BAPI will call commit work.

Expose this wrapper as web service and your purpose will be solved.

Regards,

Gajendra.

Former Member
0 Kudos

Hi Gajendra,

Thanks for the input, this may very well be what I end up doing as a workaround. But since I want to do the same thing with other BAPIs I'll have to find a long term solution eventually.

I'll update this thread when I find that solution!

Thanks

Randy