How To: Set Up & Monitor Asynchronous Inbound Web Service on Application Interface Framework (AIF)
SAP Application Framework provides a bundle of features that helps you to process and monitor different types of messages. In this guide, I will help you set up and monitor an inbound webservice on SAP Application Interface Framework.
You have an asynchronous inbound webservice and this needs to be processed and monitored through SAP Application Framework (AIF). You can use AIF functions like checks, fix values, value mappings, etc. to help in message monitoring and processing. You can check the message status, logs, and payload in Monitoring and Error Handling. If required, you can also cancel or restart the message depending on the business need.
How Does It Work
Here is a high-level overview of the steps you need to perform to set up & monitor asynchronous inbound webservice:
- Create Namespace
- Create Interface
- Set Engines
- Define Structure Mapping
- Define Value Mapping
- Check message in Monitoring and Error Handling
In this blog, we will use the SAP customer creation scenario as a reference.
- Web service model is set
- SAP structure is created for further data processing
1. Create Namespace
Go to AIF Customizing (transaction /AIF/CUST) under Interface Development –> Define Namespace. Create a new entry and enter your namespace name and description.
2. Create Interface
Go to AIF Customizing (transaction /AIF/CUST). Navigate to Interface Development -> Define Interfaces. Enter your namespace. Create a new entry and enter the following details and save the configuration:
3. Set Engines
For Asynchronous Inbound Web Service Interface, the application Engine and Persistence Engine are ‘Proxy’.
Go to AIF Customizing (transaction /AIF/CUST) under Interface Development -> Additional Interface Properties -> Specify Interface Engines. Enter your namespace. Enter the information as shown below and choose Save.
4. Define Structure Mapping
Go to AIF Customizing (transaction /AIF/CUST). Navigate to Interface Development -> Define Structure Mappings. Enter your namespace, the name of the interface, and the interface version created before.
Create a new source structure entry. In the table on the right hand side, select the first empty row and press F4. Select the root structure in the value help view and save.
Select the Source Structure AIF_CUSTOMER_DATA, double click on Assign Destination Structure. Create a new entry, add a new destination Structure by F4 value help and save.
Double Click on Define Field Mappings, define mappings for all the Source and destination fields as below.
Double click to open item for destination structure CUSTTYPE. Input Value Mapping as shown below:
Press Enter twice and there will be a pop-up window with text ‘Do you really want to create value mapping CUSTOMERTYPE_CHECK?’. Click on the ‘Yes’ button. Save. And double click on the value mapping name to navigate to the ‘Define Value Mappings’ page.
Go to ‘Edit’ Mode and input below data and save:
5. Define Value Mapping
Go to transaction /AIF/VMAP, input the value mapping defined above. Add value mapping as shown below and save.
6. Generate test data
Go to transaction SPROXY, open the service provider of your Inbound service. Press Test.
Input test data as shown below, press execute.
Test from SPROXY is not a real Web Service call and the AIF doesn’t persistent the payload. Then the payload could not be successfully displayed in Monitoring and Error Handling.
You can use tools like SOAP UI / Postman to send test data to web service.
7. Check Monitoring and Error Handling
Go to transaction /AIF/ERR and select your interface. For status selection, select all, and execute.
You are forwarded to the Monitoring and Error Handling View. Check the messages displayed in the data messages view by double clicking on the interface name. Select the root structure in the value help.
After you execute, you can find the message under your interface name.
In this blog post, you learnt how to set up and monitor an inbound webservice using SAP Application Interface Framework. In this approach, you can use the mapping functionalities provided by AIF since the file is processed by AIF.
Since the example used to describe this procedure was very simple, it was not possible to show all the features provided by AIF. With more complex interfaces, you can use the other AIF features to your advantage.
An interesting article! Thanks for sharing!
Good Article! Is it also possible to monitor inbound Webservices without a proxy (WS created from RFC FMs)?
We have created inbound Webservice on top of RFC function module. Could you please suggest the steps to configure AIF for such webservice?