Creating a Web Service in the SAP System
Since not a single word has yet been said about creating a web service in the SAP system on these cozy little pages, I'm correcting that now.
I'll start with two essential components that are integral attributes of any web service architecture, whether implemented in SAP or a similar system.
See: Web Service
SOAP
A protocol for exchanging data between different systems using XML messages, so to speak.
See: SOAP
SOAP (originally Simple Object Access Protocol) is a messaging protocol specification for exchanging structured information in the implementation of web services in computer networks. Its purpose is to promote extensibility, neutrality, and independence. It uses the XML Information Set as its message format and relies on application layer protocols—most commonly HTTP or SMTP—for message negotiation and transmission.
WSDL
A language used to describe the structure of the web service itself for use by external (consumer) systems. The service structure is described using XML.
See: Web Services Description Language
The Web Services Description Language (WSDL) is an XML-based interface definition language used to describe the functionality offered by a web service. The acronym also refers to a specific WSDL document (or WSDL file), which provides a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns. Its purpose is similar to that of a type signature in a programming language.
What does the combination of SOAP and WSDL give me?
Certainly, it saves time and provides convenience. In the SAP system, you can automatically generate a WSDL schema for your service to share with colleagues who intend to call it externally. The service structure becomes accessible to any SOAP client used by you or your colleagues.
Example of Creating a Web Service
Let’s go through a textbook example of creating a web service in the SAP system. While it may not offer anything particularly useful, the sequence of steps may come in handy for general understanding.
0. Task
Create a web service that returns an employee’s last name and first name from the SAP system using their personnel number.
1. Creating a Function Module
To accomplish this task, I’ll create a function module that returns the last name and first name of an employee as output parameters, and takes the personnel number as an input parameter. When creating the FM, make sure to activate the property Remote-Enabled Module.
See: remote function call

The content of the FM, according to the task above, will look like this:

Please don’t judge the use of SELECT * FROM
too harshly. It’s purely for demonstration purposes.
2. Creating the Web Service (Part 1)
Open the function group to which your FM belongs in transaction SE80, and right-click on it. From the context menu, select Create -> Other Objects -> Enterprise Service.
See: Function Groups

The system will assist in creating a new web service by prompting you to enter additional information.

As a result of these actions, a new web service will be created.

In the newly created web service, I will change the security settings by selecting None on the Configuration tab under the Security Profile section (purely for demonstration purposes in this article).
See: Authentication for Web ServicesLocate this document in the navigation structure

Don’t forget to activate the newly created service.
3. Intermediate Testing of the Web Service in SAP
Perform a test of the new web service.
4. Creating the Web Service (Part 2)
Further configuration steps for the new web service should be done in transaction SOAMANAGER. The video fragment below shows the relevant sequence of actions.
See: Working with SOA Manager
5. Testing Access to the Web Service from an External Application
As a demonstration of accessing the new web service from outside, I will use the SoapUI client. Copy the WSDL link to your service.

Create a new project in SoapUI and perform the test.
For more detailed information on this undoubtedly interesting topic, refer to the vendor’s reference materials.
See: Web Service Providers