SOAMANAGER – Generate Service Consumer

Published by Tobias Hofmann on

6 min read

Welcome to the 2000s! Let’s learn something about the latest in enterprise architecture: SOAP! See how easy it is to consume data from a non-SAP system in NetWeaver ABAP. This will bring the internet to SAP and positions your system as a player in the new internet market. Supporting SOAP will show you that NetWeaver is not just a name, but a mission: SAP as the center of the web.

I’d like to say that this is a joke, but even in 2022 many services are SOAP Web Services. The world switched to REST, JSON, OData or Graph a while ago. Enterprise software will struggle with their legacy for many years to come. Don’t forget: SOAP was once the approach to enterprise architecture. It was the lingua franca when data was meant to be exchanged. It did not work out as expected, and today nobody wants to work with it any longer. Yet, life as a professional architect / developer also means that you must deal with legacy technology. Enterprise ready for SOAP implies that investments are secure. Even today you can find many SOAP APIs in S/4HANA Cloud! So much for the S/4HANA is a new architecture: it is NW ABAP based. Working with SOAP in 2022 is not what you might be on your wish lists, but it works, is supported, and most important: if it helps to solve a business problem fast and at low costs, why not use it?

Working with SOAP Web Service in NW ABAP is possible since 20 years (or longer). You can expose or consume a web service. I’ll focus here on consuming a web service. The steps did not change much over the years.

This post is focusing on the Basis part, the service consumer configuration and the definition of the logical port.

The tasks are executed in the transaction SOAMANAGER, which starts a Web Dynpro application in the browser.

(Screenshots in German, I forgot to switch language)

Tx: SOAMANAGER
Service Administration > Web Service Configuration

Search for your service. The name is what the proxy was named in the import wizard. It should be something Z…_PORT.

The consumer proxy should appear in the result list.

Open the detail page of the service. Go to configuration tab of the service.

Create a new configuration. There are some options available. I am going to create the configuration manually.

Select create > new manually

This will open a wizard. Go through the steps to create the service consumer.

Step 1 – Name of logical port

Provide a name for the logical port, e.g. DEFAULT. When using later the ABAP proxy in your custom coding, this is the value you provide when calling the web service.

(Option): Description
(Optional) Mark logical port as standard

Step 2 – Consumer security

Provide the web service authentication. This is how NetWeaver will authenticate against the Web Service provide / server. Here you can see that the ABAP dev does not need to know the credentials. This is hidden from the coding via the consumer configuration.

Step 3 – HTTP configuration

Provide the access information for the web service.

Step 4 – SOAP Protocol

Message ID protocol

For the message ID you have several options to chose from. The value what to use should be provided by the admin responsible for the web service.

Data transfer

Transfer protocol

Step 5 – Identifiable Business Context

Step 6 – Operation configuration

Here you can configure each operation the web service provides.

Finish

Close wizard by saving the configuration.

Result

A logical port for the web service is created

The logical port is ready and can now be consumed / call in your custom ABAP coding.

Let the world know

Tobias Hofmann

Doing stuff with SAP since 1998. Open, web, UX, cloud. I am not a Basis guy, but very knowledgeable about Basis stuff, as it's the foundation of everything I do (DevOps). Performance is king, and unit tests is something I actually do. Developing HTML5 apps when HTML5 wasn't around. HCP/SCP user since 2012, NetWeaver since 2002, ABAP since 1998.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.