Skip to Content
Technical Articles
Author's profile photo Akshay Kumar

API extensibility in SAP S/4HANA Cloud and monitoring with SAP AIF

When we talk about cloud, its about delivering the standard business processes however during the integration of one cloud system with another, we might require some additional fields to be created and sent to the communicating system. SAP S/4HANA Cloud offers this capability and one means of it, is via extensibility of APIs.

In this blog I will show the step by step procedure of adding a custom field in a SOAP API and pushing this data for creating the respective business object in SAP S/4HANA Cloud.

In the example here, I would run through the following:

  1. Extending an inbound SOAP API ‘OrderRequest_In’ (used for creating a Sales Order in SAP S/4HANA Cloud) with a custom field and make this custom field visible in Sales Order UI as well
  2. Setup the Communication Management for this API
  3. Push the relevant data into SAP S/4HANA Cloud via XML Payload including the custom field
  4. Monitoring Sales Order creation in ‘Message Dashboard’ application enabled by SAP AIF and the ‘Display Sales Order’ application of SAP S/4HANA Cloud

 1. Extending an inbound SOAP API ‘OrderRequest_In’ with a custom field and make this custom field visible in Sales Order UI:

1.1 Logon to SAP S/4HANA Cloud system with Key User and Launch ‘Custom Fields and Logic’ application:

1.2 Create a new field by entering the required properties like Business Context (Sales Document in our example), Label, Field Type and Length. I am creating ‘Partner No.’ in this example:

1.3 Enable its usage in SOAP API under ‘SOAP APIs’ section and also in the required user application(Sales Document GUI) under ‘UIs and Reports’ section and ‘Publish’ the field::

 2. Setup the Communication Management for this API:

2.1 To enable the use of this API we would need to setup Communication User, Communication System and Communication Arrangement with respect to the Communication Scenario of API (SAP_COM_0223 in our example):

For more details on setup of Communication Management you can follow my earlier blog by clicking here.

Note: In this example we would only use the inbound service hence we may deactivate the outbound services in Communication Arrangement. However create a new Outbound User in your Communication System in addition to adding the Communication User as Inbound User (otherwise you might run into an error of no outbound user while activating the Communication Arrangement).

3. Push the relevant data into SAP S/4HANA Cloud via XML Payload including the custom field:

3.1 The service URL can be copied from Communication arrangement and also the respective WSDL file can be downloaded from there itself. The authentication would happen via Communication User created in earlier step.


Note: There can be multiple ways for testing the XML containing the required data to hit the service URL. Customers generally use SoapUI / Postman(external 3rd party tools) however it is completely left on the individual and these 3rd party tools are not delivered as part of SAP S/4HANA Cloud.

3.2 Once a request to send the payload is successful, the HTTP status in the tool would become ‘202’ – Accepted.

4. Monitoring Sales Order creation in ‘Message Dashboard’ application enabled by SAP AIF and the ‘Display Sales Order’ application of SAP S/4HANA Cloud:

SAP Application Interface Framework (AIF) provides ability monitor interfaces and their data messages with less IT support enabling efficient and cost effective approach of Interface monitoring and error handling.

More details on monitoring with SAP AIF can be found here.

Business Role Required:  SAP_BR_CONF_EXPERT_BUS_NET_INT

4.1 [Prerequisite for using ‘Message Dashboard’ application]– Assign user to namespace (/SDEDI in my example) in ‘Assign Recipients’ application (under the group ‘Communication Management- Message Monitoring’) to enable monitoring for this user:

4.2 Launch “Message Dashboard” application for monitoring and error handling and we can see here the success/failure messages with regards to our request:

4.3 Launch the “Display Sales Order” application, and display the respective Sales Order header, navigate to Custom Fields. The data sent for the new field(Partner No.) which we added in Step 1 can be seen here:

These steps shows how SAP S/4HANA Cloud allows the custom fields to be added in API to enable seamless integration.

Note: Not all the APIs are currently extensible. If an API is extensible, it shall be visible in “Custom Fields and Logic” application, like the API used in example here.

Disclaimer: This blog is based on SAP S/4HANA Cloud 1802 release. Only the test/dummy data is used in this blog.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Sowmya Lakshmi R
      Sowmya Lakshmi R


      Insightful Information ..

      Thank you Akshay !

      Author's profile photo Gaurav Karkara
      Gaurav Karkara

      Hi Akshay,

      If we use Sales order integration APIs like SAP_COM_0109, Can that also be monitored through AIF? or its just limited to EDI integration APIs?

      Is there any reason to use SAP_COM_0223 to create sales order but easily found API for sales order creation is SAP_COM_0109?


      Gaurav Karkara

      Author's profile photo Pavan kumar
      Pavan kumar

      Hi Akshay Kumar,

      Very well explained.I am battling to monitor the inbound messages to S4HC 1802 starter system which sent from SAP CPI.I posted data to SAP_COM_0301 scenario Id and I can see the record successfully created however could not see the messages either in SAP AIF dashboard and Interface monitor.Could you please help me on how to assign user to namespace and to which namespace I need to assign as I can see only 3 standard namespaces in Assign Recipient tile.I can only see /CMDBP and /CMDPR recipients assigned to my user and I never knew how these were assigned.For my Integration between SAP CPI and S4HC I used the communication user in IFLOW for posting data into S4HC using receiver ODATA adapter.Highly appreciate your assistance in this regard.


      Pavan Nukala

      Author's profile photo Hoang Vu
      Hoang Vu

      Hi Akshay,

      great blog!

      Similar to Pavan's question:

      Is there a way to create a new AIF namespace and define interfaces in a Fiori App?

      Customers can't access the backend system, but they would like to customize AIF.

      Do you have experience on how customers can do this?




      Author's profile photo Akshath LT
      Akshath LT

      Hello Akshay,


      How to display/see the incoming and outgoing data of CPI?


      I have added customer fields using extensibility and mapped with CPI structure.


      But, I am able to update the standard field records, not the custom/extensibility field.


      I would like to know, what is my incoming and outgoing data of CPI. also I need to debug and test my mapping logic.


      could you please help me.


      Akshath L.T