SAP Help Provide a web services from SAP Function Module









ABAP and SE80 to provide a Web Service to the outside world

Below are the steps required to create a service definition within ABAP and SE80 to provide a webservice to the outside world. The example creates a webservice based on the BAPI Function module BAPI_USER_GETLIST and shows how to get the created WSDl so that you can consume this web service from another system.

Step 1 - Access ABAP Service Definition creation wizard via SE80
Execute transaction SE80 and within the the 'edit object' popup screen select 'Service Definition' from the 'Enterprise Services' tab and press create. I think you have to actually enter a name within the service definition field but please note the wizard does not seem to use this and asks you for the service definition name again (i.e. Z_SAPWEBSERVICE).


Step 2 - Create ABAP Service Definition
You should now be presented with the first screen of the Service Definition generation wizard where you need to enter select 'Service Provider' and press continue.


Select 'Existing ABAP Objects (Inside Out) and Press Continue.


Enter the Service Definition Name (Z_SAPWEBSERVICE), description and select 'Function Module' as the end point. Press Continue.


Enter the name of the BAPI Function module you are going to create a web service from (BAPI_USER_GETLIST), check the checkbox and Press Continue.


The next screen should be filled in with the correct details, all you need to do is tick the 'Deploy Service' checkbox and press continue.


Select your package and transport or tick the Local object checkbox and press continue.


Right thats it, simply press the complete button and your service definition will be created.


Save and activate it!


Step 3 - Execute tranastion SOAMANAGER
Execute transaction SOAMANAGER. In the resultant webpage click on the 'Web Service Administration' link within the 'Business Administrastion' tab.

In later version of SAP the option has been re-named 'Web Service Configuration'.


Step 4 - Search for your webservice
Enter your webservice name (Z_SAPWEBSERVICE) into the search pattern field and press Go.

In later version of SAP the search has chnaged slightly


Step 5 - View your webservice
Select the resultant entry and press the 'Apply Selection' button. You just click on the resultant entry in later versions of SAP.


Step 6 - Get the WSDL URL for your web service
Within the Overview tab simply click on the 'Open WSDL document for selected binding' link.

Use the WSDL icons in later versions of SAP


A new window will open containing the WSDL information for your web service, simply copy the browser URL. This URL can now be used to consume this web service from another system, for example via SAP's Visual composer.


Just for for clarification the resultant URL from this example can be used as the WSDL url reference in this visual composer example to consume a web service