It still amazes me that not a lot of developers know that you can turn any existing SAP remote enable function module into a Web Service. It may sound like a challenging task, but it is just one of those things that you either know how to do it or you don’t. And to know how to do it only takes 15min to understand.
I have broken this down into 2 blogs
Part 1 will show how to create the simple structured web service
Part 2 will show how to configure and test the web service using SOAMANAGER and WSNAV
For this scenario, I created a really simple function module with one input and one output that will send back a response of “Response successful from test” This will only create one operation for this service. However, if you want to create multiple operations for a Service you can also generate the service from a function group.
You will need to ensure that the attribute is set as Remote-enabled in the function module.
Now go to transaction SE80 and right-click–>Create–>Web Service
Since SAP will be hosting this web service we will want to select “Service Provider”
Select the radio button “Existing ABAP Object(Inside Out)”
Since we are building this web service from a Function Module. The difference between and inside out vs. an outside is approach is where the structure is built. From a design perspective, it is recommended that you use an Outside-in approach whenever possible. This means that you would build out the structure in the ESR and then implement the code behind it in SAP.. However, there will be cases when you will want to turn a Standard SAP remote enable function module into a Web Service, thus using this approach, the Inside out approach..)
Give a name to what you want to call your Enterprise service and specify that the endpoint will be a function module.
Enter the name of the Function module that the web service will call in the backend.
Here you will have to specify which authentication you want this service to have. For this example I have set it to no authentication.
Now you are complete with building this web service. However at this point you have just built the Web Service but you will now need to configure it so that an external application can call this web service.
This will come in my next Blog for configuring the newly created Web Service and as well as testing this service.
Hi Steve Park, How are you doing?
I this blog is really good, Much appreciate if you can provide next blog. URL for Part 2 will show how to configure and test the web service using SOAMANAGER and WSNAV.
If i can suggest, please place URL of subsequent blog to navigation easily. Please assist me.
Thanks A lot.
Best wishes,
subani shaik
Appreciate if you can provide the second part of the blog. It is indeed very useful. Thank you.
For completeness sake, here are links to both parts:
Turn any SAP remote-enabled function module into a Web Service – Part 1
Turn any SAP remote-enabled function module into a Web Service – Part 2
Really good article…Do you know if this is available for SAP WAS 6.20 I’ve been told it does support web services but there is no option for Web Service in SE80 and bo SOAMANAGER?
Steve,
Nice article. I have a question. I have created a function module which is remotely enabled. I want to expose this function module as web service in SAP R/3 4.7 WAS 6.20. How do I do this? Any help.
Keep up the good work.
Thanks,
James