1/9/25, 11:50 AM ABAP Integration and Connectivity Generated on: 2025-01-09 11:50:20 GMT+0000 ABAP Cloud | ABAP Cross-Product Public Original content: https://help.sap.com/docs/ABAP_Cloud/eede1416d18c436e8810eaaeb20c38ae?locale=enUS&state=PRODUCTION&version=sap_cross_product_abap Warning This document has been generated from SAP Help Portal and is an incomplete version of the official SAP product documentation. The information included in custom documentation may not reflect the arrangement of topics in SAP Help Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for production use. For more information, please visit https://help.sap.com/docs/disclaimer. This is custom documentation. For more information, please visit SAP Help Portal. 1 1/9/25, 11:50 AM ABAP Integration and Connectivity The ABAP environment enables you to connect to other systems using different protocols. It is possible to consume services from other systems and provide services for consumption in other systems. Integration and Connectivity in Simple Terms Integration and connectivity allows different systems and applications to communicate and work together. In the context of the ABAP environment, this means enabling ABAP applications to exchange data and functionality with other ABAP and non-ABAP systems. Key technologies make this possible, such as APIs, events, web services, and various communication protocols. The goal is to create an integrated IT landscape where applications can seamlessly share information and processes. Integration Use Cases Depending on the use case, you can implement process integration, data integration, or event-based integration. Data integration addresses the data exchange between two or more communication partners without a relation to a business process whereas process integration can structure communication at the app level, along a predefined business process. For more information about integration use cases, see Develop Integration Services. Event integration enables the process of creating, transmitting, and managing events. In the context of business applications, an event represents a significant change of state that is relevant for follow-up processes. For example, when a new sales order is created, you can use events to trigger additional workflows in other applications. Inbound and Outbound Connectivity The terms inbound connectivity and outbound connectivity describe the direction of the communication. As shown in the graphic, a call can either be an inbound call or outbound call, depending on the perspective of the system. If the system receives the call, the call is seen as inbound call. If the system sends the call, the call is seen as outbound call. Often, the inbound communication partner acts as the provider while the respective outbound communication partner acts as consumer. Protocols The following protocols are available for inbound and outbound communication in the ABAP environment: OData This is custom documentation. For more information, please visit SAP Help Portal. 2 1/9/25, 11:50 AM HTTP RFC SOAP Integration and Connectivity and ABAP Cloud ABAP Cloud is the development model for developing and running ABAP applications in the cloud. Integration and connectivity are crucial aspects of ABAP Cloud. It provides tools and frameworks that allow ABAP Cloud applications to easily integrate with other cloud and on-premise systems. This includes support for consuming and exposing APIs and events, calling web services, and performing transactional (CRUD) operations. With robust integration and connectivity, ABAP Cloud enables the development of innovative, interconnected business applications. Learn The content in Learn provides background information about ABAP integration and connectivity and helps you to understand the concepts behind it. Roles in ABAP Integration and Connectivity In the ABAP environment, there are two roles for integration and connectivity: Developers: Developers are responsible for all development tasks in ABAP development tools for Eclipse. They are responsible for all development objects that are relevant for integration and connectivity. Administrators: Administrators manage the communication between systems. In the cloud, administration tasks are performed in the communication management apps in SAP Fiori launchpad. In on-premise and private cloud systems, administrators use the corresponding transaction for the configuration of the communication between systems. Further, administrators are responsible for monitoring the communication between systems. Developers Developers are responsible for creating and developing the required artifacts for integration and connectivity. As a developer, you will perform almost all of your ABAP-related tasks in ABAP development tools for Eclipse (ADT). For more information about ADT, see About the ABAP Development Tools: User Guide. As a developer, you are responsible for the following development objects and the underlying implementation for ABAP integration and connectivity: Development Object System Required for Inbound Required for Outbound Communication Communication Protocols Communication scenario Cloud Yes Yes All protocols Outbound service Cloud No Yes All protocols Communication target Cloud and on-premise No Yes Only relevant for HTTP Service consumption Cloud and on-premise No Yes Not relevant for HTTP Cloud and on-premise Yes No Only relevant for HTTP model HTTP service This is custom documentation. For more information, please visit SAP Help Portal. 3 1/9/25, 11:50 AM Development Object Required for Inbound Required for Outbound Communication Communication Cloud and on-premise Yes No Only relevant for RFC SOAP provider model Cloud and on-premise Yes No Only relevant for SOAP Event Consumption Cloud and on-premise Yes No Depends on event Remote-enabled System Protocols function module (RFM) Model exchange infrastructure Some development tasks require that certain administration tasks are completed in advance. For example, a service call using the service consumption model needs a corresponding runtime configuration to perform the call. This means development and administration tasks go hand in hand. Use Case Comparison Integration is used to connect end-to-end processes across apps or replicate or federate data from different sources. The following table gives you an overview of the two main integration service scenarios, outlining the main differences and main use cases. Comparing Process and Data Integration Dimensions Scenario Scope Process Integration Integrates several apps, along a Integrates several communication predefined business process partners without relation to any Domain-specific logic is taken into account for all operations. (Potentially) Bidirectional Domain-Specific Implementation Data Integration specific business process. Domain-specific logic is bypassed (only READ logic is considered). communication between One-directional communication communication partners between communication partners Write/Updates always through Write/Updates always directly on domain-specific implementation database layer. layer (logic is considered). Data Representation Exchanged data is converted to an Exchanged data keeps source types external format on provider side (for example ABAP dates) to avoid (for example ISO Currencies). any loss of data or semantics because of conversions. Only minimal conversions are applied, which can only be processed on provider-side (for example decimal shift). Protocol OData SQL SOAP Business Events Remote Function Call This is custom documentation. For more information, please visit SAP Help Portal. 4 1/9/25, 11:50 AM Process Integration Process integration can structure communication on the app level, along with a predefined business process, for example, orderto-cash. Process integration takes the domain-specific implementation of each app into account. Communication between the communication partners for point-to-point integration can be bidirectional, meaning that information is exchanged in both directions. There are both synchronous and asynchronous process integration patterns, for example, event-based integration follows an asynchronous approach. Communication Scenario A communication scenario is a development object of the communication management in ABAP integration and connectivity. Protocols In the ABAP environment, you can use different protocols for integration and connectivity, according to your use case. Inbound Communication Learn what inbound communication is and how it's set up in the ABAP environment. Outbound Communication Learn what outbound communication is and how it is set up in the ABAP environment Communication Scenario A communication scenario is a development object of the communication management in ABAP integration and connectivity. Inbound and Outbound Communication Scenarios A communication scenario is a design time description of the communication of two partners. As a developer, you need to create a communication scenario for inbound communication as well as for outbound communication. Depending on your use case, a communication scenario can either be created with one instance per client or with one instance per communication scenario and communication system. Depending on the direction of communication, you have to add the relevant inbound or outbound service to the communication scenario. The inbound or outbound service that you add to the communication scenario determines the protocol that is used. You can either use HTTP, RFC, or SOAP. HTTP is also used for OData communication. For more information, see Outbound Service and Inbound Communication. Note Don't mix inbound services of different transport protocols (e.g. HTTP and RFC) or authentication requirements in one scenario. Authentication Within the communication scenario, you can determine the authentication methods that shall be used. The following authorization methods are available: Basic authentication Client certificates This is custom documentation. For more information, please visit SAP Help Portal. 5 1/9/25, 11:50 AM OAuth 2.0 No authentication (only outbound) The authentication methods that you define in the communication scenario determine which authentication methods are available in the corresponding communication arrangement. For more information, see Communication Arrangement. If the inbound services perform authorization checks, you can maintain the corresponding authorization objects in the communication scenario. These authorization objects are then assigned to the communication user during the configuration of the communication arrangement. The authorization objects can be synchronized automatically with the authorization default values of the inbound services. For more information, see Communication User. Additional Properties It is also possible to add use case-specific additional properties. They can, for example, determine filter conditions for the service call. These additional properties can be made visible for exposure in the corresponding communication arrangement. You can also include a value help. Don't create boolean properties or properties that contain a URL. For more information, see Defining Specific Properties for Communication Scenarios. Example You can define an additional property Warehouse to send a call to multiple warehouses if the number of allowed instances of the scenario is set to One instance per scenario & communication system. This means that several communication arrangements for this scenario are available. Each arrangement points to another system to send the call to the relevant warehouse. Based on the additional property, the appropriate configuration can be retrieved in the service call. Use in SAP Fiori Launchpad After you completed developing the communication scenario, you publish it locally. It can then be exposed by the administrator in SAP Fiori launchpad in the communication management apps. Based on the communication scenario, the administrator creates the corresponding communication arrangement. SAP-Delivered Communication Scenarios There are communication scenarios that are delivered by SAP. These scenarios are ready-to-use and administrators can directly use them to create communication arrangements based on them. For more information, see Integration Scenarios. Protocols In the ABAP environment, you can use different protocols for integration and connectivity, according to your use case. OData OData is an HTTP-based protocol to exchange data between systems that allows you to define REST-based business data services. HTTP HTTP represents a group of application-level protocols with a common interface which allows to build applications in a stateless, extensible, request/response manner. RFC RFC is the SAP-proprietary application-level protocol for system-to-system communication between SAP- and (non-) SAPsystems. SOAP This is custom documentation. For more information, please visit SAP Help Portal. 6 1/9/25, 11:50 AM SOAP is a message-based protocol for communication between SOAP nodes. OData OData is an HTTP-based protocol to exchange data between systems that allows you to define REST-based business data services. Context OData enables you to perform create, read, update, and delete (CRUD) operations. This is why the OData protocol is mainly used in the context of the ABAP RESTful Application Programming Model. With OData you can define large data models reflecting the entities of your business application with all its facets. OData services expose their entities via URLs and provide a standardized way for complex queries and modifications. Through the capability to expose metadata and to add custom semantics through vocabularies, OData enables you to build very sophisticated UIs (like SAP Fiori apps) on top of the service. OData services are either exposed as UI services that can be consumed in an SAP Fiori Elements app or as public interface in a web API. For more information, see ABAP RESTful Application Programming Model and OData Service Consumption. Related Information Consuming an OData Service HTTP HTTP represents a group of application-level protocols with a common interface which allows to build applications in a stateless, extensible, request/response manner. Context HTTP messages address application resources and specify the intended result of the interaction between client and server in a standardized way. The implementation of clients and servers are fully transparent to the protocol. Because of the protocol's flexibility, you can adapt your implementations to a specific use case. You can implement free-style integrations without generated proxies via the HTTP client library. With the HTTP client, you can send a request to any HTTP endpoint. Other than for OData, RFC, and SOAP, you can't use the service consumption model to consume an HTTP service. Related Information Providing an HTTP Service Consuming an HTTP Service RFC RFC is the SAP-proprietary application-level protocol for system-to-system communication between SAP- and (non-) SAPsystems. Context This is custom documentation. For more information, please visit SAP Help Portal. 7 1/9/25, 11:50 AM RFC can be used in different variants (such as synchronous, asynchronous, in the background,..) and can use CPI-C or TCP/IP as transport layer. RFC is used for synchronous process integration and data replication with legacy ABAP systems. With RFC, a remote function module is called. RFC calls are characterized by high performance. To connect on-premise to cloud systems, an RFC connector may be required. For RFC calls, you can either use the service consumption model (SRVC) or the CALL FUNCTION ... DESTINATION statement. As described in Service Consumption Model, we recommend that you use the SRVC because it is less error prone and eases the coding process. Also, the SRVC generates data types required for a typed access to the RFC response. Related Information Providing an RFC Service Consuming an RFC Service SOAP SOAP is a message-based protocol for communication between SOAP nodes. Context SOAP messages are well-defined and serialized in XML and can be bound to different underlying protocols (such as HTTP) for exchange between the nodes. For their interaction, SOAP nodes can use different message exchange patterns (such as request/response, response, etc.) and processing models. With the SOAP protocol, you can consume web services. SOAP calls can be performed either synchronously or asynchronously. In synchronous communication, the sender waits for an answer of the provider and is therefore blocked. In asynchronous communication, the sender doesn't wait for an answer by the receiver. The request can be processed at any time. An administrator can also monitor asynchronous SOAP calls in SAP Fiori launchpad. For more information, see Monitoring. Related Information Providing a SOAP Service Consuming a SOAP Service Enhanced WSDL Document The enhanced Web Services Description Language (WSDL) document is a WSDL document enhanced by ABAP information that is relevant for design time. The WSDL document described the web service that is provided or consumed. In the ABAP environment, the WSDL document is used to create a service consumption model. When you use a regular WSDL as input to create a service consumption model (SRVC), the design time relevant information, such as the types, messages, and port type sections, are analyzed and interpreted by the ABAP web service framework. For all the ABAP properties like the names and types, it will make suggestions and generate a WSDL similar to the input WSDL enhanced with this ABAP information. If needed, you can change these ABAP properties within the enhanced WSDL document to adjust the ABAP artifacts accordingly (upon activation). The mapping between XSD and ABAP types in particular can be adjusted this way. Of course, an enhanced WSDL document can be used as input as well. To encode ABAP properties into the WSDL, the namespace http://sap.com/abap/proxy with the prefix abap was introduced: xmlns:abap=http://sap.com/abap/proxy. For any applicable node of a WSDL, the corresponding enhanced WSDL document contains additional nodes within this namespace to accommodate its ABAP properties. Wherever you see the This is custom documentation. For more information, please visit SAP Help Portal. 8 1/9/25, 11:50 AM abap prefix in the WSDL, you can adjust the ABAP property. These additional nodes can be XSD attributes or elements, depending on where the node to be enhanced is located. This is necessary to maintain WSDL validity. Schema nodes such as xmlns:xsd=http://www.w3.org/2001/XMLSchema are enhanced via additional XSD attributes. WSDL nodes xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/, on the other hand, are enhanced via additional XSD (sub)elements. Regular ABAP properties of any node contain the following: Prefix Name Description ABAP type With the ABAP type, you can control the mapping between XSD and ABAP types. The property availableTypes displays all applicable ABAP types in this case. To change the ABAP type, copy and paste one of the listed types into the type attribute of the given element. Afterwards, reactivate the SRVC to apply the changes. Summary of Additional Nodes and Their Technical Types Node name Technical Type Description abap:prefix Up to 20 characters, case insensitive ABAP prefix (only used if the object is represented by an ABAP object such as CLAS, INTF, TABL, DTEL) abap:name Up to 30 characters, case insensitive ABAP name abap:type String Default or set ABAP type abap:availableTypes Comma-separated list of 30 characters List of all available ABAP types abap:description Up to 60 characters Description abap:prefixT See abap:prefix Prefix for corresponding table type (if maxOccurs > 1 and additional table type is generated and a prefix is required) abap:nameT See abap:name Name for corresponding table type (if maxOccurs > 1 and additional table type is generated) abap:descriptionT See abap:description Description for corresponding table type (if maxOccurs > 1 and additional table type is generated) Example The following code snippet displays a types section of an enhanced WSDL with a schema node (prefix xsd), where all ABAP properties are encoded as XSD attributes: Sample Code <xsd:element name="NumberToWords"> <xsd:complexType abap:prefix="ZZZ_" abap:name="ZZZ_NUMBER_TO_WORDS_SOAP_REQUE" abap:descript <xsd:sequence> <xsd:element name="ubiNum" form="qualified" type="xsd:unsignedLong" abap:name="UBI_NUM" ab </xsd:sequence> This is custom documentation. For more information, please visit SAP Help Portal. 9 1/9/25, 11:50 AM </xsd:complexType> </xsd:element> The element NumberToWords being a complexType is represented by the dictionary structure ZZZ_NUMBER_TO_WORDS_SOAP_REQUE in ABAP. The element within this complexType ubiNum of XSD type xsd:unsignedLong corresponds to structure entry UBI_NUM of ABAP type INT8, which you could change to INT4 or DEC20 (availableTypes). The second snippet represents an exemplary portType section, where all ABAP properties are encoded as additional XSD elements (prefix wsdl) rather than attributes: Sample Code <wsdl:portType name="NumberConversionSoapType"> <abap:prefix>ZZZ_</abap:prefix> <abap:name>ZZZ_CO_NUMBER_CONVERSION_SOAP</abap:name> <abap:description>Proxy Class (generated)</abap:description> <wsdl:operation name="NumberToWords"> <abap:name>NUMBER_TO_WORDS</abap:name> <abap:description>Returns the word corresponding to the positive number passed</abap:descript <wsdl:input message="tns:NumberToWordsSoapRequest"/> <wsdl:output message="tns:NumberToWordsSoapResponse"/> </wsdl:operation> </wsdl:portType> In this code snippet, the generated ABAP class is called ZZZ_CO_NUMBER_CONVERSION_SOAP and its method is NUMBER_TO_WORDS, which corresponds to the operation NumberToWords of the service. Inbound Communication Learn what inbound communication is and how it's set up in the ABAP environment. The term inbound means that a system receives data from another system. So, the call originates in a foreign system that is sending the data or request. In general, the inbound communication partner is the service provider. This means that the inbound partner processes the received data or request from the outbound communication partner. The call is received via different protocols. In the ABAP environment, the following protocols are available for inbound communication: OData HTTP RFC SOAP (with limitations in the cloud) Process Integration can also be realised with events. For more information, see Event-Based Integration. Special Case SOAP In the ABAP environment, inbound communication with SOAP is possible using a so-called SOAP provider model (SPRV). However, this SPRV isn't meant to model and provide SOAP services. Instead, it's used to provide a corresponding inbound service for an existing outbound service. For more information, see SOAP This is custom documentation. For more information, please visit SAP Help Portal. 10 1/9/25, 11:50 AM Workflow As described in Learn, there are developer and administrator tasks for integration and connectivity. The same applies to inbound communication. Developers As a developer, you first need to create the following development objects for the inbound call: A service to be consumed by the outbound communication partner. A communication scenario to enable the configuration by the administrator. For more information, see Communication Scenario. An inbound service that is generated. For SOAP, this inbound service is generated by the so-called SOAP provider model. Administrators As an administrator you use these development objects for the Communication Management in SAP Fiori launchpad, to create the following objects: A communication system that stores the technical information about the communication partners. A communication user that stores authentication information. A communication arrangement that specifies which communication scenario is used. Communication Scenario Communication Management Communication System Inbound Service Generates SPRV, HTTP Service, Function Module, Service Binding Created by the Developer Communication User Communication Arrangement Created by the Administrator Workflow This is custom documentation. For more information, please visit SAP Help Portal. 11 1/9/25, 11:50 AM As described in Learn, there are developer and administrator tasks for integration and connectivity. The same applies to inbound communication. Developers As a developer, you first need to create the following development objects for the inbound call: A service to be consumed by the outbound communication partner. An inbound service that is generated. For SOAP, this inbound service is generated by the so-called SOAP provider model. Administrators As an administrator you use these development objects for the configuration of the communication in the following transactions: SICF for HTTP communication SOAMANAGER for SOAP communication For RFC, the configuration is done directly in the remote-enabled function module. Runtime Configuration SPRV, HTTP Service, FunctionModule SICF SOAMANAGER Created by the Developer Created by the Administrator Outbound Communication Learn what outbound communication is and how it is set up in the ABAP environment The term outbound means a system sends data to another system or calls a service in another system. So, the call originates in the system that is sending the data or request. In general, the outbound communication partner is the service consumer. The call is sent via different protocols. In the ABAP environment, the following protocols are available for outbound communication: OData HTTP This is custom documentation. For more information, please visit SAP Help Portal. 12 1/9/25, 11:50 AM RFC SOAP Workflow As described in Learn, there are developer and administrator tasks for integration and connectivity. The same applies to outbound communication. As a developer, you first need to create the following development objects for the outbound call: A service consumption model if your call uses the OData, RFC, or SOAP protocol A communication target if your call uses the HTTP protocol A communication scenario An outbound service An ABAP class to perform the service call The administrator will then use these development objects for the Communication Management in SAP Fiori launchpad, to create the following objects: A communication system that stores the technical information about the communication partners. For example, the outbound communication user to authenticate with the target system is defined in the communication system. A communication arrangement that specifies which communication scenario is used As a developer, you can then use these Communication Management objects in the ABAP class that calls the service. Service Consumption Model Creates O Data/RFC Artifacts Communication Scenario Communication System Creates SOAP Artifacts Outbound Service Referenced by Communication Target (HTTP) Communication Management ABAP Class for Service Call Created by the Developer Communication User Communication Arrangement Created by the Administrator Workflow This is custom documentation. For more information, please visit SAP Help Portal. 13 1/9/25, 11:50 AM As described in Learn, there are developer and administrator tasks for integration and connectivity. The same applies to outbound communication. As a developer, you first need to create the following development objects for the outbound call: A service consumption model if your call uses the OData, RFC, or SOAP protocol A communication target if your call uses the HTTP protocol An ABAP class to perform the service call The administrator will then set up the necessary configuration in the corresponding transactions that are the following: APPLDEST for HTTP communication SOAMANAGER for SOAP communication SM59 for RFC communication As a developer, you can then use these destinations in the ABAP class that calls the service. Runtime Configuration Service Consumption Model APPLDEST, APPLDESTCS, APPLDESTCC Creates code snippet SOAMANAGER Communication Target (HTTP) Referenced by ABAP Class for Service Call Created by the Developer SM59 Created by the Administrator Communication Target A communication target is a development object that is referenced in your code to retrieve the correct destination from which you want to consume a service. The communication target is the recommended approach for HTTP outbound communication. Using Communication Targets For outbound HTTP communication of newly created applications, we recommend using communication targets and application destinations. With this approach, developers can control which applications can use a particular application destination. This is custom documentation. For more information, please visit SAP Help Portal. 14 1/9/25, 11:50 AM In the cloud, the creation of an application destination is triggered when a communication arrangement is created based on a communication scenario that references an outbound service of type communication target. In on-premise systems, you can create an application destination based on the communication target in the APPLDEST, APPLDESTCS, or APPLDESTCC transaction. This application destination acts as a reference to the destination that you want to call in your ABAP code. Communication Targets with Exactly One Assigned Application Destination The communication target can have either multiple or only exactly one assigned application destination. To call an HTTP service via communication targets in your ABAP code, create an HTTP client from your communication target class and call its execute method. Communication Target With Several Assigned Application Destinations If the communication target has several assigned application destinations, additionally, the following is required: When creating the communication target instance, pass the name of the relevant application destination to the parameter application_destination. Before, you need to get the name of the relevant application destination. We recommend storing the application destinations assigned to a communication target in a customizing table. To do so, create an implementation for the BAdI communication_management as described in Calling the HTTP Service. From the customizing table, select the relevant application destination in your service call. Note An application destination is always uniquely assigned to a communication target. When the communication target is created, a unique global communication target class with the same name is generated. An application can only use an application destination if it has permission to access the corresponding communication target class. This communication class is assigned to the application destination. This is only possible if this application is in the same package, or if the communication target class is part of the relevant package interface or main package interfaces. The violation of a main package or software component interface leads to a runtime error, while other package interface violations lead to warnings. Outbound Service An outbound service is a development object of the communication management in ABAP integration and connectivity. An outbound service describes the kind of connectivity that used in a communication scenario (HTTP, OData, RFC, or SOAP). You can create an outbound service for HTTP, SOAP, and RFC. An outbound service of type HTTP is also required for OData communication. For SOAP, the outbound service also specifies the service interface that is used in the scenario. This defines for which consumer proxy the logical port is relevant. HTTP and OData In an outbound service of type HTTP, you can specify the default path prefix to define a standard path where the service is located. This default path prefix can be overwritten in the communication scenario and communication arrangement if required. The name of an outbound service of type HTTP must end with the suffix _REST. Outbound Service of Type Communication Target This is custom documentation. For more information, please visit SAP Help Portal. 15 1/9/25, 11:50 AM For HTTP outbound communication, you can create an outbound service of type communication target. The outbound service references the communication target that you created for HTTP outbound communication. For more information, see Communication Target. The name of an outbound service of type communication target must end with the suffix _COTA. SOAP To create an outbound service of type SOAP, you first need to create and activate a Service Consumption Model of type web service. During the activation, the required artifacts for the outbound communication are generated. For the SOAP outbound service, you need the service interface that is generated during the activation of the Service Consumption Model. You can also specify the default path prefix. The name of an outbound service of type SOAP must end with the suffix _SPRX. RFC Like in an outbound service of type HTTP, you don't need to specify the service that is called in an outbound service of type RFC. You can also specify which function module is called in the RFC Function Module field. Despite the field isn't needed from a technical perspective, we recommend to use it for documentation purposes. The name of an outbound service of type RFC must end with the suffix _SRFC. Adding the Outbound Service to a Communication Scenario After you created and configured the outbound service, you have to add it to the relevant communication scenario. You do this on the Outbound tab in the section Outbound Services of the communication scenario. Service Consumption Model A service consumption model helps you to create code for your service call and it automatically generates the required development artifacts. With a service consumption model (SRVC) you can generate ABAP code from service metadata files in XML format using a wizard in ABAP development tools for Eclipse. You can get the service metadata files of APIs that are offered by SAP products in SAP Business Accelerator Hub . The SRVC is a convenient and fast way for developers to generate ABAP code for the service call. For OData and SOAP, the SRVC is mandatory. For HTTP, an SRVC isn't available. Note We recommend to create a new package for the service consumption model. Generated objects are then created within this package. This allows better organization and clarity. OData The service metadata file for an SRVC is an .edmx file in XML format that describes the service that you want to call. For every operation (Create, Read, Read List, Update, and Delete), a code snippet is generated that you can copy to perform the corresponding operation in your ABAP code. The SRVC of type OData generates a model class that describes the service. RFC For RFC service calls, the SRVC is optional. You can use the CALL FUNCTION ... DESTINATION statement instead. However, we recommend using the SRVC because generated code is less error prone. Furthermore, the SRVC of type RFC generates the required data types for the parameters of the remote function module. With the CALL FUNCTION ... DESTINATION This is custom documentation. For more information, please visit SAP Help Portal. 16 1/9/25, 11:50 AM statement you would have to create these data types manually. The service metadata file for an SRVC of type RFC is an .xml file. You can retrieve this file as described in Generating Model Class for Remote Function Call (RFC). The effort increases with the number and complexity of the required data types. For example, in ABAP applications containing tables with a large number of columns, manual data type generation would be time-consuming. This effort is reduced significantly when using an SRVC. You can save even more time if you're calling the same RFM in different releases and some of the required data types have different characteristics in each release. In this case, you wouldn't only have to generate the different data types for each release separately, but also in different versions. Note that for each release, one proxy is required. You can also benefit from RFC calls via SRVC if you want to perform object-oriented development in a consistent manner. SOAP For the SRVC of type web service, you need a WSDL file that describes the service you want to consume. When you activate the SRVC, the following dependent objects are created: The enterprise service The corresponding dictionary objects The generated ABAP class The SRVC of type web service generates a code snippet for every operation of the web service. Note The service consumption model is initially saved in an inactive state. Therefore, not all dependent objects are immediately visible in the project explorer. Upon activation, all dependent objects are created according to the enhanced WSDL. They are then visible in the project explorer. Data Integration Data integration addresses the data exchange between two or more communication partners without a relation to a business process. One of the main use cases for data integration is cross-system analytics. As opposed to process integration scenarios, the raw data in data integration scenarios is exchanged without leveraging the domain-specific logic. Data can either be replicated or federated in a data integration scenario: Data federation: Data remains in its source system and all requests are forwarded and run on the original data. Data federation is used in scenarios where live access to the source system is required, for example to access the most recent data without a time lag, or to rely on data access control mechanisms inside the source system. Data replication: Data is replicated to a second system and requests are run locally on the replicated data such as, for example, in a data warehouse. Data replication is used where it is more efficient to transfer (business) data from a source to a target system before the data is accessed within that target system. Comparing Data Federation and Data Replication Characteristics Data Federation This is custom documentation. For more information, please visit SAP Help Portal. Data Replication 17 1/9/25, 11:50 AM Characteristics Data Federation Scenario Scope Data remains in its source system. Requests are delegated to the Data Replication Data is replicated to another system. respective source systems and run Requests are run locally in the there. respective systems. Data transformations and adaption is often applied (data enrichment, cleaning, consolidation, multiplexing, scripting, and so on) Consistency Transactions spanning multiple Stateless transactions statements (Stateful transactions) Access Control Authorizations are checked locally Data replication is done in in each system. privileged mode. Federation can be implemented Authorizations are either replicated with business user access and or newly defined on consumer- side. password or, alternatively, with privileged mode for technical scenarios. Technical Implementation SQL service SQL service and replication middleware Inbound Data Integration Using SQL Using the SQL service binding, you can implement inbound data integration scenarios where you can access data in the ABAP system. SQL services facilitate inbound SQL access. They allow external analytical applications to retrieve data from ABAP systems using SQL. As a result, you can use SQL statements in analytical tools for data retrieval and further processing of the data. Data Federation Using the SQL Service In a data federation scenario, you use SQL statements in external analytical tools to access live data that resides in the ABAP system. As central components in such scenarios, you need SQL services to expose data, and external analytical tools such as Microsoft Excel or SAP Datasphere for data consumption. Data Replication Using the SQL Service In data replication scenarios, you replicate data into additional systems for further processing and combining it with data from other data sources. As central components in such scenarios, you need SQL services to expose data, and external analytical tools such as SAP Datasphere for data consumption. Related Information Enabling Inbound Data Integration Using SQL Services This is custom documentation. For more information, please visit SAP Help Portal. 18 1/9/25, 11:50 AM Data Federation Using the SQL Service In a data federation scenario, you use SQL statements in external analytical tools to access live data that resides in the ABAP system. As central components in such scenarios, you need SQL services to expose data, and external analytical tools such as Microsoft Excel or SAP Datasphere for data consumption. As a developer in the ABAP environment, you can expose CDS view entities in an ABAP system using the SQL service. As a result, you can use SQL statements in external analytical tools to access data in database tables (via CDS view entities) that reside in the ABAP system and formulate ad-hoc SQL queries on your data. Architecture As a developer in the ABAP environment, you can access CDS view entities in an ABAP system using the SQL service and an analytical tool as follows: As external analytical tool, you can use a standard tool capable of loading an ODBC driver, for example, Microsoft Excel. The ODBC driver for ABAP can also be used in multiple programming languages. ODBC is primarily a C API, but other languages like node.js, Python, or Perl also provide plugins for ODBC drivers. Alternatively, in a data federation scenario with SAP S/4HANA Cloud, you can also use SAP Datasphere as analytical tool. Instead of directly querying the underlying ABAP-owned database objects using the SQL layer of the ABAP system database, all SQL requests are routed through the ABAP Application Server. They behave just like they would if executed from within an ABAP program. You create CDS view entities on top of the tables that you want to expose. The SQL service binding type serves to expose CDS view entities as read-only to ODBC-based SQL clients. With the SQL service, you can use an access mechanism of the ABAP Application Server that provides SQL-level access to published ABAP-managed database API objects like tables via CDS view entities for system-external consumers. Related Information This is custom documentation. For more information, please visit SAP Help Portal. 19 1/9/25, 11:50 AM Accessing ABAP-Managed Data Using SQL Services for Data Integration Scenarios (in the SAP BTP, ABAP environment documentation) Accessing ABAP-Managed Data Using SQL Services for Data Integration Scenarios (in the SAP S/4HANA Cloud Public Edition documentation) Accessing ABAP-Managed Data From External ODBC-Based Clients (in the SAP S/4HANA documentation) Data Replication Using the SQL Service In data replication scenarios, you replicate data into additional systems for further processing and combining it with data from other data sources. As central components in such scenarios, you need SQL services to expose data, and external analytical tools such as SAP Datasphere for data consumption. Architecture In this scenario, you use SAP Datasphere to retrieve data from your ABAP system. From a technical perspective, SAP Datasphere plays the role of a client and triggers replication of data from the ABAP system to your SAP Datasphere instance. The replicated data then forms the basis for analytical scenarios inside SAP Datasphere. To access data from your ABAP system in SAP Datasphere, you use SQL service bindings in the ABAP systems for the data exposure and the replication flows provided by SAP Datasphere: This is custom documentation. For more information, please visit SAP Help Portal. 20 1/9/25, 11:50 AM You create CDS view entities on top of the tables or CDS views that you want to expose. The SQL service binding type serves to expose CDS view entities. With the SQL service, you can use an access mechanism of the ABAP application server that provides SQL-level access to published ABAP-managed database API objects like tables and CDS views via CDS view entities for replication. The replication management service of SAP Datasphere is used to replicate selected CDS view entities to SAP Datasphere. Related Information Accessing ABAP-Managed Data Using SQL Services for Data Integration Scenarios (in the SAP BTP, ABAP environment documentation) Accessing ABAP-Managed Data Using SQL Services for Data Integration Scenarios (in the SAP S/4HANA Cloud Public Edition documentation) Accessing ABAP-Managed Data From External ODBC-Based Clients (in the SAP S/4HANA documentation) Outbound Data Integration Using SQL Using CDS external entities, you can implement outbound data integration scenarios where ABAP applications can retrieve data from external systems using SQL. CDS external entities facilitate outbound SQL access. They allow ABAP applications to retrieve data from external systems using SQL and make it available within the CDS infrastructure. This allows an ABAP system to seamlessly integrate with other systems via SQL. A CDS external entity is a persistent entity that can be used to access data from external database systems within the AS ABAP using SQL. The external systems can be other SAP HANA or non-SAP HANA database systems, or a remote AS ABAP. The properties of the connection between an external entity and the external system are configured using a logical external schema. The connection to the external system is based on the data federation approach as it is provided by SAP HANA Smart Data Access. More Information External Entities (in the ABAP Data Models documentation) Event-Based Integration In the context of business applications, an event represents a significant change of state that is relevant for follow-up processes. For example, when a new sales order is created, you can use events to trigger additional workflows in other applications. An Event-Driven Architecture (EDA) is the process of creating, transmitting, and managing events. Effective EDA typically comprises three fundamental components: event provider event exchange infrastructure event consumer Event-driven architecture enables asynchronous communication between an event provider and an event consumer in use cases where no direct response from the event consumer is required. This is custom documentation. For more information, please visit SAP Help Portal. 21 1/9/25, 11:50 AM You can publish events triggered from ABAP environment applications through RAP Business Events and consume events delivered through the respective event exchange infrastructure from external applications. Depending on your use case, you can choose between the following event exchange infrastructures: SAP Event Mesh (Integration with SAP Event Mesh) SAP Advanced Mesh Service Plan (Integration with Advanced Mesh Service Plan for Service Cloud) SAP Cloud Application Event Hub (Integration with SAP Cloud Application Event Hub) The respective event exchange infrastructure service provided on the SAP Business Technology Platform is a service providing real-time messaging capabilities. All events are exposed in a standard way with a well-defined hierarchy and metadata so they can easily be consumed on different platforms. To successfully exchange events between the respective event exchange infrastructure and an ABAP environment system, an upright connection is required. This connection is maintained by the Enterprise Event Enablement framework during the creation of the corresponding Communication Management artifacts like Communication Arrangements and Communication Systems. Event Types Event-Based Development Flow Event Types Remote Events When the event provider and the consumer are located in separate systems, it can happen that the consumer system is not up and running when an event is raised from the provider, or that the publisher does not know who eventually wants to consume the event at all. In this case, an event exchange infrastructure is needed, to enable asynchronous communication. This way, provider and consumer don’t have to talk to each other in real time. Instead, the event is stored in the event queue. Whenever the consumer is ready, it can call the stored events from the event queue. Typical flow of an asynchronous communication: 1. An event is raised on the event provider side. 2. The event is sent to the event exchange infrastructure. 3. The event exchange infrastructure adds the event to a queue. From the provider side, the job is done. 4. A subscribed consumer calls the queued event. Local Events This is custom documentation. For more information, please visit SAP Help Portal. 22 1/9/25, 11:50 AM The provider and the consumer of events can be located in the same system. In this case, you can be sure that provider and consumer are always up and running simultaneously, so direct communication is sufficient. Thus, there is no need for an event broker to handle the communication in between. The implementation of the event communication can be defined in a local handler class or class pool. Direct Events With direct event channels, you can integrate an ABAP system directly with another ABAP system via business events. In this scenario, events are exchanged between the two systems by calling each other directly via RFC in a one-directional process, without an event broker in between. A possible advantage of this funcionality is a simpler setup and therefore a faster connectivity. Related Information Business Events Develop Business Events Business Event Consumption Event-Based Development Flow This is an overview of the basic steps you need to perform in order to set up an event-driven architecture. Producing Events This is custom documentation. For more information, please visit SAP Help Portal. 23 1/9/25, 11:50 AM To produce an event, you have the following options: You can use predefined SAP standard business events. See: SAP Business Accelerator Hub You can create your own custom business events and raise them in a RAP business object. See: Business Events For an example of how to create your own events in RAP, see also the following tutorial: How to Create RAP Business Events in SAP BTP, ABAP environment Publishing Events After producing an event, you can make it available for event consumers. For this purpose, you can use an event exchange infrastructure (see Integrating Event Exchange Infrastructures), direct push-based integration (see Direct Push-Based Integration). The events are compliant with the CloudEvents specification. Consuming Events To consume an event, you need to create an event consumption model. An event consumption model is a set of ABAP artifacts that allows you to receive events from external applications and to consume them within your business application. See: Creating an Event Consumption Model. Events can also be consumed in the same system as they are raised (see Business Event Consumption). Administrators Administrators are responsible for the communication management and the monitoring of communication. As an administrator, you perform most of your tasks in SAP Fiori launchpad. Here, you create the required objects in the communication management apps to either consume or provide a service. For more information, see Communication Management. Furthermore, you configure cloud connectors for communication with on-premise systems and maintain the required destinations in the SAP BTP Cockpit. Another task for you as administrator is the monitoring of service calls. If, for example, a SOAP call wasn't successfully sent or received, you can find information about that in the Message Monitoring Overview app. Communication Management Communication management is one of the main tasks of the administrator when setting up inbound or outbound communication in the ABAP environment. Context In the communication management apps, you can define which systems communicate with each other and which services are offered or consumed. Also, you define the required authorization information in the communication management apps. For outbound communication, the resulting communication arrangement is required to call the service. For inbound communication, the communication arrangement defines, how the service is provided. General Procedure After the developer has created a communication scenario for inbound or outbound communication, the administrator can use it in the communication management apps in SAP Fiori launchpad to create a communication arrangement. As administrator, you This is custom documentation. For more information, please visit SAP Help Portal. 24 1/9/25, 11:50 AM have to create the following to set up inbound or outbound communication: 1. A communication user in the Maintain Communication Users app 2. A communication system in the Communication Systems app 3. A communication arrangement in the Communication Arrangements app The communication arrangement is based on the communication scenario that the developer created and published. You can also create communication arrangements that are based on SAP-delivered communication scenarios. Note You can also create all these objects (communication system, communication user, and communication arrangement) in the Communication Arrangements app when you create a new communication arrangement. Related Information Communication Management (SAP S/4HANA Cloud Public Edition) Communication Management (SAP BTP) Communication User This is custom documentation. For more information, please visit SAP Help Portal. 25 1/9/25, 11:50 AM A communication user is created by the administrator in the Maintain Communication Users app in SAP Fiori launchpad. You can either use user and password authentication or authentication by certificates. Inbound and Outbound Communication Users A communication user is required on both sides, the inbound and outbound side. On the inbound side, you define an inbound communication user. This user determines the login information for sending a request to the inbound system. That means the outbound system must match this login information to authenticate at the inbound system. To do this, an outbound communication user on the outbound side is required. After you have created the communication user, you can add it to the relevant communication system. You can also create a new communication user during the creation of a communication system. Note You create the outbound communication user directly in the Communication Systems app when creating a new communication system and not in the Maintain Communication Users app. You can either use password or certificate authentication. Related Information Communication Management (SAP S/4HANA Cloud Public Edition) Communication Management (SAP BTP) Communication System A communication system is created by the administrator in the Communication Systems app in SAP Fiori launchpad. A communication system is a specification of a system that represents a communication partner and the technical information required for the communication. This is custom documentation. For more information, please visit SAP Help Portal. 26 1/9/25, 11:50 AM Inbound and Outbound Communication Systems A communication system is required for both inbound and outbound communication. On the outbound side, the communication system defines to which system the call is sent to. Therefore, you have to maintain the host name of the target system. The communication system also stores credentials for the logon. On the inbound side, these credentials are stored in the inbound communication user, on the outbound side, the credentials are stored in the corresponding outbound communication user. For more information, see Communication User. The required authentication methods such as OAuth 2.0, SAML Bearer Assertion Provider, and OpenID Connect (OIDC) Provider are also maintained in the communication system. Cloud Connector For connections between an on-premise system and a cloud system, the so-called Cloud Connector is required. Cloud Connector is a software that serves as a link between cloud applications and on-premise systems. The Cloud Connector must be installed as an additional software on your machine. Here, you can configure the required settings to enable communication between an onpremise system and a cloud system. You can find a list of the available Cloud Connectors in your subaccount in the SAP BTP cockpit (choose Connectivity Cloud Connectors ). For more information, see Cloud Connector. Destination Service Instead of maintaining the credentials for outbound communication in the communication system itself, the communication system can also refer to a destination from the destination service. This can be a destination on subaccount level, or a destination from a destination service instance. Note Since the destination service is deprecated, it is not covered in detail in this guide. We don't recommend to use the destination service for outbound communication anymore. Instead, use communication arrangements as described in Outbound Communication. Related Information Communication Management (SAP S/4HANA Cloud Public Edition) Communication Management (SAP BTP) Communication Arrangement A communication arrangement is created by the administrator in the Communication Arrangements app in SAP Fiori launchpad. It describes which communication partners communicate with each other in the scenario, and how they communicate. Inbound and Outbound Communication Arrangements A communication arrangement is a runtime description of a specific communication scenario. It describes which communication partners communicate with each other in the scenario, and how they communicate. To create a communication arrangement, use the Communication Arrangements app in SAP Fiori launchpad. The communication arrangement is based on the communication scenario that is created in a previous step by the developer. For more information, see Communication Scenario. This means that a communication arrangement is required for both inbound and outbound communication. After creating a communication arrangement on the inbound side, you can download the service metadata file of the service you want to provide. This service metadata file can be used by the consumer of the service to create a Service Consumption Model. Communication System and Communication User This is custom documentation. For more information, please visit SAP Help Portal. 27 1/9/25, 11:50 AM A prerequisite to create a communication arrangement is an existing communication system and communication user. You can either create the communication system in the corresponding Communication Systems app or you can also create a new communication system during the creation of a communication arrangement. Related Information Communication Management (SAP S/4HANA Cloud Public Edition) Communication Management (SAP BTP) Monitoring Within the , you can monitor the communication via SOAP, OData, or events. The required SAP Fiori launchpad app for monitoring is the Message Monitoring Overview app that contains the following error logs: OData error log Event error log SOAP error log Event Monitoring You can find error logs related to business events in the Enterprise Event Enablement - Event Monitor app in SAP Fiori launchpad. In the app, you can access detailed information about specific events. SOAP Monitoring You can find error logs related to SOAP services in the SOAP Error Log app in SAP Fiori launchpad. When calling asynchronous SOAP services, you can check if the call has been sent to the receiver using the Message Monitor Overview app. The error is also visible on the inbound side in the Message Monitor Overview app. To use the app, the following is required. Roles based on the following business catalogs are assigned to your user in SAP Fiori launchpad: SAP_CA_BC_COM_ERR_PC SAP_CA_BC_COM_CONF_PC The user is a recipient of the /SPRX namespace. You can manage this in the Assign Recipients to Users app. See Assign Recipients to Users for more information. Related Information Monitoring the ABAP System Workload (SAP BTP) Maintain Business Roles (SAP BTP) Maintain Business Roles (SAP S/4HANA Cloud Public Edition) Business Catalogs (SAP BTP) Business Catalogs (SAP S/4HANA Cloud Public Edition) This is custom documentation. For more information, please visit SAP Help Portal. 28 1/9/25, 11:50 AM Integration Scenarios Integration scenarios are communication scenarios in the ABAP environment that are managed by SAP. You can use each integration scenario as a template to create a partially configured communication arrangement. SAP provides the following integration scenarios. Integration Scenarios Communication Scenario Documentation Link SAP Enable Now Manager Integration (SAP_COM_0011) Integrating SAP Enable Now Manager SAP Analytics Cloud Integration (SAP_COM_0065) Integrating SAP Analytics Cloud Identity Management Integration (SAP_COM_0093) Inbound Service: Business User SAP Cloud Identity Services - Identity Provisioning SAP BTP ABAP Environment (SAP_COM_0193) SAP BTP Cloud Foundry Destination Service Integration Create a Destination (SAP_COM_0276). External Scheduler - Application Job Administration Integration Integrating External Sheduler (SAP_COM_0326) Business User Change Document Integration (SAP_COM_0327) Integrating Business User Change Documents Business Role Change Document Integration (SAP_COM_0366) Integrating Business Role Change Documents Application Monitoring Integration (SAP_COM_0454) Central Health Monitoring Using SAP Focused Run and SAP Cloud ALM Custom Code Migration Integration (SAP_COM_0464). Enable Usage of the Custom Code Migration App Printing - Pull Integration (SAP_COM_0466) Configuring the SAP Cloud Print Manager for Pull Integration Printing - Notification Integration (SAP_COM_0467) Configuring the SAP Cloud Print Manager for Pull Integration Adobe Document Services (SAP Forms service by Adobe) Print Forms Integration (SAP_COM_0503) SAP BTP ABAP Environment - Software Component Test (Deprecated) Test Integration (SAP_COM_0510) Integration (SAP_COM_0510) SAP Cloud ALM for Operations - Application Monitoring Push Central Health Monitoring Using SAP Focused Run and SAP Cloud Integration (SAP_COM_0527) ALM SAP BTP Workflow Integration (SAP_COM_0542). Integrating Workflow E-Mail Integration (SAP_COM_0548). Sending Mails Using SMTP SAP BTP ABAP Environment - Software Assembly Integration Software Assembly Integration (SAP_COM_0582) (SAP_COM_0582) SAP BTP Transport Management - Outbound Integration Manage Software Components (SAP_COM_0599) UI Theme Designer Integration (SAP_COM_0623) Integrating UI Theme Designer Communication Management - RFC Metadata Integration Develop a Remote-Enabled Function Module (RFM) (SAP_COM_0636) This is custom documentation. For more information, please visit SAP Help Portal. 29 1/9/25, 11:50 AM Communication Scenario Documentation Link FLP Content Exposure Integration (SAP_COM_0647) Expose Launchpad Content to Launchpads on SAP BTP SAP Document Management Service - Outbound Integration Integrating SAP Document Management Service (SAP_COM_0668) - Integrating SAP Document Management Service Enabling Notifications (SAP_COM_0683) Enabling Notifications on SAP BTP, ABAP environment in Launchpads Running on SAP BTP ABAP Test Cockpit - Test Integration (SAP_COM_0901) Running ABAP Test Cockpit (ATC) Check Runs ABAP Unit Test Integration (SAP_COM_0735) Automate the Software Lifecycle Management Process Security Information and Event Management Integration (SIEM) Security Audit Log Integration (SAP_COM_0750) ABAP Test Cockpit Configuration Integration (SAP_COM_0763) Reading and Deploying ATC Configurations Factory Calendar - Pull Integration (SAP_COM_0834) How to export using SAP Cloud Transport Management Enterprise Eventing Integration -Integrating Enterprise Event Integrating Enterprise Event Enablement Enablement (SAP_COM_0092) Security for ABAP Integration and Connectivity In the SAP S/4HANA Cloud and SAP BTP ABAP environment, communication between systems can be authenticated using various methods. The choice of authentication method depends on the specific requirements of the systems involved in the communication and the level of security needed. The SAP S/4HANA Cloud and SAP BTP ABAP environment provides support for implementing these authentication methods to ensure secure communication between systems. When considering an inbound communication scenario, it is necessary to authenticate and authorize a designated user within the provider system to carry out the requested task. Two options are available for this user assignment in the provider system: A technical user: Access through a technical user or Technical Access. A business user: Access for an individual user, which is independent of the caller who triggered the call. This method is known as Principal Propagation. Note The user ID does not need to be identical on both the caller and called party sides. But, in that case, there must be a unique user attribute (such as an email address) assigned to the user on both sides. This is custom documentation. For more information, please visit SAP Help Portal. 30 1/9/25, 11:50 AM Related Information Technical Access vs. Principal Propagation Authentication for Inbound and Outbound Communication Develop In this chapter, end-to-end examples for the different integration use cases are provided. Process Integration In this chapter, end-to-end examples for the process integration use case are provided. Data Integration Data integration addresses the data exchange between two or more communication partners without a relation to a business process. Event-Based Integration Get an overview of integrating the Enterprise Event Enablement framework into your ABAP system. Process Integration In this chapter, end-to-end examples for the process integration use case are provided. This is custom documentation. For more information, please visit SAP Help Portal. 31 1/9/25, 11:50 AM Inbound Communication The term inbound describes the direction of the communication. If the system receives a call, the call is seen as inbound call. Outbound Communication The term outbound describes the direction of the communication. If the system sends the call, the call is seen as outbound call. Inbound Communication The term inbound describes the direction of the communication. If the system receives a call, the call is seen as inbound call. For more information about the term inbound communication, see Inbound and Outbound Connectivity. Providing an OData Service In the ABAP environment, you can provide OData services. Providing an HTTP Service In the ABAP environment, you can provide HTTP services. Providing an RFC Service In the ABAP environment, you can provide RFC services. Providing a SOAP Service In the ABAP environment, you can generate artifacts for SOAP inbound communication. Providing an OData Service In the ABAP environment, you can provide OData services. Context You can provide OData services by developing web APIs with the ABAP RESTful Application Programming Model. This is described in detail in Develop Web APIs. General Procedure 1. Create the Web API. Follow the procedure described in and Develop Web APIs and Developing Unmanaged Transactional Apps. 2. Create a communication scenario. 3. Add the inbound service that is generated by the service binding to the communication scenario. 4. Publish the communication scenario, so that the administrator can use it in the Communication Management apps. Result The administrator can use the communication scenario you've published to create a communication arrangement. For more information, see Communication Management. This is custom documentation. For more information, please visit SAP Help Portal. 32 1/9/25, 11:50 AM Web API Generates Artifacts Inbound Service Communication Scenario Communication Arrangement Service Call Consumer Outbound Service Communication System Developer Tasks in ADT Administrator Tasks in SAP Fiori Launchpad Related Information OData Providing an HTTP Service In the ABAP environment, you can provide HTTP services. Context You can develop an HTTP service by creating an HTTP service object. The required handler class to handle the HTTP request is automatically created with the HTTP service object. The interface IF_HTTP_SERVICE_EXTENSION, with HTTP request/response parameters, enables you to build an HTTP service with full flexibility. General Procedure 1. Create an HTTP Service as described in Working with the HTTP Service Editor. 2. Implement the corresponding handler class. 3. Create a communication scenario. 4. Add the generated inbound service of the HTTP service. 5. Publish the communication scenario, so that the administrator can use it in the Communication Management apps. Result The administrator can use the communication scenario you've published to create a communication arrangement. For more information, see Communication Management. This is custom documentation. For more information, please visit SAP Help Portal. 33 1/9/25, 11:50 AM HTTP Service Generates Artifacts Inbound Service Communication Scenario Communication Arrangement Service Call Consumer Outbound Service Communication System Developer Tasks in ADT Administrator Tasks in SAP Fiori Launchpad Next Steps The following chapter will guide you through the process of creating and consuming your own HTTP service in the ABAP environment. Inbound HTTP Development Tasks Learn how to create an HTTP service and make it available for consumption. Inbound HTTP Administration Tasks Learn how to create a runtime configuration for an HTTP service. Inbound HTTP Development Tasks Learn how to create an HTTP service and make it available for consumption. Creating an HTTP Service Create an HTTP service and implement a corresponding handler class. Creating a Communication Scenario for Inbound HTTP As described in Providing an HTTP Service, in this example, you create an HTTP inbound communication scenario that makes the HTTP service available for consumption. Creating an HTTP Service Create an HTTP service and implement a corresponding handler class. Context As described in Providing an HTTP Service, in this example, you create an HTTP service that is later consumed in an outbound HTTP call. In this example, you create an HTTP service that outputs the current user name and the current date. Procedure 1. Create an HTTP service as described in Working with the HTTP Service Editor, for example: Name: Z_MY_HTTP_SERVICE Description: Get Date This is custom documentation. For more information, please visit SAP Help Portal. 34 1/9/25, 11:50 AM 2. Open the handler class and add the following implementation: Sample Code CLASS zcl_my_http_service DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. METHODS: get_html RETURNING VALUE(ui_html) TYPE string RAISING cx_abap_context_info_error. INTERFACES if_http_service_extension . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_my_http_service IMPLEMENTATION. METHOD get_html. DATA(user_formatted_name) = cl_abap_context_info=>get_user_formatted_name( ). DATA(system_date) = cl_abap_context_info=>get_system_date( ). ui_html = |<html> \n| && |<body> \n| && |<title>General Information</title> \n| && |<p style="color:DodgerBlue;"> Hello there, </p> \n | && |<p> Today, the date is: { system_date }| && |<p> | && |</body> \n| && |</html> | . ENDMETHOD. METHOD if_http_service_extension~handle_request. response->set_text( get_html( ) ). ENDMETHOD. ENDCLASS. 3. Activate the class and the HTTP service. This generates all the necessary artifacts for the next steps. 4. Optional: Check the service by choosing URL in the HTTP service. Creating a Communication Scenario for Inbound HTTP As described in Providing an HTTP Service, in this example, you create an HTTP inbound communication scenario that makes the HTTP service available for consumption. Prerequisites You have created an HTTP service as described in Creating an HTTP Service. Context To provide the HTTP service and to create a corresponding communication arrangement, a communication scenario is required. Procedure 1. Create a communication scenario as described in Consuming Services in the Context of API with Communication Users (Inbound), for example: This is custom documentation. For more information, please visit SAP Help Portal. 35 1/9/25, 11:50 AM Name: Z_MY_HTTP_INBOUND_SCENARIO Description: Inbound Scenario for HTTP 2. On the Inbound tab of the communication scenario, add the corresponding inbound service. This inbound service is generated when activating the HTTP service, for example Z_MY_HTTP_SERVICE_HTTP. 3. Publish the communication scenario. Results The administrator can now use the communication scenario to create a corresponding communication arrangement. Related Information Communication Scenario Inbound HTTP Administration Tasks Learn how to create a runtime configuration for an HTTP service. Creating a Communication User for Inbound HTTP A communication user holds authentication information to register at the system. Creating a Communication System for Inbound HTTP As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Creating a Communication Arrangement for Inbound HTTP As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. Creating a Communication User for Inbound HTTP A communication user holds authentication information to register at the system. Context For this example, basic authentication with user and password is used. The communication user is managed in the Maintain Communication Users app in SAP Fiori launchpad. Procedure 1. In SAP Fiori launchpad, create a new communication user in the Maintain Communication Users app. 2. Enter the following data: General Field Input User Name Enter a user name, for example MY_INBOUND_HTTP_USER Description Enter a description, for example Inbound communication user This is custom documentation. For more information, please visit SAP Help Portal. 36 1/9/25, 11:50 AM Field Input Password Propose or create a password. Note down the password. 3. Save the communication user. Results The communication user can now be used in the communication system. Related Information Communication Management Creating a Communication System for Inbound HTTP As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Prerequisites You have created a communication user as described in Creating a Communication User for Inbound HTTP. Procedure 1. In SAP Fiori launchpad, create a new communication system in the Communication Systems app. Enter the following data: General Data Field Input System ID Provide a system name, for example, MY_HTTP_INBOUND_SYSTEM. System Name Provide a system name, for example MY_HTTP_INBOUND_SYSTEM. Technical Data Field Input General: Inbound Only Activate Users for Inbound Communication Authentication Method User Name/Client ID User ID and Password Enter the user name of the communication user, for example MY_INBOUND_HTTP_USER. For more information, see Creating a Communication User for Inbound HTTP. This is custom documentation. For more information, please visit SAP Help Portal. 37 1/9/25, 11:50 AM 2. Save the communication system. Results The communication system can now be used in the communication arrangement. Related Information Communication Management Creating a Communication Arrangement for Inbound HTTP As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. Prerequisites You have created a communication scenario as described in Creating a Communication Scenario for Inbound HTTP. You have created a communication user as described in Creating a Communication User for Inbound HTTP. You have created a communication system as described in Creating a Communication System for Inbound HTTP. Context In this case, it is used to call the HTTP service that was created in Creating an HTTP Service. Procedure 1. In SAP Fiori launchpad, create a new communication arrangement in the Communication Arrangements app. Field Input Scneario ID Select the scenario, for example Z_MY_HTTP_INBOUND_SCENARIO. For more information, see Creating a Communication Scenario for Inbound HTTP. Arrangement Name Provide a name, for example, MY_INBOUND_HTTP_ARRANGEMENT. Communication System Select the communication system, for example MY_HTTP_INBOUND_SYSTEM. For more information, see Creating a Communication System for Inbound HTTP. 2. Save the communication arrangement. Results The HTTP service can now be consumed in an outbound HTTP call. Related Information This is custom documentation. For more information, please visit SAP Help Portal. 38 1/9/25, 11:50 AM Communication Management Providing an RFC Service In the ABAP environment, you can provide RFC services. Context You can develop a remote enabled function module (RFM) in ABAP development tools for Eclipse (ADT). RFC is used for synchronous process integration or data replication with ABAP systems on older releases, or for high-performance requirements. Note For connections from on-premise systems, a so-called WebSocket RFC is required that uses an HTTPS connection. These settings are made in the on-premise system. For systems prior to release 1909, the SAP Business Connector is required. General Procedure 1. Create an RFM as described in Creating an ABAP Function Module. 2. Activate the RFM. This generates the required inbound service for the communication scenario and the authorization default values. Note To make the RFM remote-enabled in ADT, choose Properties Specific and select RFC in field Processing Type. This also generates the required objects, for example the inbound service. 3. Create a communication scenario. 4. Add the generated inbound service of the RFM to the communication scenario. 5. Publish the communication scenario, so that the administrator can use it in the Communication Management apps. RFC Metadata Integration (Communication Scenario SAP_COM_0636) Instead of using classic RFC via CPI-C, you can also use RFC via WebSocket with SAP Java Connector (JCo) or other RFC connectors. Optionally, you can configure these external RFC connectors to use a dedicated user to retrieve the metadata. Note This scenario also applies for calls routed through the Cloud Connector. Communication scenario SAP_COM_0636 lets you separate metadata access for RFC calls by RFC client libraries from the actual RFC application call. It provides access to the following function modules: RFC_METADATA_GET RFC_FUNCTION_SEARCH This is custom documentation. For more information, please visit SAP Help Portal. 39 1/9/25, 11:50 AM RFC_GET_FUNCTION_INTERFACE DDIF_FIELDINFO_GET Note When using WebSocket RFC, you must use a host name that follows the pattern <myTenantHost>.abap.hana.ondemand.com. Result The administrator can use the communication scenario you've published to create a communication arrangement. For more information, see Communication Management. RFM Generates Artifacts Inbound Service Communication Scenario Communication Arrangement Service Call Consumer Outbound Service Communication System Developer Tasks in ADT Administrator Tasks in SAP Fiori Launchpad Related Information Providing an RFC Service Inbound RFC Development Tasks Creating a Remote-Enabled Function Module (RFM) As described in Providing an RFC Service, in this example, you create an RFC service that is later consumed in an outbound RFC call. Creating a Communication Scenario for Inbound RFC As described in Providing an RFC Service, in this example, you create an RFC inbound communication scenario that makes the RFC service available for consumption. Creating a Remote-Enabled Function Module (RFM) As described in Providing an RFC Service, in this example, you create an RFC service that is later consumed in an outbound RFC call. Context In this example, you create a simple remote-enabled function module that adds two integers. This is custom documentation. For more information, please visit SAP Help Portal. 40 1/9/25, 11:50 AM Procedure 1. Create a remote enabled module as described in Creating an ABAP Function Module, for example: Name Z_RFC_SUM Description Function module for RFC inbound communication 2. Remote-enable the function module: a. Open the Properties view of the function module. b. Go to the Specific tab. c. Choose the following settings: Processing Type RFC RFC Scope From any system RFC Interface Contract Any 3. Add the following code: Sample Code FUNCTION z_rfc_sum IMPORTING VALUE(input1) TYPE i VALUE(input2) TYPE i EXPORTING VALUE(result) TYPE i. input1 = 3. input2 = 4. result = input1 + input2. ENDFUNCTION. 4. Activate the function module. This generates all the necessary artifacts for the next steps. Creating a Communication Scenario for Inbound RFC As described in Providing an RFC Service, in this example, you create an RFC inbound communication scenario that makes the RFC service available for consumption. Prerequisites You have created a remote-enabled function module as described in Creating a Remote-Enabled Function Module (RFM). Context To provide the RFC service and to create a corresponding communication arrangement, a communication scenario is required. Procedure This is custom documentation. For more information, please visit SAP Help Portal. 41 1/9/25, 11:50 AM 1. Create a communication scenario as described in Consuming Services in the Context of API with Communication Users (Inbound), for example: Name: Z_MY_RFC_INBOUND_SCENARIO Description: Inbound scenario for RFC 2. On the Inbound tab of the communication scenario, add the corresponding inbound service. This inbound service is generated when activating the remote-enabled function module, for example Z_RFC_SUM_RFC. 3. Publish the communication scenario. Results The administrator can now use the communication scenario to create a corresponding communication arrangement. Related Information Communication Scenario Inbound RFC Administration Tasks Creating a Communication User for Inbound RFC A communication user holds authentication information to register at the system. Creating a Communication System for Inbound RFC As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Creating a Communication Arrangement for Inbound RFC As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. Inbound RFC from On-Premise Systems Creating a Communication User for Inbound RFC A communication user holds authentication information to register at the system. Context For this example, basic authentication with user and password is used. The communication user is managed in the Maintain Communication Users app in SAP Fiori launchpad. Procedure 1. In SAP Fiori launchpad, create a new communication user in the Maintain Communication Users app. 2. Enter the following data: General Field Input User Name Enter a user name, for example MY_INBOUND_RFC_USER This is custom documentation. For more information, please visit SAP Help Portal. 42 1/9/25, 11:50 AM Field Input Description Enter a description, for example Inbound communication user Password Propose or create a password. Note down the password. 3. Save the communication user. Results The communication user can now be used in the communication system. Related Information Communication Management Creating a Communication System for Inbound RFC As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Prerequisites You have created a communication user as described in Creating a Communication User for Inbound RFC. Context As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Procedure 1. In SAP Fiori launchpad, create a new communication system in the Communication Systems app. Enter the following data: General Data Field Input System ID Provide a system name, for example, MY_RFC_INBOUND_SYSTEM. System Name Provide a system name, for example MY_RFC_INBOUND_SYSTEM. Technical Data Field Input General: Inbound Only Activate This is custom documentation. For more information, please visit SAP Help Portal. 43 1/9/25, 11:50 AM Users for Inbound Communication Authentication Method User Name/Client ID User ID and Password Enter the user name of the communication user, for example MY_INBOUND_RFC_USER. For more information, see Creating a Communication User for Inbound RFC. 2. Save the communication system. Results The communication system can now be used in the communication arrangement. Related Information Communication Management Creating a Communication Arrangement for Inbound RFC As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. Prerequisites You have created a communication scenario as described in Creating a Communication Scenario for Inbound RFC. You have created a communication user as described in Creating a Communication User for Inbound RFC. You have created a communication system as described in Creating a Communication System for Inbound RFC. Context As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. In this case, it is used to provide the RFC service that was created in Creating a Remote-Enabled Function Module (RFM). Procedure 1. In SAP Fiori launchpad, create a new communication arrangement in the Communication Arrangements app. Field Input Scenario ID Select the scenario, for example Z_MY_RFC_INBOUND_SCENARIO. For more information, see Creating a Communication Scenario for Inbound RFC. Arrangement Name Provide a name, for example, MY_INBOUND_RFC_ARRANGEMENT. This is custom documentation. For more information, please visit SAP Help Portal. 44 1/9/25, 11:50 AM Field Input Communication System Select the communication system, for example MY_RFC_INBOUND_SYSTEM. For more information, see Creating a Communication System for Inbound RFC. 2. Save the communication scenario. Results The RFC service can now be consumed in an outbound RFC call. Related Information Communication Management Inbound RFC from On-Premise Systems Setting Up Inbound RFC from On-Premise Systems Using WebSocket RFC Learn how to set up an inbound RFC connection from an on-premise system to the ABAP environment using WebSocket RFC. Get instructions on creating a communication scenario and arrangement, as well as the necessary settings in the onpremise system. Setting Up the Cloud Connector for Inbound RFC from On-Premise Systems (Deprecated) Configure inbound connectivity to the ABAP environment to consume a remote-enabled function module (RFM) from an on-premise ABAP system through the Cloud Connector. Setting Up Inbound RFC from On-Premise Systems Using WebSocket RFC Learn how to set up an inbound RFC connection from an on-premise system to the ABAP environment using WebSocket RFC. Get instructions on creating a communication scenario and arrangement, as well as the necessary settings in the on-premise system. Context Use WebSocket RFC to establish an RFC connection from an on-premise system to the ABAP environment. WebSocket RFC makes it possible to call RFC function modules of the ABAP environment using the API URL of the cloud system using TLS-encrypted WebSocket connections. Note All WebSocket-RFC-connections are TLS-encrypted. WebSocket RFC always uses HTTPS. Procedure 1. Create a Communication Scenario that defines all RFMs to be called on the server side (inbound scenario). See Communication Scenario for more information. 2. Create a Communication Arrangement with a Communication System and a Communication User. See the following for more information: This is custom documentation. For more information, please visit SAP Help Portal. 45 1/9/25, 11:50 AM Communication Arrangement Communication System Communication User Settings in the On-Premise System In the on-premise system, the following parameters must be set in transaction SM59. Create a destination of connection type W: Technical Settings Host The API-URL defined in the Communication Arrangement without the https:// prefix Port 443 Logon & Security Explicit Client by Hostname Authentication Method by User/Password Note If you choose user/password authentication, activate Alias User. by X.509 Certificate Note These settings are available with SAP S/4HANA 1909. For older releases, you need to transform from a CPIC-based RFC to WebSocket RFC via Business Connector. See SAP Business Connector for more information. Related Information Providing an RFC Service Setting Up the Cloud Connector for Inbound RFC from OnPremise Systems (Deprecated) Configure inbound connectivity to the ABAP environment to consume a remote-enabled function module (RFM) from an onpremise ABAP system through the Cloud Connector. Context RFC connections from on-premise systems to the ABAP environment can be performed through a so called Cloud Connector service channel. Note This is custom documentation. For more information, please visit SAP Help Portal. 46 1/9/25, 11:50 AM Using Cloud Connector service channels is deprecated. Use WebSocket RFC instead. HTTP(S) or WebSocket RFC connections do not require the Cloud Connector because they can be opened directly on the Internet. To establish an RFC connection from an on-premise system to the ABAP environment, the Cloud Connector opens an RFC port just like an RFC gateway and acts as a local proxy for the cloud system. Connections to this port are routed through a secure tunnel to SAP BTP. Cloud Foundry Subaccount ABAP Environment Service Instance Points to ABAP Environment Service Instance Firewall On-Premise Network Cloud Connector Service Channel Points to Service Channel Port ABAP System RFC Destination In the Cloud Connector, you create a service channel with a local instance number. In the on-premise ABAP system, you correspondingly create an RFC destination in transaction SM59 with the hostname of the Cloud Connector in your on-premise network and the same instance number. Note If you are using different ABAP instances on SAP BTP, create a service channel for each instance, choose an arbitrary instance number in the service channel settings of the Cloud Connector configuration, and use the same instance number in the RFC destination of your on-premise system (transaction SM59) to identify the called ABAP instance. Since the instance number is defined as a two-digit number, the number of target systems you can configure in the Cloud Connector is limited to 99. Prerequisites You have developed a communication scenario that contains the RFM to be called. You have created a communication arrangement of that scenario with a communication system and communication user. Note To define authorizations for the communication user, use the authorization default values on inbound service level. These authorizations are automatically assigned to the respective communication user. Restrictions This is custom documentation. For more information, please visit SAP Help Portal. 47 1/9/25, 11:50 AM Only remote function modules that are part of a communication scenario can be called from an on-premise system. Most others are blocked, except for the system function module RFCPING. An inbound RFC connection supports only basic authentication as authentication type. The user used for authentication must be a communication user, a business user is not allowed. The user name you can enter in an RFC destination of an on-premise ABAP system is limited to 12 characters. Procedure 1. To establish a service channel, configure it in the Cloud Connector as described in Configure a Service Channel for RFC. Note When creating a service channel for the ABAP environment, the URL of the ABAP instance (tenant host) follows the pattern <myTenantHost>.abap.hana.ondemand.com (not <myTenantHost>-api..., which is valid only for connections to S/4HANA Cloud). Make sure you create the service channel for the correct subaccount. 2. Create an RFC destination in the on-premise system: Use connection type 3 (RFC connection to an ABAP system). Do not use load balancing. As target host, enter the hostname of Cloud Connector. As instance number, enter the local instance number you have used in the configuration of the service channel in the Cloud Connector. Provide logon credentials for a communication user, including the client information. The ABAP environment always uses client 100. Use the connection test in transaction SM59 to verify that the service channel works correctly. Note When calling an RFM, you must write its name in upper case. Providing a SOAP Service In the ABAP environment, you can generate artifacts for SOAP inbound communication. Context Based on a WSDL file that describes your service, you can generate the artifacts that are required to provide a web service using the so-called SOAP Provider Model (SPRV). The SPRV is mainly used to provide a corresponding inbound service for an exposed outbound service. Example An external system triggers a confirmation in your system to inform the external system about the creation of an appointment activity. To receive this information, a provider proxy for this service must be implemented in your system. This provider proxy is generated by the SPRV. This is custom documentation. For more information, please visit SAP Help Portal. 48 1/9/25, 11:50 AM Create / Initial Save SPRV SPRX (Subtype INTF) SOAP Provider Model Service Provider Activate WEBI SUSI Service Definition (generated) Authorization Default Values INTF SCO2 Interface (generated) COM Inbound Service CLAS AIFC Generated test implementation Application Interface Content SPRX TABL/DTEL/TTYP/DOMA Message & Data Types DDIC Objects General Procedure 1. Based on the WSDL file of the service you want to provide, create an SPRV. 2. Activate the SPRV. This generates all necessary artifacts, for example the inbound service that is used in the communication scenario. 3. Add the implementation of your service to the generated implementing class. 4. Create a communication scenario. 5. Add the generated inbound service of the web service to the communication scenario. 6. Publish the communication scenario, so that the administrator can use it in the Communication Management apps. Result The administrator can use the communication scenario you've published to create a communication arrangement. For more information, see Communication Management. SOAP Provider Model Generates Artifacts Inbound Service Communication Scenario Communication Arrangement Service Call Consumer Outbound Service WSDL File of the SOAP Service Communication System Developer Tasks in ADT Administrator Tasks in SAP Fiori Launchpad Related Information Providing a SOAP Service This is custom documentation. For more information, please visit SAP Help Portal. 49 1/9/25, 11:50 AM Outbound Communication The term outbound describes the direction of the communication. If the system sends the call, the call is seen as outbound call. For more information about the term outbound communication, see Inbound and Outbound Connectivity. Service Consumption via Communication Arrangements You as a developer can create and expose services for external outbound consumption to a communication partner by creating an outbound service of the required type (HTTP, SOAP or RFC) and specifying the necessary information. To consume these services, you need to create a communication scenario and assign these services to it. Consuming an OData Service In the ABAP environment, you can consume services via the OData protocol. Consuming an HTTP Service In the ABAP environment, you can consume services via the HTTP protocol. Consuming an RFC Service In the ABAP environment, you can consume services via the RFC protocol. Consuming a SOAP Service In the ABAP environment, you can consume services via the SOAP protocol. Service Consumption via Communication Arrangements You as a developer can create and expose services for external outbound consumption to a communication partner by creating an outbound service of the required type (HTTP, SOAP or RFC) and specifying the necessary information. To consume these services, you need to create a communication scenario and assign these services to it. An administrator then creates a communication system and user for the communication partner, maintains a communication arrangement for the scenario using the created communication system, and specifies the authentication method and URLs. To consume such an external service, you implement the call of the service. Therefore, you need to implement a logical receiver determination in your runtime coding to find the correct target for the outbound call. The following options are available to establish logical receiver determination provided by communication arrangements: Allowed Scenarios instances: One instance per client Only one active communication arrangement can be maintained for the communication scenario in the system. The generated destination can be retrieved by providing the communication scenario ID and the respective outbound service ID. Allowed Scenarios instances: One instance per scenario & communication system Multiple active communication arrangements for one communication scenario for different communication systems in one system are enabled. To determine the correct receiver, you must use additional information to find the correct target. You can either do this based on: Standard attributes such as Communication System ID, or Business System ID Your own properties, such as plant, country, or company, which can be derived from the business context during runtime. You can define your own properties for the communication scenario and maintain them in the communication arrangements. The sample codes below show how to find the correct reference to a destination and how to use it when calling a service. This is custom documentation. For more information, please visit SAP Help Portal. 50 1/9/25, 11:50 AM Find the destination based on the communication scenario only: Sample Code data: lr_cscn type if_com_scenario_factory=>ty_query-cscn_id_range. * Find CA by Scenario ID lr_cscn = value #( ( sign = 'I' option = 'EQ' low = '<Scenario ID>' ) ). data(lo_factory) = cl_com_arrangement_factory=>create_instance( ). lo_factory->query_ca( exporting is_query = value #( cscn_id_range = lr_cscn ) importing et_com_arrangement = data(lt_ca) ). if lt_ca is initial. exit. endif. * take the first one read table lt_ca into data(lo_ca) index 1. * get destination based on Communication Arrangement and the service ID try. data(lo_dest) = cl_http_destination_provider=>create_by_comm_arrangement( comm_scenario = '<Scenario ID>' service_id = '<Outbound Service ID>' comm_system_id = lo_ca->get_comm_system_id( ) ). catch cx_http_dest_provider_error into data(lx_http_dest_provider_error). out->write( lx_http_dest_provider_error->get_text( ) ). exit. endtry. Find the destination based on the communication scenario and business system: Sample Code data: lr_cscn type if_com_scenario_factory=>ty_query-cscn_id_range, lr_bs_id type if_com_system_factory=>ty_query-cs_business_system_id_range. * Find CA by Scenario ID & Business System ID lr_cscn = value #( ( sign = 'I' option = 'EQ' low = '<Scenario ID>' ) ). lr_bs_id = value #( ( sign = 'I' option = 'EQ' low = '<Business System ID>' ) ). data(lo_factory) = cl_com_arrangement_factory=>create_instance( ). lo_factory->query_ca( exporting is_query = value #( cscn_id_range = lr_cscn cs_business_system_id_range = lr_bs_id ) importing et_com_arrangement = data(lt_ca) ). if lt_ca is initial. exit. endif. * take the first one read table lt_ca into data(lo_ca) index 1. This is custom documentation. For more information, please visit SAP Help Portal. 51 1/9/25, 11:50 AM * get destination based on Communication Arrangement and the service ID try. data(lo_dest) = cl_http_destination_provider=>create_by_comm_arrangement( comm_scenario = '<Scenario ID>' service_id = '<Outbound Service ID>' comm_system_id = lo_ca->get_comm_system_id( ) ). catch cx_http_dest_provider_error into data(lx_http_dest_provider_error). out->write( lx_http_dest_provider_error->get_text( ) ). exit. endtry. Find the destination based on the communication scenario and a customer-defined property: Sample Code data: lr_cscn type if_com_scenario_factory=>ty_query-cscn_id_range, lt_prpn type if_com_arrangement_factory=>ty_query-ca_property. * Find CA by Scenario ID & property name/value lr_cscn = value #( ( sign = 'I' option = 'EQ' low = '<Scenario ID>' ) ). append initial line to lt_prpn assigning field-symbol(<fs_prp>). <fs_prp>-name = '<Property Name>'. append '<Property Value>' to <fs_prp>-values. data(lo_factory) = cl_com_arrangement_factory=>create_instance( ). lo_factory->query_ca( exporting is_query = value #( cscn_id_range = lr_cscn ca_property = lt_prpn ) importing et_com_arrangement = data(lt_ca) ). if lt_ca is initial. exit. endif. * take the first one read table lt_ca into data(lo_ca) index 1. * get destination based on Communication Arrangement and the service ID try. data(lo_dest) = cl_http_destination_provider=>create_by_comm_arrangement( comm_scenario = '<Scenario ID>' service_id = '<Outbound Service ID>' comm_system_id = lo_ca->get_comm_system_id( ) ). catch cx_http_dest_provider_error into data(lx_http_dest_provider_error). out->write( lx_http_dest_provider_error->get_text( ) ). exit. endtry. Defining Specific Properties for Communication Scenarios For some use cases, such as logical receiver determination based on arbitrary parameters, a communication scenario may require additional parameters that are not part of the standard fields of a communication scenario. You can define additional properties in a communication scenario that can be maintained by the administrator in the Communication Arrangements app. These properties also support secure storage of data, such as passwords or API keys. Prerequisite A data element that describes your property is required. This is custom documentation. For more information, please visit SAP Help Portal. 52 1/9/25, 11:50 AM The following definitions are derived from the data element: Field Description Property Name Unique name of the property for internal use. Default Value Defines a default value that is used in the communication arrangement. Data Element Data element on which the property is based on. The data element provides the label for the communication arrangement UI and the value help. Is Multiple Defines that the property can store multiple values. Is Secure Defines that the property is stored in the secure story. Is Hidden Defines that the property is not shown on the UI in the communication arrangement app. Value Help Defines that the property provides a value help in the communication arrangement app. To use this function, the data element must provide a value help. Consuming an OData Service In the ABAP environment, you can consume services via the OData protocol. Context OData is an HTTP-based protocol to exchange data between systems. OData enables you to perform create, read, update, and delete (CRUD) operations in a RESTful manner. This is why the OData protocol is mainly used in the context of the ABAP RESTful Application Programming Model. OData services are either exposed as UI services that can be consumed in an SAP Fiori Elements app or as public interface in a Web API. For more information, see ABAP RESTful Application Programming Model and OData Service Consumption. Procedure 1. You need a service metadata file in .edmx format that describes the service that you want to consume. You can get this for example from the SAP Business Accelerator Hub or another service provider. 2. Use the .edmx file to create a Service Consumption Model (SRVC) and activate it. 3. Create an outbound service of type HTTP Service. 4. Create a communication scenario. 5. Add the outbound service to the communication scenario. 6. Publish the communication scenario, so that the administrator can use it in the Communication Management apps. Result The administrator can use the communication scenario you have published to create a communication arrangement. For more information, see Communication Management. You can use the generated code snippet of the SRVC in an ABAP class, pass the This is custom documentation. For more information, please visit SAP Help Portal. 53 1/9/25, 11:50 AM name of the communication scenario and if required, the name of the communication system and the outbound service to the CREATE_BY_COMM_ARRANGEMENT method, and perform the service call. Note Additional passing of the communication system and the outbound service to the CREATE_BY_COMM_ARRANGEMENT method can be required, if there are multiple communication arrangements based on the same communication scenario. Provides Code Snippet and Required Artifacts Service Consumption Model Outbound Service Communication Scenario Communication Arrangement Service Call in ABAP Class EDMX File of the OData Service Communication System Developer Tasks in ADT Administrator Tasks in SAP Fiori Launchpad Example The following code is generated by the SRVC for the create operation of the OData service Business User. Expand the following code sample to view the source code of the OData service call. Sample Code DATA: ls_business_data TYPE demo_business_user_srvc=>tys_users_2, lo_http_client TYPE REF TO if_web_http_client, lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_request TYPE REF TO /iwbep/if_cp_request_create, lo_response TYPE REF TO /iwbep/if_cp_response_create. TRY. " Create http client DATA(lo_destination) = cl_http_destination_provider=>create_by_comm_arrangement( comm_scenario = '<Comm Scenario>' * comm_system_id = '<Comm System Id>' * service_id = '<Service Id>' ). *lo_http_client = cl_web_http_client_manager=>create_by_http_destination( lo_destination ). lo_client_proxy = /iwbep/cl_cp_factory_remote=>create_v4_remote_proxy( EXPORTING is_proxy_model_key = VALUE #( repository_id = 'DEFAULT' proxy_model_id = 'DEMO_BUSINESS_USER_SRVC' proxy_model_version = '0001' ) io_http_client = lo_http_client iv_relative_service_root = '<service_root>' ). ASSERT lo_http_client IS BOUND. * Prepare business data ls_business_data = VALUE #( id = '11112222333344445555666677778888' first_name = 'FirstName' last_name = 'LastName' phone = 'Phone' email = 'Email' address = 'Address' ). This is custom documentation. For more information, please visit SAP Help Portal. 54 1/9/25, 11:50 AM " Navigate to the resource and create a request for the create operation lo_request = lo_client_proxy->create_resource_for_entity_set( 'USERS' )->create_request_for_crea " Set the business data for the created entity lo_request->set_business_data( ls_business_data ). " Execute the request lo_response = lo_request->execute( ). " Get the after image *lo_response->get_business_data( IMPORTING es_business_data = ls_business_data ). CATCH /iwbep/cx_cp_remote INTO DATA(lx_remote). " Handle remote Exception " It contains details about the problems of your http(s) connection CATCH /iwbep/cx_gateway INTO DATA(lx_gateway). " Handle Exception CATCH cx_web_http_client_error INTO DATA(lx_web_http_client_error). " Handle Exception RAISE SHORTDUMP lx_web_http_client_error. ENDTRY. Related Information Consuming an OData Service OData Client Proxy Overview Get an overview of some of the most common OData Client Proxy tasks. OData Client Proxy tasks include: Client Proxy Instance Types Create remote and local Client Proxy instances in OData Version 2 or Version 4. Batch and Change Set Request Instance Batch requests group multiple individual requests into a single HTTP request payload. Deep Create Data Description Node In OData Version 4, deep create requests create an entity that includes related entities. Expand Node Instance An expand node instance causes related entities to be included inline in the response. Filter Node Instance A filter node instance filters and returns only the results that match the specified expressions. Resource Instance A resource instance represents a resource that is shared between applications and identified using URLs and defined in the data model. Request Instance A request instance describes the action you want to take on a resource. Response Instance A response instance includes information that the request returns. Handling Exceptions Handling exceptions when running Client Proxy-related coding. This is custom documentation. For more information, please visit SAP Help Portal. 55 1/9/25, 11:50 AM Client Proxy Instance Types Create remote and local Client Proxy instances in OData Version 2 or Version 4. Client Proxy Versions Client Proxy Version 2 and Version 4 Depending on the OData service you want to consume (Version 2 or Version 4 service), you'll create a Version 2 or Version 4 Client Proxy instance. The underlying OData protocols differ between Version 2 and Version 4. You can't provide a version-agnostic Client Proxy. Consumption Types The decision of using a local or remote Client Proxy instance depends on the current use case. Remote Client Proxy A remote Client Proxy is used to consume an OData service offered on a remote server. If you want to create a remote Client Proxy instance, the following is required: A configured HTTP client instance The relative service root pointing to the service document Service consumption model If you want to create an HTTP client instance, see Consuming an HTTP Service. Relative Service Root: The relative service root (combined with the HTTP destination) should point to the service document for the OData service you want to consume. The service document is the top-level representation of an OData service. It lists the entity sets, singletons, and service functions. It is available at http(s)://host/service/ base URL. You can access the resources in the service document using a URL that is the concatenation of the base URL and the resource URL. Example You want to consume the OData Version 4 service TEA_BUSI in version 2, which is part of the /IWBEP/TEA OData service group and belongs to the service repository DEFAULT. If the absolute URL to fetch the corresponding service document is http://xyzia1b.rot.sap.corp:1234/sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0002/, the relative service URL is /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0002/. The remote Client Proxy needs a model object, which is the runtime representation of a model (compared to the model defined by a model provider class (MPC) for an OData service). The Service Consumption Model is needed since we don't have (for example) statically generated OData service specific proxies. Instead, we have one generic Client Proxy. To handle everything needed to process a client request, the framework needs this information: Name and definition of the EDM artifacts The mapping from EDM to ABAP names (most importantly for properties) ABAP data types ABAP conversion exits This is custom documentation. For more information, please visit SAP Help Portal. 56 1/9/25, 11:50 AM A Service Consumption Model defines the characteristics, properties, or parameters (such as, the number or the age of employees). For detailed examples on how to create a service consumption model, see Service Consumption Model. The OData Client Proxy supports SAP Passport to trace and monitor requests between different systems. To send SAP Passport via the header sap-passport, you need to take one of the following actions: Define the destination type 'H' (ABAP-ABAP communication) if you instantiated the HTTP client object with CL_HTTP_CLIENT=>CREATE_BY_DESTINATION. Set the attribute lo_http_client->PROPERTYTYPE_SEND_SAP_PASSPORT = lo_http_client->CO_ENABLED. Local Client Proxy Use the local Client Proxy when a locally-deployed OData service is consumed. The local Client Proxy delegates a request to the backend component of the corresponding Version 2 or Version 4 runtime without an HTTP overhead. The use case for this scenario is to create Unit Tests, for example, when you want to build an integration test for your service data provider. Note Since the local Client Proxy is designed for writing tests of your data provider, it skips several layers inside the SAP Gateway Framework and directly calls the data provider class. This has following effects: Certain tests that are usually executed during OData request processing are skipped. For both Version 2 and Version 4, the business data received from the (local consumption) response is not re-converted for outbound processing. When using the Version 4 local client proxy, the business data you enter is not converted for inbound processing. The data provider receives the data exactly how you entered in the request. For creating a local Client Proxy instance, the service key is required. The service key includes the service repository id (for example, DEFAULT), the service id (the ODATA service internal name), and the service id version (for example, 0003). You don't need an HTTP client instance or a Service Consumption model. Creating an Instance You can create an instance of the Client Proxy using class cl_web_odata_client_factory, which provides these static methods: create_v2_local_proxy create_v2_remote_proxy create_v4_local_proxy create_v4_remote_proxy Note All returned instances are from type /iwbep/if_cp_client_proxy and offer the same methods. Certain methods are only used by a specific Client Proxy (for example, a remote OData Version 4 proxy) and can raise an exception if the wrong Client Proxy instance is called. This is custom documentation. For more information, please visit SAP Help Portal. 57 1/9/25, 11:50 AM Functionality The Client Proxy instance is the starting point for the OData service consumption with ABAP. The Client Proxy instance provides a corresponding Resource Instance (for example, an action import or an entity set). The Client Proxy instance provides methods for creating $batch and delta link requests (with certain delta link-centered utility methods). Examples For examples on how to create and use Client Proxy instances, see Client Proxy Examples. Related Information OData Request as Batch Including Changesets OData Request: Delta Link Query Option Batch and Change Set Request Instance Batch requests group multiple individual requests into a single HTTP request payload. OData Version 4 Batch Requests These individual requests can be included in a batch request: Metadata Data Data Modification Action Invocation Function Invocation Batch requests are submitted as a single HTTP POST request to the batch endpoint of a service at the $batch URL that is related to the service root. Individual requests in a batch request are evaluated according to the same semantics used with an individual request. In the Multipart format, you can group data modification requests or action invocation requests as part of an atomic change set. Operations outside the change set are executed sequentially. Operations in the change set are executed in any order. Note In batch requests, operation is an individual request in the batch request payload. A change set request is a part of this type of batch request. Creating a Batch Request Instance A batch request instance is created on the Client Proxy instance. It adds individual requests, executes the batch request, and checks the execution. The batch request instance creates a change set request instance. This is custom documentation. For more information, please visit SAP Help Portal. 58 1/9/25, 11:50 AM After you create a batch request instance, you can define the operations and add them to the batch request or to a change set. The change set request instance is created directly on the batch request instance. Related Information OData Client Proxy Overview OData Request as Batch Including Changesets Deep Create Data Description Node In OData Version 4, deep create requests create an entity that includes related entities. Overview A deep create is also known as deep insert). In this example, you want to create a new customer and the first sales order from this customer. You can first create the new customer and then the first sales order or you can use a deep create to create both at the same time: POST http://host/service/Customers This request contains the following payload: { "CustomerName" : "Julie Armstrong", "CustomerId" : 001, "Customer_2_Salesorders" : { "Object" : "Thriller", "Category" : "Books" } } You must use a Data Description node to describe the properties and inline navigations for deep business data for a request. The Data Description node is necessary to describe the structure of your deep business data to the Client Proxy. A Data Description node is always created on the corresponding create Request Instance. Note In OData Version 2, complex properties can't have associations, such as navigation properties. You can only define navigation properties in entity types. In OData Version 4, you can define navigation properties for a complex property. Creating an Instance A Data Description node instance is always created in the corresponding Request Instance. Functionality The Data Description node instances describe the payload for a deep create request to the Client Proxy. This is required to execute any deep create request. This is custom documentation. For more information, please visit SAP Help Portal. 59 1/9/25, 11:50 AM Example For examples of how to create and work with Data Description nodes, see OData Request: Deep Create. Expand Node Instance An expand node instance causes related entities to be included inline in the response. Overview When reading an entity with a GET request, related entities can also be requested using the $expand statement on a navigation property. In this example, you want to read the data about customer “Posey” and the open sales orders for this customer (with navigation property “Customer_2_Salesorders”). Here is an example of this OData request: Sample Code GET http://host/service/Customers(‘Posey’)?$expand=Customer_2_Salesorders Creating an Instance In the Client Proxy Framework, an expand expression is described by an expand node instance. It is created directly in the corresponding read request instance. Note In OData Version 2, complex properties can't have associations, such as navigation properties. You can only define navigation properties in entity types. In OData Version 4, you can define navigation properties for a complex property. An expand node instance is always created in the corresponding Request Instance. These request types can be used to create an expand node: read entity read entity list read entity zero-to-one Functionality The expand node instances add an expand expression into the underlying read request. You can also set the selected properties for each expand node. If not all properties of the expanded entity are returned, compare to GET http://host/service/Customers(‘Posey’)?$expand=Customer_2_Salesorders($select=Date,Status). Example For examples of how to create and work with expand nodes, see $expand Option. Filter Node Instance This is custom documentation. For more information, please visit SAP Help Portal. 60 1/9/25, 11:50 AM A filter node instance filters and returns only the results that match the specified expressions. Overview The $filter system query option restricts the set of items returned. It allows you to filter are source collection addressed by a request URI. The expression specified with $filter is evaluated for each resource in the collection. Only items where the expression is true are included in the response. In this example, you want to read a collection of sales orders and get only the unpaid orders. Here's an example of the OData request: Sample Code GET http://host/service/SalesOrders?$filter=Payment eq ‘open’ A filter expression is described by a filter node instance that a filter factory instance creates and can be set into the Client Proxy instance. Note The filter nodes are not OData protocol-specific (Version 2 or Version 4). Creating an Instance A filter node instance is always created by a filter factory instance. You can create a filter factory instance in a read list request instance. Functionality The main functionality of filter node instances is to create a filter expression for a read request on an entity list, which can be integrated into the corresponding request to only show a subset of the complete result. Example For examples of how to create and work with filter nodes, see $filter Option. Related Information OData Request: Read Entity Resource Instance A resource instance represents a resource that is shared between applications and identified using URLs and defined in the data model. Overview In OData Version 4, a resource is anything in the model that can be addressed (an entity set, entity, property, or operation). This is custom documentation. For more information, please visit SAP Help Portal. 61 1/9/25, 11:50 AM The OData instance creates REST-based data services that allows resources (identified using URLs and defined in an Entity Data Model), to be published and edited by web clients with simple HTTP messages. For a standard OData request, you must provide a corresponding URL that points to a resource (for example, entity_list(id=‘1‘) points to a specific resource: Sample Code /sap/opu/odata/sap/srv/entity_list(id=‘1‘)/entity Note The resources aren't OData protocol-specific (Version 2 or Version 4). In the Client Proxy, you don't need to provide the URI. But you need to create an instance of the resource you want to access (for example, a function or a single entity). Creating an Instance Depending on the resource type, the instance creation can vary. Some resources (for example, an entity set or action resources) are created at the Client Proxy Instance Types. Other resources are created on another resource instance (for example, an entity resource, created on the entity set resource). You can't call an entity resource without providing the corresponding entity set resource. Examples GET/sap/opu/odata/sap/srv/teams The target resource is an entity set (teams). The resource instance is created at the Client Proxy instance. For more information, see OData Request: Read Entity List. GET /sap/opu/odata/sap/srv/order(customer=’Jane Doe’) The target resource is a single entity (Jane Doe), so the resource instance is created at the parent resource instance (entity set order). Resource Types These resource types are available to users: /IWBEP/IF_CP_RESOURCE_ACTION: Describes the resource of an action that is created on the Client Proxy instance (for action imports) or on an entity (set) resource (for bound actions). /IWBEP/IF_CP_RESOURCE_ENTITY: Describes the resource of a single entity that is created on an entity (set) resource. /IWBEP/IF_CP_RESOURCE_ENTITY01: Describes the resource of an optional entity (the target entity of a zero-to-one navigation) that is created on an entity resource. /IWBEP/IF_CP_RESOURCE_FUNCTION: Describes the resource of a function that is created on the Client Proxy instance (for function imports) or on an entity (set) resource (for bound functions). /IWBEP/IF_CP_RESOURCE_LIST: Describes the resource of an entity set that is created on the Client Proxy instance or an entity resource. Functionality Resource instances are used to create requests (for example, an update request on an entity) or other resource instances (for example, an action resource from an entity list resource). The options that a resource instance offers depends on the different resource types. This is custom documentation. For more information, please visit SAP Help Portal. 62 1/9/25, 11:50 AM Example For examples of how to create and work with resources see Actions and Functions and OData Request: Using Navigation. Related Information OData Request: Read Entity List Request Instance A request instance describes the action you want to take on a resource. Overview You can read or modify an OData Resource Instance by sending an OData request on this resource. This example reads all entities for the entity set “teams”: Sample Code GET /sap/opu/odata/sap/srv/teams This example deletes the “order” entity of customer "Julie Armstrong": Sample Code DELETE /sap/opu/odata/sap/srv/order(customer=’Julie Armstrong’) A request instance describes the actual operation you want to perform on the corresponding resource. It includes all relevant information (for example. the request body data for updating an entity) for the operation execution. Note The requests are not OData protocol-specific (Version 2 or. Version 4). Creating an Instance Request instances are created on the resource instance the request will act on (for example, a request to update an entity is created on the corresponding entity resource. The only exceptions are $batch/changeset requests (these can contain requests acting on different resources), and delta link requests, that are both created on the Proxy Instance Request Examples /IWBEP/IF_CP_REQUEST_ACTION: A request to execute an ACTION (using action import or as a bound action. /IWBEP/IF_CP_REQUEST_BATCH: A $batch request. It can be used to add other requests (for example. a DELETE request) and execute them together as part of a $batch. /IWBEP/IF_CP_REQUEST_CHANGESET: A request for a changeset. This request can be used to add other requests (for example, CREATE request) into one changeset. The changeset request can only be executed as part of a $batch request (for example, it must be added to a $batch request before executing the request). /IWBEP/IF_CP_REQUEST_CREATE: A request to CREATE an entity. This is custom documentation. For more information, please visit SAP Help Portal. 63 1/9/25, 11:50 AM /IWBEP/IF_CP_REQUEST_DELETE : A request to DELETE an entity /IWBEP/IF_CP_REQUEST_FUNCTION: A request to execute a FUNCTION (using function import or as bound function. /IWBEP/IF_CP_REQUEST_READ: A request to READ an entity. /IWBEP/IF_CP_REQUEST_READ_01: A request to READ an entity WITH a zero-to-one navigation. /IWBEP/IF_CP_REQUEST_READ_DLTA: A request to READ the delta of a list of entities /IWBEP/IF_CP_REQUEST_READ_LIST: A request to READ a list of entities. /IWBEP/IF_CP_REQUEST_UPDATE: A request to UPDATE an entity. /IWBEP/IF_CP_REQUEST_UPDATE_L : A request to UPDATE a list of entities. Functionality Request instances create an OData request and a corresponding Response Instance. The options a request instance offers depend on the different request types. Example For examples of how to create and work with requests, see the OData Requests. Response Instance A response instance includes information that the request returns. Overview Most OData requests return a corresponding response body after the request is successful (an exception can be a successful DELETE request with HTTP return code 204 with no content). The Client Proxy response instance contains information returned by the request. You can use it to read all relevant response information (for example. the entity business data). Note The responses aren't OData protocol-specific (Version 2 or Version 4). Creating an Instance A response instance is always created by the corresponding request instance when a request is created. Response Types These response types are available: /IWBEP/IF_CP_RESPONSE_ACTION: ACTION request response. /IWBEP/IF_CP_RESPONSE_CREATE: CREATE request response. /IWBEP/IF_CP_RESPONSE_DELETE: DELETE entity request response. /IWBEP/IF_CP_RESPONSE_FUNCTION: FUNCTION request response. This is custom documentation. For more information, please visit SAP Help Portal. 64 1/9/25, 11:50 AM /IWBEP/IF_CP_RESPONSE_READ: READ entity request response. /IWBEP/IF_CP_RESPONSE_READ_01: READ entity (with zero-to-one navigation) request response. /IWBEP/IF_CP_RESPONSE_READ_LST: READ entity list request response. /IWBEP/IF_CP_RESPONSE_UPDATE: UPDATE entity request response. /IWBEP/IF_CP_RESPONSE_UPDATE_L: UPDATE entity list request response. Functionality Response instances return the response business data of a successful OData request execution. The options a response instance offers depend on the different response types. Example For examples of how to create and work with responses, see the OData Requests. Handling Exceptions Handling exceptions when running Client Proxy-related coding. Overview There are two types of exceptions in the Client Proxy context: /IWBEP/CX_GATEWAY: for client issues (for example, if the provided entity set name is unknown or if you try to fetch business data from a response instance that doesn't have any response data). /IWBEP/CX_CP_REMOTE: for server issues in remote scenarios (for example, the returned HTTP status code is not 2xx (internal server errors [500] or missing authorizations [401]). The remote server exception contains this information: HTTP Status Code HTTP Status Reason Message OData Error Details HTTP Client Error Details HTTP error body Content type HTTP method Handling Exceptions Overview For the remote client proxy: always catch both exceptions (/IWBEP/CX_GATEWAY and /IWBEP/CX_CP_REMOTE) separately and implement corresponding exception handling. This is custom documentation. For more information, please visit SAP Help Portal. 65 1/9/25, 11:50 AM For the local client proxy: catch /IWBEP/CX_GATEWAY. The remote exception isn't raised in the local scenario. Example Use remote client proxy to consume an OData request. Include proper exception handling in your coding: DATA: lv_http_status_code TYPE /iwbep/cx_gateway=>ty_http_status_code, lv_http_status_message TYPE string, lv_error_body TYPE string, ls_odata_error TYPE /iwbep/cx_cp_remote=>ty_s_odata_error, lv_client_error_text TYPE string, lx_remote TYPE REF TO /iwbep/cx_cp_remote, lx_gateway TYPE REF TO /iwbep/cx_gateway. TRY. “Your Client Proxy Coding catch /iwbep/cx_cp_remote into lx_remote. lv_http_status_code = lx_remote->http_status_code. lv_http_status_message = lx_remote->http_status_message. lv_error_body = lx_remote->http_error_body. ls_odata_error = lx_remote->s_odata_error. “Further error handling catch /iwbep/cx_gateway into lx_gateway. lv_client_error_text = lx_gateway->get_text( ). “Further error handling ... Steps Step 1: Catch the remote exception and fetch the information on the exception (in addition to your own exception handling): DATA: lv_http_status_code TYPE /iwbep/cx_gateway=>ty_http_status_code, lv_http_status_message TYPE string, lv_error_body TYPE string, ls_odata_error TYPE /iwbep/cx_cp_remote=>ty_s_odata_error, lx_remote TYPE REF TO /iwbep/cx_cp_remote. CATCH /iwbep/cx_cp_remote INTO lx_remote. lv_http_status_code = lx_remote->http_status_code. lv_http_status_message = lx_remote->http_status_message. lv_error_body = lx_remote->http_error_body. ls_odata_error = lx_remote->s_odata_error. “Further error handling ... Step 2: Catch the gateway exception and fetch the corresponding error text (in addition to your own exception handling): DATA: lx_gateway TYPE REF TO /iwbep/cx_gateway, lv_client_error_text TYPE string. CATCH /iwbep/cx_gateway INTO lx_gateway. lv_client_error_text = lx_gateway->get_text( ). “Further error handling ... OData Client Proxy User Guide This is custom documentation. For more information, please visit SAP Help Portal. 66 1/9/25, 11:50 AM See examples and steps for using the Data Client Proxy. The OData Client Proxy User Guide includes: Client Proxy Examples OData Proxy examples for OData Version 2 and Version 4 for local and remote client proxies. Actions and Functions Create an OData request to run an operation (an action or function) in the Client Proxy instance. Related Information OData Request Terms Client Proxy Examples OData Proxy examples for OData Version 2 and Version 4 for local and remote client proxies. Overview For information about the Client Proxy Instance, see Client Proxy Instance Types. OData Version 2: Local Client Proxy Overview You can create a Client Proxy instance with class IWBEP/CL_CP_CLIENT_PROXY_FACTORY. It offers the static method CREATE_V2_LOCAL_PROXY to create a local V2 Client Proxy instance. The service key parameters (service_id and service_version) are required for the V2 OData service you want to consume. You can also specify if you want to write a workload trace (you can later check in transaction STAD. Note A workload trace is not written by default. Example Create a Client Proxy instance to consume the OData V2 service “ODATA_V2_TEST_SERVICE” in version number 1: Sample Code DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy. lo_client_proxy = cl_web_odata_client_factory=>create_v2_local_proxy( VALUE #( service_ OData Version 2: Remote Client Proxy Overview You can create a Client Proxy instance using class CL_WEB_ODATA_CLIENT_FACTORYT. It offers the static method CREATE_V2_REMOTE_PROXY to create a remote V2 Client Proxy instance. The relative service root parameter (service_definition_name) and a configured HTTP web client instance are required. This is custom documentation. For more information, please visit SAP Help Portal. 67 1/9/25, 11:50 AM For more information about how to create a configured HTTP web client instance, see: Consuming an HTTP Service HTTP Communication via Communication Arrangements The service definition is automatically generated when you create a service consumption model. The concatenated HTTP destination and the relative service root must point to the service document of the OData service. Depending on your HTTP web client instance configuration, the way your relative service root looks can vary. In our example, we assume that your HTTP destination doesn't have a path prefix (for example, doesn't point to a specific OData service). The relative service root follows the general pattern /sap/opu/odata/<service_id>. Example Create a Client Proxy instance to consume the OData Version 2 service with the service definition ODATA_V2_SERVICE_DEFINITION and the service id ODATA_V2_SERVICE. Sample Code DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_web_http_client TYPE REF TO if_web_http_client. lo_client_proxy = cl_web_odata_client_factory=>create_v2_remote_proxy( iv_service_definition_name = 'ODATA_V2_SERVICE_DEFINITION' io_http_client = lo_web_http_client iv_do_fetch_csrf_token = abap_true iv_relative_service_root = '/sap/opu/odata/ODATA_V2_SERVICE' ). Note In this example, the Client Proxy automatically fetches a cross-site request forgery (CSRF) token. It does a HEAD request to fetch a CSRF token. This token is automatically reused for all requests executed with this Client Proxy instance. If you want to change this behavior, set iv_do_fetch_csrf_token to abap_false. OData Version 4: Local Client Proxy Overview Create a Client Proxy instance using class CL_WEB_ODATA_CLIENT_FACTORY. It offers the static method CREATE_V4_LOCAL_PROXY to create a local Version 4 Client Proxy instance. The service key parameters (service_id, relative_service_root, which is “SRVD, and the service_version) are required for the Version 4 OData service you want to consume. Note The local Version 4 Client Proxy can't be used to consume SAP OData services. You can only use it to consume your own services. Example Create a Client Proxy instance to consume the OData Version 4 service ODATA_V4_TEST_SERVICE in version number 1: This is custom documentation. For more information, please visit SAP Help Portal. 68 1/9/25, 11:50 AM Sample Code DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy. lo_client_proxy = /cl_web_odata_client_factory=>create_v4_local_proxy( VALUE #( servic OData Version 4: Remote Client Proxy Overview You can create a Client Proxy instance using class CL_WEB_ODATA_CLIENT_FACTORY. It offers the static method CREATE_V4_REMOTE_PROXY to create a remote Version 4 Client Proxy instance. The relative service root parameters (relative_service_root) definition and a configured HTTP web client instance are required. The concatenated HTTP destination and the relative service root must point to the OData service document. Depending on your HTTP web client instance configuration, the way your the relative service root looks can vary. In our example, we assume that your HTTP destination does not contain a path prefix (i.e. does not point to a specific OData service); then, the relative service root follows the general pattern /sap/opu/odata4/<service group id>/<repository id>/<service id>/<service version> Example You want to create a Client Proxy instance to consume the OData Version 4 service with the service definition named ODATA_V4_SERVICE_DEFINITION and the service id ODATA_V4_SERVICE (version 1), stored in service group ODATA_GROUP and repository SRVD. Sample Code DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_web_http_client TYPE REF TO if_web_http_client. lo_client_proxy = cl_web_odata_client_factory=>create_v4_remote_proxy(iv_service_defini Note In this example, the Client Proxy automatically fetches a cross-site request forgery (CSRF) token. It does a HEAD request to fetch a CSRF token. This token is automatically reused for all requests executed with this Client Proxy instance. If you want to change this behavior, set iv_do_fetch_csrf_token to abap_false. Constraints The local Client Proxy (both Version 2 and Version 4) can't be used to consume SAP OData services. Related Information Service Consumption Model This is custom documentation. For more information, please visit SAP Help Portal. 69 1/9/25, 11:50 AM Actions and Functions Create an OData request to run an operation (an action or function) in the Client Proxy instance. OData Version 2 See [MS-ODATA]: Open Data Protocol (OData) . Function A Service Operation is represented by a Function Import and can return: Primitive type A single Entity-Type instance A single Complex-Type instance Collection of Complex-Type instances Collection of Primitive types The corresponding Function Import can have side effects and can be invoked by any pre-defined HTTP method. OData Version 4 See OData Version 4.01. Part 1: Protocol . Function Functions are operations exposed by an OData service that don't have side effects. Functions must return data and can include additional path segments. Functions are invoked using HTTP method GET. Action Actions are operation exposed by an OData service that can have side effects. Actions can return data but must not be composed with additional path segments. Actions are invoked using HTTP method POST. Operation Functions and Actions are operations that can return data. Operations are either bound to a resource (for example, an entity type), that makes them members of that instance type. Operations can also be unbound. Unbound operations are called as static operations (using “action imports” or “function imports”) since a static (unbound) operation can't be called directly. Example Requests Version 4 Function Import “GetEmployeeByManagerId” with non-binding parameter “ManagerId”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/GetEmployeeByManagerID(ManagerID='0001') V4 Bound Action This is custom documentation. For more information, please visit SAP Help Portal. 70 1/9/25, 11:50 AM “AcChangeTeamOfEmployee” with non-binding parameter “TeamId” POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/EMPLOYEES('2')/SAP__self.AcChangeTeamOfE Request body JSON: { "TeamID" : "TEAM_02" } Version 2 Function “SetEmployeeSalary” with non-binding parameter “Id” and “Amount” PUT /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/SetEmployeeSalary?Id='0001'&Amount=200 For examples and steps for Import and Bound operations, see: Import Operation Bound Operation Constraints If-Match header is only supported for remote consumption. For function imports, the If-Match header is only supported for OData Version 2 requests. Composable Functions are not supported. $expand with operations is not supported. $select is not supported for actions. Return-Prefer header is not supported for actions. System query options are not supported for Version 4 functions. If the return type of a Version 2 function is an entity type and this entity type is used by more than one entity set, the Version 2 request context only contains the (EDM) name of the first entity set with the underlying entity type. A precise mapping is currently not possible. For remote consumption, this can be handled in the proxy model by setting the correct entity set via method . /iwbep/if_v4_med_func_imp->set_entity_set_name Import Operation Overview The starting point for an operation import is the corresponding operation resource that is created directly on the Client Proxy instance. You can use the resource instance to create a request instance. You can use the response instance to retrieve the response business data of the successfully executed request. This is fetched from the request instance. Note This is custom documentation. For more information, please visit SAP Help Portal. 71 1/9/25, 11:50 AM In OData Version 2, all Operation requests must be created as Function Import requests. Example To invoke the Version 2 function ‘PromoteEmployee’ with the non-binding (for example, input) parameters “Id=’0001’” and “Level=2’: POST /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/PromoteEmployee?Id='0001'&Level=2 TYPES: BEGIN OF tys_parameter, id TYPE /iwbep/tea_employee_id, level TYPE i, END OF tys_parameter. DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_function_resource TYPE REF TO /iwbep/if_cp_resource_function, lo_function_request TYPE REF TO /iwbep/if_cp_request_function, lo_function_response TYPE REF TO /iwbep/if_cp_response_function, ls_parameter TYPE tys_parameter, ls_busi_data TYPE /iwbep/tea_employee. lo_function_resource = lo_client_proxy->create_resource_for_function( 'PROMOTE_EMPLOYEE'). ls_parameter = VALUE #( id = '0001' level = 2 ). lo_function_resource->set_parameter( ls_parameter ). lo_function_request = lo_function_resource->create_request( ). lo_function_request->set_if_match( ‘2407’ ). lo_function_response = lo_function_request->execute(/iwbep/if_cp_request_function=>gcs_http_metho CHECK lo_function_response->has_business_data( ) = abap_true. lo_function_response->get_business_data( IMPORTING ea_response_data = ls_busi_data ). Steps Step 1: Create the function resource “PROMOTE_EMPLOYEE” with the internal name of function “PromoteEmployee”: DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_function_resource TYPE REF TO /iwbep/if_cp_resource_function. lo_function_resource = lo_client_proxy->create_resource_for_function( 'PROMOTE_EMPLOYEE'). Step 2: Set the non-binding (for example. input) parameters on the function resource instance. You can do this on the function resource, using method “SET_PARAMETER”: TYPES: BEGIN OF tys_parameter, id TYPE /iwbep/tea_employee_id, level TYPE i, END OF tys_parameter. DATA: ls_parameter TYPE tys_parameter. ls_parameter = VALUE #(id = '0001' level = 2 ). lo_function_resource->set_parameter( ls_parameter ). This is custom documentation. For more information, please visit SAP Help Portal. 72 1/9/25, 11:50 AM Step 3: Create a function request in the function resource instance: DATA: lo_function_request TYPE REF TO /iwbep/if_cp_request_function. lo_function_request = lo_function_resource->create_request( ). Step 4: Select the corresponding HTTP method to invoke the function on the request object. In this example, it is POST. You must do this in method SET_HTTP_METHOD or directly in the EXECUTE method. You can use the given constants in GCS_HTTP_METHOD of interface /IWBEP/IF_CP_REQUEST_FUNCTION: DATA: lo_function_response TYPE REF TO /iwbep/if_cp_response_function. “Option one: Set http method on the request lo_function_request->set_http_method( /iwbep/if_cp_request_function=>gcs_http_method-post ). “Option two: Directly set the http method when executing the function lo_function_response = lo_function_request->execute( /iwbep/if_cp_request_function=>gcs_http_meth Note Setting the HTTP method is only allowed for OData Version 2 requests. In OData Version 4, functions must always be called with GET and actions with POST. You don't need to set the HTTP method if the function is called with GET. Step 5: Set the If-Match header to provide an ETag (if needed for this request). For example, if the corresponding request header is if-match: W/"2407", the required input for SET_IF_MATCH is ‘2407': lo_function_request->set_if_match( ‘2407’ ). Note Only Version 2 remote consumption supports the If-Match header. Step 6: Create the Function request: DATA: lo_function_response TYPE REF TO /iwbep/if_cp_response_function. lo_function_response = lo_function_request->execute( /iwbep/if_cp_request_function=>gcs_http_meth Step 7: Check if the response object contains business data. This is especially useful for nullable operations, where the operation might not return data (compare to HTTP return code 204 – No Content): CHECK lo_function_response->has_business_data( ) = abap_true. Step 8: Fetch the business data from the response object (if the corresponding function does return business data): DATA: ls_busi_data TYPE /iwbep/tea_employee. lo_function_response->get_business_data( IMPORTING ea_response_data = ls_busi_data ). Note When using the Version 4 local client proxy, the business data you enter is not converted for inbound processing. The data provider receives the data exactly how you entered it in the request. For both Version 2 and Version 4, the business data received from the (local consumption) response is also not re-converted for outbound processing. This is custom documentation. For more information, please visit SAP Help Portal. 73 1/9/25, 11:50 AM Using an OData Version 4 action import works the same way. Use method CREATE_RESOURCE_FOR_ACTION instead of CREATE_RESOURCE_FOR_FUNCTION. Constraints If-Match header is only supported for remote consumption. For function imports, the If-Match header is only supported for OData Version 2 requests. Composable Functions are not supported. $expand with operations is not supported. $select is not supported for actions. Return-Prefer header is not supported for actions. System query options are not supported for Version 4 functions. If the return type of a Version 2 function is an entity type and this entity type is used by more than one entity set, the Version 2 request context only contains the (EDM) name of the first entity set with the underlying entity type. A precise mapping is currently not possible. For remote consumption, this can be handled in the proxy model by setting the correct entity set via method . /iwbep/if_v4_med_func_imp->set_entity_set_name Related Information Actions and Functions Bound Operation Bound Operation Bound Operation Overview The starting point for invoking a bound operation is the corresponding operation resource. This resource is not created directly at the client proxy instance. It is created at the resource object the operation is bound to (for example, an entity resource or an entity list resource). You can use the resource instance to create a request instance. You can use the response instance to retrieve the response business data for the successfully executed request and can be fetched from the request instance. Note Bound Operations are only available for OData Version 4 requests. All Operation related OData Version 2 requests must be created as Function Import requests. Example Invoke the Version 4 bound action ‘IncreaseSalary’ with the non-binding (for example, input) parameters “NewSalary=5000” and “Currency=’EUR’”. The action is bound to one entity of the entity set “Employees”: POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees(‘0006’) /com.sap.gateway.defau This is custom documentation. For more information, please visit SAP Help Portal. 74 1/9/25, 11:50 AM WITH the request body { "NewSalary" : 5000, "Currency" : "EUR" } TYPES: BEGIN OF tys_parameter, new_salary TYPE i, currency TYPE c LENGTH 3, END OF tys_parameter, BEGIN OF tys_key, id TYPE /iwbep/v4_tea_employee_id, END OF tys_key. DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_action_request TYPE REF TO /iwbep/if_cp_request_action, lo_action_resource TYPE REF TO /iwbep/if_cp_resource_action, lo_action_response TYPE REF TO /iwbep/if_cp_response_action, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity, ls_parameter TYPE tys_parameter, ls_employee TYPE /iwbep/s_v4_tea_employee, ls_key TYPE tys_key. ls_key = VALUE #( id = ‘0006’ ). lo_entity_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES')->navigate_with lo_action_resource = lo_entity_resource->bind_action( 'INCREASE_SALARY' ). lo_action_request = lo_action_resource->create_request( ). ls_parameter = VALUE #( new_salary = 5000 currency = ‘eur’ ). lo_action_request->set_parameter( ls_parameter ). lo_action_request->set_if_match( '1234' ). lo_action_response = lo_action_request->execute( ). CHECK lo_action_response->has_business_data( ) = abap_true. lo_action_response->get_business_data( IMPORTING ea_business_data = ls_employee ). Steps Step 1: Create the entity resource with the employee Id ‘0006’ of the entity set ‘Employees’ (with internal name ‘EMPLOYEES’): TYPES: BEGIN OF tys_key, id TYPE /iwbep/v4_tea_employee_id, END OF tys_key. DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity, ls_key TYPE tys_key. ls_key = VALUE #( id = ‘0006’ ). lo_entity_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES')->navigate_with Step 2: Create the action resource instance on the instance the action is bound to (In this example, an entity of entity set ‘Employees’). ‘INCREASE_SALARY’ is the internal name of action ‘IncreaseSalary’: DATA: lo_action_resource TYPE REF TO /iwbep/if_cp_resource_action. This is custom documentation. For more information, please visit SAP Help Portal. 75 1/9/25, 11:50 AM lo_action_resource = lo_entity_resource->bind_action( 'INCREASE_SALARY' ). Step 3: Create an action request instance with the action resource: DATA: lo_action_request TYPE REF TO /iwbep/if_cp_request_action. lo_action_request = lo_action_resource->create_request( ). Step 4: Set the non-binding (for example, input) parameters of the bound action on the action request: TYPES: BEGIN OF tys_parameter, new_salary TYPE i, currency TYPE c LENGTH 3, END OF tys_parameter, DATA: ls_parameter TYPE tys_parameter. ls_parameter = VALUE #( new_salary = 5000 currency = ‘eur’ ). lo_action_request->set_parameter( ls_parameter ). Step 5: Set the If-Match header to provide an ETag (if needed for this request) on the action request. In this example, the corresponding request header is if-match: W/"2407", the required input for SET_IF_MATCH is ‘2407’: Lo_action_request->set_if_match( ‘2407’ ) Note Only remote consumption supports the If-Match header. Step 6: Create the action request and get the action response instance: DATA: lo_action_response TYPE REF TO /iwbep/if_cp_response_action. lo_action_response = lo_action_request->execute( ). Step 7: Check if the response object contains business data. This is especially useful for nullable operations, where the operation might not return data (compare to HTTP return code 204 – No Content): CHECK lo_action_response->has_business_data( ) = abap_true. Step 8: Fetch the business data from the response object (if the corresponding action does return business data): DATA: ls_employee TYPE /iwbep/s_v4_tea_employee. lo_action_response->get_business_data( IMPORTING ea_business_data = ls_employee Note When using the Version 4 local client proxy, the business data you enter isn't converted for inbound processing. The data provider receives the exact data you entered in the request. The business data received from the (local consumption) response is also not re-converted for outbound processing. This is custom documentation. For more information, please visit SAP Help Portal. 76 1/9/25, 11:50 AM Invoking an OData Version 4 bound function works the same way. Use method BIND_FUNCTION instead of BIND_ACTION. Constraints If-Match header is only supported for remote consumption. For function imports, the If-Match header is only supported for OData Version 2 requests. Composable Functions are not supported. $expand with operations is not supported. $select is not supported for actions. Return-Prefer header is not supported for actions. System query options are not supported for Version 4 functions. If the return type of a Version 2 function is an entity type and this entity type is used by more than one entity set, the Version 2 request context only contains the (EDM) name of the first entity set with the underlying entity type. A precise mapping is currently not possible. For remote consumption, this can be handled in the proxy model by setting the correct entity set via method . /iwbep/if_v4_med_func_imp->set_entity_set_name Related Information Actions and Functions Import Operation OData Requests Learn how to use OData Requests. OData is a standardized protocol built over existing HTTP and REST protocols supporting CRUD (Create, Read, Update, Delete) operations for creating and consuming data APIs. There are various types of requests (including Create, Update, Read, and more) and system query options you can use for your particular use case. OData Request Terms An overview of some OData Request terminology. OData Request as Batch Including Changesets Create an $batch request, including changesets in the Client Proxy instance. OData Request: Create Entity Create an entity in the Client Proxy instance with insert entity request. OData Request: Update Entity Create an OData request to update an entity in the Client Proxy instance. OData Request: Update Entity List Create an OData request to update an entity list in the Client Proxy instance. OData Request: Read Entity To create an OData request to read an entity in the Client Proxy instance. OData Request: Read Optional Entity Create an OData request to read an optional entity in the Client Proxy instance. This is custom documentation. For more information, please visit SAP Help Portal. 77 1/9/25, 11:50 AM OData Request: Read Entity List Create an OData request to read an entity list (entity collection) in the Client Proxy instance. OData Request: Delete Entity Create an OData request to delete an entity in the Client Proxy instance. OData Request: Custom Query Option Create an OData request using a custom query option that isn't one of the OData-defined system query options in the Client Proxy instance. OData Request: Deep Create Create an OData request to execute a “deep create” (deep insert) in the Client Proxy instance. OData Request: Delta Link Query Option Create an OData request with $delta token query option in the Client Proxy instance. OData Request: Using Navigation Create an OData request using a navigation in the Client Proxy instance. OData Request: Including a Nextlink Create an OData request to read an entity list (entity collection) with a next link in the Client Proxy instance. OData Request System Query Options Learn how to use OData system query options. System query options include: Related Information Consuming an OData Service OData Request Terms An overview of some OData Request terminology. Here's a list of some common terms you'll see when creating OData requests. Term Definition Request OData Protocol enables clients to make requests and retrieve responses from the OData service. Entity An entity is an instance of the EntityType element (for example, Customer or Employee) that is a structured record with a key that uniquely identifies it. Entity Key Each entity has a key that uniquely identifies it (for example, CustomerId or EmployeeId). The key is defined by a subset of the entity type properties. Entity An entity type is a collection or category that a particular entity belongs to. Type Entity Set An entity set is a group of all entities (for example, the EntitySet Customers is a set of Customer instances) for a particular entity type at any point in time. Property An entity type has one or more properties that define the entity type's structure. Each property has a name and one or more values. OData Request as Batch Including Changesets Create an $batch request, including changesets in the Client Proxy instance. This is custom documentation. For more information, please visit SAP Help Portal. 78 1/9/25, 11:50 AM OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . A batch request is a single standard HTTP request that includes multiple application requests. Within that main HTTP request, each of the parts contains a nested HTTP request. $batch request is useful to group multiple requests and sends a batch to the data service in a single HTTP request. This section explains how a Batch Request works using ChangeSet syntax to logically group requests into a single value in a batch. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . Batch requests group multiple individual requests into a single HTTP request payload. An individual request in a batch request is one of the following: Metadata request Data request Data modification request Action invocation request Function invocation request Batch requests are sent as a single HTTP POST request to the batch endpoint of a service in the URL $batch that is relative to the service root. Individual requests in a batch request are evaluated according to the same semantics that are used when the request isn't part of a batch request. In the Multipart format, data modification or action invocation requests can be grouped as part of an atomic change set. Operations outside the change set are executed sequentially. Operations within the change set are executed in any order. Example Requests Version 4 Get all entities of entity set “EMPLOYEES” with Id = ‘1’ and execute the Action Import “ChangeTeamBudgetByID”: POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/$batch With request body --batch Content-Type: application/http Content-Transfer-Encoding: binary GET EMPLOYEES?$filter=ID%20eq%20%271%27 HTTP/1.1 --batch Content-Type: multipart/mixed;boundary=change_set_1 --change_set_1 This is custom documentation. For more information, please visit SAP Help Portal. 79 1/9/25, 11:50 AM Content-Type: application/http Content-Transfer-Encoding: binary Content-ID: 1 POST ChangeTeamBudgetByID HTTP/1.1 Content-Type: application/json { "TeamID" : "TEAM_01", "Budget" : 700.00 } --change_set_1---batch-- Version 2 Update two entities of entity set ‘Conversions’ POST /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/$batch With request body --batch Content-Type: multipart/mixed; boundary=changeset --changeset Content-Type: application/http Content-Transfer-Encoding: binary PUT Conversions(Id='0001') HTTP/1.1 Content-Type: application/json { "Id" : "1", "price_1" : "-180.59", "currency_1" : "EUR", "price_2" : "1.706", "currency_2" : "KWD", "amount_1" : "1.1235", "unit_1" : "D", "amount_2" : "1.123", "unit_2" : "CMS", "oSQL_Where_Cl" : "", "Is_Boolean" : true } --changeset---batch Content-Type: multipart/mixed; boundary=changeset --changeset Content-Type: application/http Content-Transfer-Encoding: binary PUT Conversions(Id='0001') HTTP/1.1 Content-Type: application/json { "Id" : "1", "price_1" : "-000.00", "currency_1" : "EUR", "price_2" : "1.706", "currency_2" : "KWD", "amount_1" : "1.1235", "unit_1" : "D", "amount_2" : "1.123", "unit_2" : "CMS", "oSQL_Where_Cl" : "", "Is_Boolean" : true This is custom documentation. For more information, please visit SAP Help Portal. 80 1/9/25, 11:50 AM } --changeset---batch-- Batch with Changesets Request Overview Note As the coding is independent of the OData version, we're presenting a general example on how to create a BATCH request on an entity. The starting point for a $batch request is the Client Proxy instance. It's possible to create a $batch request that you can use to create a changeset request. Example Get all entities of entity set “Employees” and create a new entity in entity set “Teams”: POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/$batch With request body --batch Content-Type: application/http Content-Transfer-Encoding: binary GET Employees HTTP/1.1 --batch Content-Type: multipart/mixed;boundary=change_set_1 --change_set_1 Content-Type: application/http Content-Transfer-Encoding: binary Content-ID: 1 POST Teams HTTP/1.1 Content-Type: application/json { "Id" : "TEAM_04", "Name" : "Test Team" } --change_set_1---batch-- DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_read_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_response TYPE REF TO /iwbep/if_cp_response_read_lst, lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_create_response TYPE REF TO /iwbep/if_cp_response_create, lo_batch_request TYPE REF TO /iwbep/if_cp_request_batch, lo_changeset_request TYPE REF TO /iwbep/if_cp_request_changeset, lt_employee TYPE STANDARD TABLE OF /iwbep/s_v4_tea_employee,ls_team TYPE /iwbep/s_v4_tea_team. This is custom documentation. For more information, please visit SAP Help Portal. 81 1/9/25, 11:50 AM lo_batch_request = lo_client_proxy->create_request_for_batch( ). lo_changeset_request = lo_batch_request->create_request_for_changeset( ). lo_changeset_request->add_request( lo_create_request ). lo_batch_request->add_request( lo_read_request ). lo_batch_request->add_request( lo_changeset_request ). lo_batch_request->execute( ). lo_batch_request->check_execution( ). lo_changeset_request->check_excecution( ). lo_read_request->check_execution( ). lo_create_request->check_execution( ). lo_read_response = lo_read_request->get_response( ). lo_read_response->get_business_data( IMPORTING et_business_data = lt_employee ). lo_create_response = lo_create_request->get_response( ). lo_create_response->get_business_data( IMPORTING es_business_data = ls_team ). Steps Step 1: Create the $batch request at the client proxy instance: DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_batch_request TYPE REF TO /iwbep/if_cp_request_batch. lo_batch_request = lo_client_proxy->create_request_for_batch( ). Step 2: Create the changeset request using the $batch request instance: DATA: lo_batch_request TYPE REF TO /iwbep/if_cp_request_batch, lo_changeset_request TYPE REF TO /iwbep/if_cp_request_changeset. lo_changeset_request = lo_batch_request->create_request_for_changeset( ). Step 3: Add the CREATE request to the changeset request: DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_changeset_request TYPE REF TO /iwbep/if_cp_request_changeset. lo_changeset_request->add_request( lo_create_request ). Step 4: Add both the READ and the change_set request into the $batch request. Run the $batch request: DATA: lo_read_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_batch_request TYPE REF TO /iwbep/if_cp_request_batch, lo_changeset_request TYPE REF TO /iwbep/if_cp_request_changeset. lo_batch_request->add_request( lo_read_request ). lo_batch_request->add_request( lo_changeset_request ). lo_batch_request->execute( ). Step 5: Check that the four requests ran successfully. (optional): DATA: lo_read_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_batch_request TYPE REF TO /iwbep/if_cp_request_batch, lo_changeset_request TYPE REF TO /iwbep/if_cp_request_changeset. This is custom documentation. For more information, please visit SAP Help Portal. 82 1/9/25, 11:50 AM lo_batch_request->check_execution( ). lo_changeset_request->check_excecution( ). lo_read_request->check_execution( ). lo_create_request->check_execution( ). Note If the exception didn't run successfully, CHECK_EXECUTION raises an exception. See Handling Exceptions for more information. Step 6: Get the READ response instance using the READ request instance and use it to fetch the corresponding business data: DATA: lo_read_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_response TYPE REF TO /iwbep/if_cp_response_read_lst, lt_employee TYPE STANDARD TABLE OF /iwbep/s_v4_tea_employee. lo_read_response = lo_read_request->get_response( ). lo_read_response->get_business_data( IMPORTING et_business_data = lt_employee ). Step 7: Get the CREATE response instance using the CREATE request instance and use it to fetch the corresponding business data: DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_create_response TYPE REF TO /iwbep/if_cp_response_create, ls_team TYPE /iwbep/s_v4_tea_team. lo_create_response = lo_create_request->get_response( ). lo_create_response->get_business_data( IMPORTING es_business_data = ls_team ). Note When you're using the Version 4 local client proxy, the business data you receive from the local consumption response isn't converted again for outbound processing. Related Information OData Request Terms Content ID Referencing Create an OData $batch request using Content ID Referencing in the Client Proxy instance. OData Specification OData Version 2 See [MS-ODATA]: Open Data Protocol (OData) . Multipurpose Internet Mail Extensions (MIME) is set of extensions that redefines and expands support for various types of content in email messages. Each MIME part that represents a request in a Change Set can include a Content-ID MIME header. See [RFC2045 Section 7: Content-ID Header Field] for more information. If a MIME part defines an InsertEntity request and includes a Content-ID header, the new entity is defined by the InsertEntity request. You can reference the new entity in future requests in the Change Set using the "$<Content-ID value of your previous request>" token in place of a Resource Path that identifies the new resource. The token acts as This is custom documentation. For more information, please visit SAP Help Portal. 83 1/9/25, 11:50 AM an alias for the Resource Path that identifies the new entity. Requests in different Change Sets can't reference one another, even if they are in the same Batch. OData Version 4 See OData Version 4.01. Part 1: Protocol . Each request in a batch request can have an assigned request identifier. The request identifier: is case-sensitive. Must be unique within the batch request. Must satisfy the rule request-id in [OData-ABNF] . The body part contents that represent a change set must be a multipart document with one body part for each operation in the change set. See [RFC2046] . Each body part that represents an operation in the change set must specify a Content-ID header with a unique request identifier in the batch request. Example Requests Version 4 Create new entity in entity set “TEAMS” and update it afterwards: POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/$batch With request body --batch content-type: multipart/mixed; boundary=changeset --changeset content-type: application/http content-id: 111 POST TEAMS HTTP/1.1 Content-Type: application/json { "Name":"Unit Test Task Force", "MANAGER_ID":"3", "BudgetCurrency":"JPY", "Budget":111100 } --changeset content-type: application/http content-id: 222 PATCH $111 HTTP/1.1 Content-Type: application/json { "MEMBER_COUNT":66 } --changeset---batch— Version 2 This is custom documentation. For more information, please visit SAP Help Portal. 84 1/9/25, 11:50 AM Create a new entity in entity set “Decimals”, then read it: POST /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/$batch With request body --batch Content-Type: multipart/mixed; boundary=changeset --changeset Content-Type: application/http Content-Transfer-Encoding: binary POST Decimals HTTP/1.1 Content-Type: application/json Accept: application/json Content-Id: 1 { "Id" : 1, "Name" : "Decimal 10", "Decimal1" : "1.1000000000" } --changeset----batch Content-Type: application/http Content-Transfer-Encoding: binary Accept: application/json GET $1?$format=json HTTP/1.1 --batch-- Create a $batch request using Content ID Referencing Overview Note As the coding is independent of the OData version, we're presenting a general example on how to create an OData $batch request using Content ID Referencing. The starting point for a using Content ID Referencing is a create request instance and create an entity resource with a Content ID reference. Example Create a new entity in entity set “Teams”, then update the member count: POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/$batch With request body --batch content-type: multipart/mixed; boundary=changeset --changeset This is custom documentation. For more information, please visit SAP Help Portal. 85 1/9/25, 11:50 AM content-type: application/http content-id: 111 POST Teams HTTP/1.1 Content-Type: application/json { "Name":"Unit Test Task Force" } --changeset content-type: application/http content-id: 222 PATCH $111 HTTP/1.1 Content-Type: application/json { "MemberCount":42 } --changeset---batch-- DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_batch_request TYPE REF TO /iwbep/if_cp_request_batch, lo_changeset_request TYPE REF TO /iwbep/if_cp_request_changeset, lo_update_request TYPE REF TO /iwbep/if_cp_request_update, lo_entity_resource_w_cir TYPE REF TO /iwbep/if_cp_resource_entity, ls_patch_data TYPE /iwbep/s_v4_tea_team. lo_entity_resource_w_cir = lo_create_request->create_res_w_content_id_ref( ). lo_update_request = lo_entity_resource_w_cir->create_request_for_update( /iwbep/if_ ls_patch_data = VALUE #( member_count = 42 ). lo_update_request->set_business_data( is_business_data = ls_patch_data It_provided_property = VALUE #( ( `MEMBER_COUNT` ) ) ). lo_changeset_request->add_request( lo_create_request ). lo_changeset_request->add_request( lo_update_request ). lo_batch_request->add_request( lo_changeset_request ). lo_batch_request->execute( ). Steps Step 1: Create the entity resource with a Content ID reference in the create request instance: DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_entity_resource_w_cir TYPE REF TO /iwbep/if_cp_resource_entity. lo_entity_resource_w_cir = lo_create_request->create_res_w_content_id_ref( ). Step 2: Create the update request instance at the entity resource instance: DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_update, lo_entity_resource_w_cir TYPE REF TO /iwbep/if_cp_resource_entity. lo_update_request = lo_entity_resource_w_cir->create_request_for_update( /iwbep/if Step 3: Define the corresponding update data and set it into the update request: DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_update, ls_patch_data TYPE /iwbep/s_v4_tea_team. ls_patch_data = value #( member_count = 42 ). This is custom documentation. For more information, please visit SAP Help Portal. 86 1/9/25, 11:50 AM lo_update_request->set_business_data( is_business_data = ls_patch_data It_provided_property = VALUE #( ( `MEMBER_COUNT` ) ) ). Step 4: Add the CREATE and UPDATE requests into the changeset request. Then add the changeset request into the $batch request: DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_batch_request TYPE REF TO /iwbep/if_cp_request_batch, lo_changeset_request TYPE REF TO /iwbep/if_cp_request_changeset, lo_update_request TYPE REF TO /iwbep/if_cp_request_update. lo_changeset_request->add_request( lo_create_request ). lo_changeset_request->add_request( lo_update_request ). lo_batch_request->add_request( lo_changeset_request ). Step 5: Run the $batch request: DATA: lo_batch_request TYPE REF TO /iwbep/if_cp_request_batch. lo_batch_request->execute( ). Constraints You can't use Content ID Referencing with navigation (for example, POST $1/NavigationProperty). Related Information Request Instance Resource Instance OData Request as Batch Including Changesets OData Request: Create Entity Create an entity in the Client Proxy instance with insert entity request. OData Specification OData Version 2 See [MS-ODATA]: Open Data Protocol (OData) . The InsertEntity request enables a new EntityType instance with new related entities you add to an EntitySet. OData Version 4 See OData Version 4.01. Part 1: Protocol . To create an entity in a collection, the client sends a POST request to the collection's URL. The POST body MUST contain a single valid entity representation. Example Requests Version 4 This is custom documentation. For more information, please visit SAP Help Portal. 87 1/9/25, 11:50 AM Create the employee with id ‘001’ in the entity set “Employees” POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees With request body { "Id" : "001", "Name" : "Julie Armstrong", "Street" : "Sample Street 5", "City" : "Walldorf" } Version 2 Create the employee with id ‘001’ in the entity set “Employees” POST /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees With request body { "Id" : "001", "Name" : "Julie Armstrong", "Street" : "Sample Street 5", "City" : "Walldorf" } Create Entity Request Overview Note As the coding is independent of the OData version, we're presenting a general example on how to create a CREATE request on an entity.. The starting point for a POST request on an entity list is the Client Proxy instance. It's possible to create an entity list resource, which can then be used to create a create request. Running the create request provides the create response instance, which can return the business data for the CREATE entity request. Example Create the employee with key id = '007 'of the Version 4 entity set ‘Employees': POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees With request body { "Id" : "001", This is custom documentation. For more information, please visit SAP Help Portal. 88 1/9/25, 11:50 AM "Name" : "Julie Armstrong", "Age" : 38, "Entrydate" : "1962-10-05", "ManagerId" : "001", "RoomId" : "1", "TeamId" : "TEAM_BRITANIA", "IsManager" : false, "Status" : "Available" } TYPES: BEGIN OF tys_entity_data, Id TYPE i, Name TYPE string, age TYPE i, entry_date TYPE dats, manager_id TYPE i, room_id TYPE i, team_id TYPE string, is_manager TYPE abap_bool, status TYPE string, END OF tys_entity_data. DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_create_response TYPE REF TO /iwbep/if_cp_response_create, lo_entity_list_resource TYPE REF TO /iwbep/if_cp_resource_list, ls_entity_data TYPE tys_entity_data, ls_employee TYPE /iwbep/s_v4_tea_employee. lo_entity_list_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOY lo_create_request = lo_entity_list_resource->create_request_for_create( ). ls_entity_data = VALUE #( id = 001 name = ‘Julie Armstrong’ age = 38 entry_date = ‘19621005’ manager_id = 001 room_id = 1 team_id = ‘team_britania’ is_manager = abap_false status = ‘Available’ ). lo_create_request->set_business_data( is_business_data = ls_entity_data It_provided_property = VALUE #( ( |ID| ) ( |NAME| ) ( |AGE| ) ( |ENTRY_DATE| ) ( |MANAGER_ID| ) ( |ROOM_ID| ) ( |TEAM_ID| ) ( |IS_MANAGER| ) ( |STATUS| ) ). lo_create_response = lo_create_request->execute( ). lo_create_response->get_business_data( IMPORTING es_business_data = ls_employee ). Steps Step 1: Create the entity list resource for entity set ‘Employees’ (with internal name ‘EMPLOYEES’'): DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_entity_list_resource TYPE REF TO /iwbep/if_cp_resource_list. lo_entity_list_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOY Step 2: Run the create request instance on the entity list resource. This is custom documentation. For more information, please visit SAP Help Portal. 89 1/9/25, 11:50 AM DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_create, lo_entity_list_resource TYPE REF TO /iwbep/if_cp_resource_list. lo_create_request = lo_entity_list_resource->create_request_for_create( ). Step 3: Set the business data for your create request. In our example, the create request properties are: Properties Internal Names Id ID Name NAME Age AGE EntryDate ENTRY_DATE ManagerId MANAGER_ID RoomId ROOM_ID TeamId TEAM_ID Status STATUS IsManager IS_MANAGER Define the values and set the business data into the create request: TYPES: BEGIN OF tys_entity_data, Id TYPE i, Name TYPE string, age TYPE i, entry_date TYPE dats, manager_id TYPE i, room_id TYPE i, team_id TYPE string, is_manager TYPE abap_bool, status TYPE string, END OF tys_entity_data. DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_create, ls_entity_data TYPE tys_entity_data, ls_employee TYPE /iwbep/s_v4_tea_employee. ls_entity_data = VALUE #( id = 001 name = ‘Julie Armstrong’ age = 38 entry_date = ‘19621005’ manager_id = 001 room_id = 1 team_id = ‘team_britania’ is_manager = abap_false status = ‘Available’ ). lo_create_request->set_business_data( is_business_data = ls_entity_data it_provided_property = VALUE #( ( |ID| ) ( |NAME| ) ( |AGE| ) ( |ENTRY_DATE| ) ( |MANAGER_ID| ) ( |ROOM_ID| ) ( |TEAM_ID| ) ( |IS_MANAGER| ) This is custom documentation. For more information, please visit SAP Help Portal. 90 1/9/25, 11:50 AM ( |STATUS| ) ). Note (Optional) Provide the properties when calling SET_BUSINESS_DATA. If you provide properties, only the properties you set are considered. If you don't provide properties, all properties are considered for the CREATE request. Note If the entity has value control or VCS properties, these properties should also be part of the provided data container (ls_entity_data in this example). If the value control/VCS properties are not provided, the behavior (for example: conversion exits) is undefined and can cause unexpected side-effects. Step 4: Run the create request and get the create response instance: DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_create, lo_update_response TYPE REF TO /iwbep/if_cp_response_create. lo_create_response = lo_create_request->execute( ). Step 5: You fetch the business data from the response object: DATA: lo_update_response TYPE REF TO /iwbep/if_cp_response_create,ls_employee TYPE /iwbep/s_v4_tea_employee. lo_create_response->get_business_data( IMPORTING es_business_data = ls_employee ) Note When you're using the Version 4 local client proxy, the business data you receive from the local consumption response isn't converted again for outbound processing. Related Information OData Request Terms OData Request: Update Entity Create an OData request to update an entity in the Client Proxy instance. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . An UpdateEntity Request is used by a client to update an existing AtomPub Entry Resource, as specified in RFC5023 , that maps to an EntityType instance in the abstract data model. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . This is custom documentation. For more information, please visit SAP Help Portal. 91 1/9/25, 11:50 AM To update an individual entity, the client makes a PATCH or PUT request to a URL that identifies the entity. Services can be restricted to only request updates addressing the edit URL of the entity. Example Requests Version 4 Update the employee with id ‘001’ of entity set “Employees PATCH /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees(‘001’) With request body { "Street" : "Sample Street 5" } Version 2 Update the employee with id ‘001’ of entity set “Employees”: PUT /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees(‘001’) With request body { "Id" : "001", "Name" : "Julie Armstrong", "Street" : "Sample Street 5", "City" : "Walldorf" } Update Entity Request Overview Note As the coding is independent of the OData version, we're presenting a general example on how to create a UPDATE request on an entity. The starting point for a PUT/PATCH entity request is the Client Proxy instance. You can create an entity resource based on an entity list resource, and use it to create an update request. Running the update request provides the update response, which can return the business data of the UPDATE entity request. Example Update the employee with key “id = ‘001'” of the Version 4 entity set ‘Employees': PATCH /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees(‘001’) With request body This is custom documentation. For more information, please visit SAP Help Portal. 92 1/9/25, 11:50 AM { "Age" : 38, "IsManager" : true, "Status" : "Available" } TYPES: BEGIN OF tys_patch_data, types: BEGIN OF tys_patch_data, age TYPE i, is_manager TYPE abap_bool, status TYPE string, END OF tys_patch_data. DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_update_request TYPE REF TO /iwbep/if_cp_request_update, lo_update_response TYPE REF TO /iwbep/if_cp_response_update, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity, ls_patch_data TYPE tys_patch_data, ls_employee TYPE /iwbep/s_v4_tea_employee. lo_entity_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES lo_update_request = lo_entity_resource->create_request_for_update( /iwbep/if_cp_r ls_patch_data = VALUE #( age = 38 is_manager = abap_true status = ‘Available’ ). lo_update_request->set_business_data( is_business_data = ls_patch_data it_provided_property = VALUE #( ( |AGE| ) ( |IS_MANAGER| ) ( |STATUS| ) ). lo_update_request->set_if_match( ‘1234’ ). lo_update_response = lo_update_request->execute( ). lo_update_response->get_business_data( IMPORTING es_business_data = ls_employee ) Steps Step 1: Create the entity resource for the employee with the following: key “Id=‘001” in the entity set ‘Employees’ (internal name ‘EMPLOYEES’) type “ty_s_employee_key” in the interface /iwbep/if_v4_tea_busi_types” DATA lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity. lo_entity_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES Step 2: Create the update request instance on the entity resource. You need to provide the correct semantic (either PATCH or PUT). PUT creates a full new resource representation. If some attributes are not provided, these attributes should be removed (set to null) or set to their default value. PATCH also updates a resource, but unlike PUT, it applies a delta rather than replacing the entire resource. The PATCH payload is a different content-type than the entity that it is modifying. Instead of being a full resource, it is a resource that describes modifications that be made to a resource. In our example, we use PATCH semantic. You can use the constants in structure gcs_update_semantic of interface /iwbep/if_cp_request_update as input: DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_update, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity. This is custom documentation. For more information, please visit SAP Help Portal. 93 1/9/25, 11:50 AM lo_update_request = lo_entity_resource->create_request_for_update( /iwbep/if_cp_r Step 3: Set the business (for example, update) data for your update request. In our example, we want to update three properties. We define the new values and set the business data into the update request: Properties Internal Names Age AGE Status STATUS IsManager IS_MANAGER TYPES: BEGIN OF tys_patch_data, age TYPE i, is_manager TYPE abap_bool, status TYPE string, END OF tys_patch_data. DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_update, ls_patch_data TYPE tys_patch_data. ls_patch_data = VALUE #( age = 38 is_manager = abap_true status = ‘Available’ ). lo_update_request->set_business_data( is_business_data = ls_patch_data it_provided_property = VALUE #( ( |AGE| ) ( |IS_MANAGER| ) ( |STATUS| ) ). Note Providing the properties is required when calling SET_BUSINESS_DATA for a PATCH request. Step 4: Set the If-Match header to provide a ETag (if needed for this request). For example, if the corresponding request header is if-match: W/"1234", the required input for SET_IF_MATCH is ‘1234’: DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_update. lo_update_request->set_if_match( ‘1234’ ). Step 5: Run the update request and get the update response instance: DATA: lo_update_request TYPE REF TO /iwbep/if_cp_request_update, lo_update_response TYPE REF TO /iwbep/if_cp_response_update. lo_update_response = lo_update_request->execute( ). Step 6: Fetch the business data from the response object: DATA: lo_update_response TYPE REF TO /iwbep/if_cp_response_update, ls_employee TYPE /iwbep/s_v4_tea_employee. lo_update_response->get_business_data( IMPORTING es_business_data = ls_employee ) This is custom documentation. For more information, please visit SAP Help Portal. 94 1/9/25, 11:50 AM Note When you're using the Version 4 local client proxy, the business data you receive from the local consumption response isn't converted again for outbound processing. Related Information OData Request Terms OData Request: Update Entity List Create an OData request to update an entity list in the Client Proxy instance. You want OData Specification OData Version 2 An update request for an entity list is not supported in OData Version 2. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . You can update entity collections by submitting a PATCH request to the collection's resource path. The body of the request: MUST be a delta payload. the resource path of the collection MUST NOT include type cast or filter segments. MUST NOT include any system query options that affect the shape of the result. Added/changed entities are applied as upserts. Deleted entities are applied as deletions. Example Requests Version 4 Update the complete entity set “Teams”: PATCH /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams With request body { "@context" : "#$delta", "value" : [ { "Id" : "NEW 1", "Name" : "Created", "MemberCount" : 2, "ManagerId" : "3", "BudgetCurrency" : "USD", This is custom documentation. For more information, please visit SAP Help Portal. 95 1/9/25, 11:50 AM "Budget" : 555.55 }, { "Id" : "TEAM_02", "Name" : "Update?" }, { "Id" : "New 3", "Name" : "Created" } ] } Updata Entity List Request Overview The starting point for a PATCH entity request is the Client Proxy instance. You can create an entity resource based on an update list request, and use it to create an update request. Running the update list provides the update list response, which can return the business data of the UPDATE entity list request. Example Update the entity set “Teams”: PATCH /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams With request body { "@context" : "#$delta", "value" : [ { "Id" : "New Team", "Name" : "Created", "BudgetCurrency" : "USD", "Budget" : 555 }, { "Id" : "TEAM_02", "Name" : "New Team Name" } ] } DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_update_list_request TYPE REF TO /iwbep/if_cp_request_update_l, lo_update_list_response TYPE REF TO /iwbep/if_cp_response_update_l, lo_list_resource TYPE REF TO /iwbep/if_cp_resource_list, lt_response_data TYPE STANDARD TABLE OF /iwbep/s_v4_tea_team, lt_request_data TYPE STANDARD TABLE OF /iwbep/s_v4_tea_team. lo_list_resource = lo_client_proxy->create_resource_for_entity_set( 'TEAMS’ ). lo_update_list_request = lo_list_resource->create_request_for_update( ). lt_request_data = value #( ( id =‘New team’ name =‘Created’ budget =555 budget_cur ( id = ‘TEAM_02’ name = ‘New Team Name’ ) ) . This is custom documentation. For more information, please visit SAP Help Portal. 96 1/9/25, 11:50 AM lo_update_list_request->set_business_data( it_business_data = lt_request_data ). lo_update_list_request->request_continue_on_error( ). lo_update_list_response = lo_update_list_request->execute( ). lo_update_list_response->get_business_data( IMPORTING et_business_data = lt_respon Steps Step 1: Create the entity list resource for entity set ‘Teams’ (with internal name ‘TEAMS’): DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_list_resource TYPE REF TO /iwbep/if_cp_resource_list. lo_list_resource = lo_client_proxy->create_resource_for_entity_set( 'TEAMS’ ). Step 2: Create the update list request instance on the entity list resource: DATA: lo_update_list_request TYPE REF TO /iwbep/if_cp_request_update_l, lo_list_resource TYPE REF TO /iwbep/if_cp_resource_list. lo_update_list_request = lo_list_resource->create_request_for_update( ). Step 3: Set the business data (for example, update) for your update list request. Define the corresponding business data and set it into the update list request: DATA: lo_update_list_request TYPE REF TO /iwbep/if_cp_request_update_l, lt_request_data TYPE STANDARD TABLE OF /iwbep/s_v4_tea_team. lt_request_data = VALUE #( ( id = ‘New team’ name = ‘Created’ budget = 555 budget_ ( id = ‘team_02’ name = ‘New Team Name’ ) ) . lo_update_list_request->set_business_data( it_business_data = lt_request_data ). Step 4: (Optional) Request that the request processing continues even when there is an error (if supported). If the server supports this setting, a failed operation for one entity doesn't cause the complete request to fail. The failed entity is marked with the instance annotation Core.DataModificationException: DATA: lo_update_list_request TYPE REF TO /iwbep/if_cp_request_update_l. lo_update_list_request->request_continue_on_error( ). Note This information is mapped into the request header prefer:odata.continue-on-error. This preference is optional. The consumed OData service does not have to follow this preference. Step 5: Run the update list request and get the update list response instance: DATA: lo_update_list_request TYPE REF TO /iwbep/if_cp_request_update_l, lo_update_list_response TYPE REF TO /iwbep/if_cp_response_update_l. lo_update_list_response = lo_update_list_request->execute( ). Step 6: Fetch the business data from the response list object: This is custom documentation. For more information, please visit SAP Help Portal. 97 1/9/25, 11:50 AM DATA: lo_update_list_response TYPE REF TO /iwbep/if_cp_response_update_l, lt_response_data TYPE STANDARD TABLE OF /iwbep/s_v4_tea_team. lo_update_list_response->get_business_data( IMPORTING et_business_data = lt_respon Constraints Updating an entity list is only supported for OData Version 4 This feature is not supported for local consumption Only PATCH is supported. PUT is not supported. IF-MATCH handling is not supported Query options are not supported Updating an entity list within a $batch is not supported Related Information OData Request Terms OData Request: Read Entity To create an OData request to read an entity in the Client Proxy instance. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . A client uses a RetrieveEntity request to retrieve an AtomPub Entry Resource. See RFC5023: Atom Publishing Protocol for more information on the Atom Publishing Protocol. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . OData services support requests for data using HTTP GET requests. The URL path includes the request target (for example, the collection of entities, entity, navigation property, structural property, or operation). Example Requests Version 4 Get the employee with id ‘001' from the “Employees” entity set. GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees(‘001’) Version 2 This is custom documentation. For more information, please visit SAP Help Portal. 98 1/9/25, 11:50 AM Get the employee with id ‘001’ from the “Employees” entity set. GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees(‘001’) OData Request: Read Entity Overview Note As the coding is independent of the OData version, we're presenting a general example on how to create a READ request on an entity. The starting point for a GET entity request is the Client Proxy instance. You can create an entity resource based on an entity list resource, which can use create an entity resource based on an entity list resource. Use the entity resource to create a read request. Running the read request provides a response, which can return the business data of the READ entity request. Example From the Version 4 entity set ‘Employees’, fetch the employee with key id ‘001’: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees(‘001’) DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_read_request TYPE REF TO /iwbep/if_cp_request_read, lo_read_response TYPE REF TO /iwbep/if_cp_response_read, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity, ls_employee TYPE /iwbep/s_v4_tea_employee. lo_entity_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES')->navigate_with lo_read_request = lo_entity_resource->create_request( ). lo_read_response = lo_read_request->execute( ). lo_read_response->get_business_data( IMPORTING es_business_data = ls_employee ). Steps To run an OData request to read an entity: Step 1: Create the entity resource for the employee with the key Id=‘001' from the entity set ‘Employees’ (with internal name ‘EMPLOYEES’). Use type ty_s_employee_key in interface /iwbep/if_v4_tea_busi_types that includes the key property id: DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity. lo_entity_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES')->navigate_with Step 2: Create the read request instance on the entity resource: DATA: lo_read_request TYPE REF TO /iwbep/if_cp_request_read, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity. lo_read_request = lo_entity_resource->create_request( ). This is custom documentation. For more information, please visit SAP Help Portal. 99 1/9/25, 11:50 AM Step 3: Execute the read request and get the read response instance: DATA: lo_read_request TYPE REF TO /iwbep/if_cp_request_read, lo_read_response TYPE REF TO /iwbep/if_cp_response_read. lo_read_response = lo_read_request->execute( ). Step 4: Fetch the business data from the response object: DATA: lo_read_response TYPE REF TO /iwbep/if_cp_response_read, ls_employee TYPE /iwbep/s_v4_tea_employee. lo_read_response->get_business_data( IMPORTING es_business_data = ls_employee ). Note When you're using the Version 4 local client proxy, the business data you receive from the local consumption response isn't converted again for outbound processing. Related Information OData Request Terms OData Request: Read Optional Entity Create an OData request to read an optional entity in the Client Proxy instance. An optional entity is accessed using navigation with cardinality (for example, the measure of the number of elements in a set) zeroto-one (for example, the accessed entity has either zero or one entry). OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . The client uses a RetrieveEntity Request to retrieve an AtomPub Entry Resource, as specified in RFC5023 , and potentially related entities that map to EntityType instances. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . OData services support requests for data with HTTP GET requests. The URL path specifies thespecifies the target of the request (for example, the collection of entities, entity, navigation property, structural property, or operation). Example Requests Version 4 Get the manager of the Employee with Id ‘0004’ via zero-to-one navigation property ‘Employee2Manager’: This is custom documentation. For more information, please visit SAP Help Portal. 100 1/9/25, 11:50 AM GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees('0004')/Employee2Manager Version 2 Get the technical info of the Team ‘TEAM_02’ via zero-to-one navigation property “Technical_Info” GET/sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Teams('TEAM_02')/Technical_Info Read Optional Entity Request Overview Note As the coding is independent of the OData version, we're presenting a general example on how to read a an optional entity . The starting point for a $read optional entity request is an optional entity in the Client Proxy instance. It's possible to create a $read request with a corresponding zero-to-one navigation. On the optional entity resource, it's possible to create an optional read request instance. Running the zero-to-one read request provides the zero-to-one read response, which can return the business data of the optional READ entity request. Example Get the manager of the Employee with Id ‘0004’ via zero-to-one navigation property ‘Employee2Manager’: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees('0004')/Employee2Manager Steps DATA: lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity01, lo_read_request TYPE REF TO /iwbep/if_cp_request_read_01, lo_read_response TYPE REF TO /iwbep/if_cp_response_read_01, lt_manager TYPE STANDARD TABLE OF /iwbep/s_v4_tea_manager. lo_read_request = lo_entity_resource->create_request_for_read( ). lo_read_response = lo_read_request->execute( ). lo_read_response->get_business_data( IMPORTING et_business_data = lt_manager ). Step 1: Create the read request instance using the entity resource instance: DATA: lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity01, lo_read_request TYPE REF TO /iwbep/if_cp_request_read_01. lo_read_request = lo_entity_resource->create_request_for_read( ). Note See OData Request: Using Navigation for more information about how to create an optional entity resource instance. Note This is custom documentation. For more information, please visit SAP Help Portal. 101 1/9/25, 11:50 AM Instead of a READ request, you can also to set up an UPDATE or DELETE request for the optional entity. Step 2: Execute the read request and fetch the corresponding read response instance: DATA: lo_read_request TYPE REF TO /iwbep/if_cp_request_read_01, lo_read_response TYPE REF TO /iwbep/if_cp_response_read_01. lo_read_response = lo_read_request->execute( ). Step 3: Retrieve the business data from the read response instance: DATA: lo_read_response TYPE REF TO /iwbep/if_cp_response_read_01, lt_manager TYPE STANDARD TABLE OF /iwbep/s_v4_tea_manager. lo_read_response->get_business_data( IMPORTING et_business_data = lt_manager ). Note The zero-to-one read request response is always a table that contains either zero or one entry. Related Information OData Request Terms OData Request: Using Navigation OData Request: Read Entity List Create an OData request to read an entity list (entity collection) in the Client Proxy instance. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . A RetrieveEntitySet Request is used by a client to update the entries in an AtomPub Collection, as specified in RFC5023 , that maps to an EntitySet in the abstract data model. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . OData services support data requests for using HTTP GET requests. The URL path specifies the target of the request (for example, the collection of entities, entity, navigation property, structural property, or operation). Example Requests Version 4 Get all entities of entity set “Employees” This is custom documentation. For more information, please visit SAP Help Portal. 102 1/9/25, 11:50 AM GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees Version 2 Get all entities of entity set “Employees” GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees Read Entity List Request Overview Note As the coding is independent of the OData version, we're presenting a general example on how to create a READ request on an entity list. The starting point for a GET entity request is the Client Proxy Examples. You can create a read list request based on an entity list resource. Running the read list request provides the read list response that can provide the business data of the READ entity list request. Example Fetch all entities of the Version 4 entity set ‘Employees': GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst, lo_entity_list_resource TYPE REF TO /iwbep/if_cp_resource_list, lt_employee TYPE STANDARD TABLE OF /iwbep/s_v4_tea_employee. lo_entity_list_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES' ). lo_read_list_request = lo_entity_list_resource->create_request_for_read( ). lo_read_list_response = lo_read_list_request->execute( ). lo_read_list_response->get_business_data( IMPORTING et_business_data = lt_employee ). Steps Step 1: Create the entity list resource for entity set ‘Employees’ (with internal name ‘EMPLOYEES’): DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_entity_list_resource TYPE REF TO /iwbep/if_cp_resource_list. lo_entity_list_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES' ). Step 2: Create the read list request instance on the entity resource: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_entity_list_resource TYPE REF TO /iwbep/if_cp_resource_list. This is custom documentation. For more information, please visit SAP Help Portal. 103 1/9/25, 11:50 AM lo_read_list_request = lo_entity_list_resource->create_request_for_read( ). Step 3: Run the read list request and get the read list response instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst. lo_read_list_response = lo_read_list_request->execute( ). Step 4: Fetch the business data from the response object: DATA: lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst, lt_employee TYPE STANDARD TABLE OF /iwbep/s_v4_tea_employee. lo_read_list_response->get_business_data( IMPORTING et_business_data = lt_employee ). Note When you're using the Version 4 local client proxy, the business data you receive from the local consumption response isn't converted again for outbound processing. Related Information OData Request Terms OData Request: Delete Entity Create an OData request to delete an entity in the Client Proxy instance. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . The DeleteEntity Request enables an EntityType instance to be deleted from a data service. The base rules and semantics of this request type are defined by AtomPub, as specified in RFC5023 section 9.4 -- Deleting Resources with DELETE. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . To delete an individual entity, the client makes a DELETE request to a URL that identifies the entity. When the delete is successfully completed, the response MUST be <response code and name> and contain an empty body. Example Requests Version 4 Delete the employee with id ‘007’ of entity set “Employees” This is custom documentation. For more information, please visit SAP Help Portal. 104 1/9/25, 11:50 AM DELETE /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees(‘007’) Version 2 Delete the employee with id ‘007’ of entity set “Employees” DELETE /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees(‘007’) Delete Entity Request Overview Note As the coding is independent of the OData version, we're presenting a general example on how to create a DELETE entity request. The starting point for a DELETE entity request is the Client Proxy instance. You can create an entity resource based on an entity list resource, which you can use to create a delete request. Example Delete the employee with key “id = ‘007’” of the Version 4 entity set ‘Employees’: DELETE /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees(‘007’) with IF-MATCH header DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_delete_request TYPE REF TO /iwbep/if_cp_request_delete, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity. lo_entity_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES')->navigate_with lo_delete_request = lo_entity_resource->create_request_for_delete( ). lo_delete_request->set_if_match( ‘mi6’ ). lo_delete_request->execute( ). lo_delete_request->check_execution( ). Steps Step 1: Create the entity resource for the employee with the key “Id=‘007’” of entity set ‘Employees’ (with internal name ‘EMPLOYEES’). Type “ty_s_employee_key” in interface "/iwbep/if_v4_tea_busi_types” is a structure containing the key property “id”: DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity. lo_entity_resource = lo_client_proxy->create_resource_for_entity_set( 'EMPLOYEES')->navigate_with Step 2: Create the delete request instance on the entity resource: DATA: lo_delete_request TYPE REF TO /iwbep/if_cp_request_delete, lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity. lo_delete_request = lo_entity_resource->create_request_for_delete( ). This is custom documentation. For more information, please visit SAP Help Portal. 105 1/9/25, 11:50 AM Step 3: Set the If-Match header to provide an ETag (if needed for this request). If the corresponding request header is, for example, if-match: W/"MI6", the required input for SET_IF_MATCH is ‘MI6’: DATA: lo_delete_request TYPE REF TO /iwbep/if_cp_request_delete. lo_delete_request->set_if_match( ‘mi6’ ). Step 4: Run the delete request: DATA: lo_delete_request TYPE REF TO /iwbep/if_cp_request_delete. lo_delete_request->execute( ). Note A successful delete request doesn't have response data, which means that the EXECUTE method doesn't return a delete response object. Step 5: Check if the execution was successful: DATA: lo_delete_request TYPE REF TO /iwbep/if_cp_request_delete. lo_delete_request->check_execution( ). Note Normally, any issues during the request execution raises an exception in method EXECUTE. This method call is optional. Related Information OData Request Terms OData Request: Custom Query Option Create an OData request using a custom query option that isn't one of the OData-defined system query options in the Client Proxy instance. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . Custom Query Options enable you to include data service-specific information in a data service URI query string. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . Services can support additional custom query options that are not defined in the OData specification. The custom query options: can't begin with the "$" or "@" character This is custom documentation. For more information, please visit SAP Help Portal. 106 1/9/25, 11:50 AM can't conflict with any OData-defined system query options defined in the OData version that the service supports Example Requests Version 4 Use custom query option “sap-statistics”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams?sap-statistics=true Version 2 Use custom query option “sap-statistics”: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Prices?sap-statistics=true Custom Query Option Request Overview Note As the coding is independent of the OData version, we're presenting a general example on how to use $count. The starting point for a custom query option request is an entity list read request. You can set a custom query option on the entity list read request. Example Use custom query option “sap-statistics” GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams?sap-statistics=true DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_http_client TYPE REF TO if_http_client, lv_sap_statistics_result TYPE string. lo_read_list_request->set_custom_query_options( VALUE #( ( name = ‘sap-statistics’ value = ‘true’ lo_read_list_request->execute( ). lv_sap_statistics_result = lo_http_client->response->get_header_field( name = ‘sap-statistics’ ). Steps Step 1: Set the custom query option directly at the request instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request->set_custom_query_options( VALUE #( ( name = ‘sap-statistics’ value = ‘true’ Step 2: Run the read request and fetch the sap statistics result from the HTTP client instance: This is custom documentation. For more information, please visit SAP Help Portal. 107 1/9/25, 11:50 AM DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_http_client TYPE REF TO if_http_client, lv_sap_statistics_result TYPE string. lo_read_list_request->execute( ). lv_sap_statistics_result = lo_http_client->response->get_header_field( name = ‘sap-statistics’ ). Note lo_http_client must be the same HTTP client instance as the one used for creating the Client Proxy. Constraints Regardless of the Client Proxy OData version, input MUST conform with the more stricter OData Version 4 specification. You can only use custom query options for remote consumption. Custom query options are not supported in local consumption scenarios. Related Information OData Request Terms Client Proxy Instance Types OData Request: Deep Create Create an OData request to execute a “deep create” (deep insert) in the Client Proxy instance. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . In the Deep Create request, you can insert a new EntityType instance (E1) into an EntitySet and insert new entities related to E1. This is described by a NavigationProperty on the EntityType associated with E1) in a single InsertEntity Request. For example, in a customer relationship management-focused data service, you can insert a new customer entity and new related order entities in a single InsertEntity Request. This type of an InsertEntity Request is also known as a "deep insert". OData Version 4 See also: OData Version 4.01. Part 1: Protocol . A "deep insert" request creates an entity that includes related entities using the appropriate inline representation Example Requests Version 4 Create a new team (entity set “TEAMS”) and a new manager (entity set “MANAGERS”) via navigation property “TEAM_2_MANAGER”: POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/TEAMS This is custom documentation. For more information, please visit SAP Help Portal. 108 1/9/25, 11:50 AM With request body { "Name" : "Business Suite", "MEMBER_COUNT" : 2, "MANAGER_ID" : "8", "BudgetCurrency" : "USD", "Budget" : 555.55, "TEAM_2_MANAGER" : { "ID" : "8", "TEAM_ID" : "" } } Version 2 Create the employee with id ‘1’ (entity set “EMPLOYEES”) and the corresponding team (entity set “TEAMS”) with navigation property “My_Team”: POST /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees With request body { "Location" : { "Country" : "Germany", "City" : { "PostalCode" : "69124", "CityName" : "Heidelberg", "VeryLongPropertyNameForOrderBy" : "" } }, "Id" : "1", "Name" : "Julie Armstrong", "Age" : " 52", "EntryDate" : "\/Date(915148800000)\/", "Manager_ID" : "1", "Room_ID" : "1", "Team_ID" : "TEAM_01", "My_Team" : { "Team_Identifier" : "TEAM_01", "Name" : "Business Suite" } } Deep Create Request Overview Note As the coding itself is independent of the OData version, we will just present one general example on how to create a execute a deep create request. As the coding is independent of the OData version, we're presenting a general example on how to create a deep create request on an entity. The main difference between a create and a deep create request in the Client Proxyinstance is that the deep create request requires a data description node. You create a data description node at the create request instance and it is used later when setting the deep business data. This is custom documentation. For more information, please visit SAP Help Portal. 109 1/9/25, 11:50 AM Note See OData Request: Create Entity for more information. Example Create a new team (entity set “Teams”) and a new manager (entity set “Managers”): POST /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Team With request body { "Id" : "TEAM_04", "MemberCount" : 2, "Team2Manager" : { "Id" : "0009" } } DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_create_response TYPE REF TO /iwbep/if_cp_response_create, lo_data_des_node_root TYPE REF TO /iwbep/if_cp_data_desc_node, lo_data_desc_node_child TYPE REF TO /iwbep/if_cp_data_desc_node, ls_deep_busi_data TYPE /iwbep/if_v4_tea_busi_types=>ty_s_team_and_manager, ls_response_data TYPE /iwbep/if_v4_tea_busi_types=>ty_s_team_and_manager. lo_data_desc_node_root = lo_create_request->create_data_description_node( ). lo_data_desc_node_root->set_properties( VALUE #( ( |ID| ) ( |MEMBER_COUNT| ) ) ). lo_data_desc_node_child = lo_data_desc_node_root->add_child( ‘team_2_manager’ ). lo_data_desc_node_child->set_properties( VALUE #( ( |ID| ) ) ). ls_deep_busi_data = VALUE #( id = ‘team_04’ member_count = 2 team_2_manager = VALUE #( id = ‘0009’ ) ). lo_create_request->set_deep_business_data( is_business_data = ls_deep_busi_data io_data_description_node = lo_data_desc_node_root ). lo_create_response = lo_create_request->execute( ). lo_create_response->get_business_data( IMPORTING es_business_data = ls_response_dat lo_create_response->get_business_data( IMPORTING es_business_data = ls_response_dat Steps Step 1: Creation of the data description node for the root entity (here: “Teams”) on the create request instance: DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_data_des_node_root TYPE REF TO /iwbep/if_cp_data_desc_node. lo_data_desc_node_root = lo_create_request->create_data_description_node( ). Note See OData Request: Create Entity for more information. This is custom documentation. For more information, please visit SAP Help Portal. 110 1/9/25, 11:50 AM Step 2: Set the properties for the root entity. In our example, the properties are “Id” (internal name “ID”) and “MemberCount” (internal name “MEMBER_COUNT”): DATA: lo_data_des_node_root TYPE REF TO /iwbep/if_cp_data_desc_node. lo_data_desc_node_root->set_properties( VALUE #( ( |ID| ) ( |MEMBER_COUNT| ) ) ). Step 3: Create the data description node for the child entity (in this example, “Managers”) on the root data description node. “TEAM_2_MANAGER” is the internal name of navigation property “Team2Manager”: DATA: lo_data_des_node_root TYPE REF TO /iwbep/if_cp_data_desc_node, lo_data_desc_node_child TYPE REF TO /iwbep/if_cp_data_desc_node. lo_data_desc_node_child = lo_data_desc_node_root->add_child( ‘team_2_manager’ ). Step 4: Set the properties for the child entity (in this example, “Managers”). Only property “Id” (with internal name “ID” ) is included: DATA: lo_data_desc_node_child TYPE REF TO /iwbep/if_cp_data_desc_node. lo_data_desc_node_child->set_properties( VALUE #( ( |ID| ) ) ). Step 5: Define the request data for the deep create and set the deep business data into the request instance (in the root data description node): DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_data_des_node_root TYPE REF TO /iwbep/if_cp_data_desc_node, ls_deep_busi_data TYPE /iwbep/if_v4_tea_busi_types=>ty_s_team_and_manager. ls_deep_busi_data = VALUE #( id = ‘team_04’ member_count = 2 team_2_manager = VALUE #( id = ‘0009’ ) ). lo_create_request->set_deep_business_data( is_business_data = ls_deep_busi_data io_data_description_node = lo_data_desc_node_root ). ENDCLASS. Note The property that references the child entity business data MUST be named using the internal name of the corresponding navigation property (in this example, the property is “TEAM_2_MANAGER”, which describes the business data for the child entity “Managers”). Note If the underlying entity has value control or VCS properties. The VCS properties should also be part of the provided data container (in this example, ls_deep_busi_data). If the properties aren't part of the data container, the behavior (for example conversion exits) is undefined and can cause nexpected errors. Step 6: Run the deep create request and fetch the response business data from the create response instance: DATA: lo_create_request TYPE REF TO /iwbep/if_cp_request_create, lo_create_response TYPE REF TO /iwbep/if_cp_response_create, ls_response_data TYPE /iwbep/if_v4_tea_busi_types=>ty_s_team_and_manager. This is custom documentation. For more information, please visit SAP Help Portal. 111 1/9/25, 11:50 AM lo_create_response = lo_create_request->execute( ). lo_create_response->get_business_data( IMPORTING es_business_data = ls_response_dat Note This part is identical to handling a typical create request in the Client Proxy instance. Related Information OData Request Terms OData Request: Delta Link Query Option Create an OData request with $delta token query option in the Client Proxy instance. OData Specification OData Version 4 See also: OData Version 4.01. Part 1: Protocol . Delta links are service-generated links the client uses to access newly created, updated, or deleted entities without a full read of the target resource with every request. Delta links are based on a defining query that tracks the changes of the set of results. For example, the request that generated the results containing the delta link. The delta link encodes the entity collection that tracks the changes. Also, it includes a starting point to begin track changes. Example Requests Version 4 GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_tech/0001/PagedDeltaEntities?$deltatoken=2017061200 Delta Link Query Request Overview The starting point for a delta link in the Client Proxy instance is either a Client Proxy instance or a read list request instance (depending on your use case). Example 1: Create a new delta link You ran a read list request in the Client Proxy instance and you want to save a delta link for this response, so you can track future changes to the current response: Step 1: Save the current response as delta link (in this example under the name ‘DELTA_LINK_NAME’): DATA: lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst. lo_read_list_response->save_delta_link ( ‘delta_link_name’ ). This is custom documentation. For more information, please visit SAP Help Portal. 112 1/9/25, 11:50 AM Example 2: Create a delta request from an existing delta link You have an existing delta link and want to use it to create a delta request: DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_delta_read_request TYPE REF TO /iwbep/if_cp_request_read_dlta, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst. CHECK lo_client_proxy->does_delta_link_exist( ‘delta_link_name’ ) = abap_true. CHECK lo_client_proxy->can_delta_request_be_created( ‘delta_link_name’ ) = abap_true. lo_delta_read_request = lo_client_proxy->create_request_for_delta( ‘delta_link_name’ ). lo_read_list_response = lo_delta_read_request->execute( ). Steps Step 1: Check that the delta link: does exist (in this example, ‘DELTA_LINK_NAME’). can be used to create a delta request. If the stored delta link was manually changed, the delta link can't be used). DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_delta_read_request TYPE REF TO /iwbep/if_cp_request_read_dlta, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst. CHECK lo_client_proxy->does_delta_link_exist( ‘delta_link_name’ ) = abap_true. CHECK lo_client_proxy->can_delta_request_be_created( ‘delta_link_name’ ) = abap_true. Note You can only find and use delta links that you created. Step 2: Use the stored delta link to create a delta link request instance: DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_delta_read_request TYPE REF TO /iwbep/if_cp_request_read_dlta. lo_delta_read_request = lo_client_proxy->create_request_for_delta( ‘delta_link_name’ ). Step 3: Run the delta link request and fetch the corresponding response instance: DATA: lo_delta_read_request TYPE REF TO /iwbep/if_cp_request_read_dlta, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst. lo_read_list_response = lo_delta_read_request->execute( ). Example 3: Insert an existing delta link into an existing request You have an existing request and want to use it in combination with an existing delta link: DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy, lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst. CHECK lo_client_proxy->does_delta_link_exist( ‘delta_link_name’ ) = abap_true. CHECK lo_client_proxy->can_delta_request_be_created( ‘delta_link_name’ ) = abap_false. This is custom documentation. For more information, please visit SAP Help Portal. 113 1/9/25, 11:50 AM lo_read_list_request->use_delta_link( ‘delta_link_name’ ). lo_read_list_response = lo_read_list_request->execute( ). Steps Step 1: Check that the delta link: does exist (in this example, ‘DELTA_LINK_NAME’). can be used to create a delta request. If it can be used to create a delta request, you use method CREATE_REQUEST_FOR_DELTA, in example 2. DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy. CHECK lo_client_proxy->does_delta_link_exist( ‘DELTA_LINK_NAME’ ) = abap_true. CHECK lo_client_proxy->can_delta_request_be_created( ‘DELTA_LINK_NAME’ ) = abap_false. Note You can only find and use delta links that you created. Step 2: Insert the delta link into the existing read list request: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request->use_delta_link( ‘delta_link_name’ ). Step 3: Get the read list response instance using the read list request DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst. lo_read_list_response = lo_read_list_request->execute( ). Related Information OData Request Terms OData Request: Read Entity List Client Proxy Instance Types OData Request: Using Navigation Create an OData request using a navigation in the Client Proxy instance. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . A unidirectional (one-way) relationship (for example, a Link) is when two entity types are related by association, but only one of the entity types defines a NavigationProperty that binds to the association. This is custom documentation. For more information, please visit SAP Help Portal. 114 1/9/25, 11:50 AM OData Version 4 See also: OData Version 4.01. Part 1: Protocol . Relationships from one entity to another are represented as navigation properties. Navigation properties are defined as part of an entity type, but can also appear on entity instances as undeclared dynamic navigation properties. Each relationship has a cardinality. Example Requests Version 4 Get all employees associated with Team ‘TEAM_01’ via navigation property ‘Team2Employees’: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams('TEAM_01')/Team2Employees Version 2 Get the team of the employee with Id ‘0005’ via navigation property “My_Team”: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees(Id='0005')/My_Team Using Navigation Request Overview Note As the coding is independent of the OData version, we're presenting a general example on how to use navigations. The starting point for a request using a navigation is an entity resource. On the entity resource, you can create a resource for the corresponding navigation target. Example 1 Navigate to an entity list with Navigation Property “Department2Teams”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Departments(Id='1',Sector='Consulting')/D Steps Step 1: Create the target resource on the entity resource using the internal name of the navigation property (“DEPARTMENT_2_TEAMS”): DATA: lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity, lo_target_list_resource TYPE REF TO /iwbep/if_cp_resource_list. lo_target_list_resource = lo_entity_resource->navigate_to_many( ‘department_2_teams’ ). Note You can use the target resource to create a READ request. This is custom documentation. For more information, please visit SAP Help Portal. 115 1/9/25, 11:50 AM Example 2 Navigate to a single entity using the Navigation Property “Team2Manager”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams('TEAM_01')/Team2Manager Steps Step 1: Create the target resource on the entity resource using the internal name of the navigation property (“TEAM_2_MANAGER”): DATA: lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity, lo_target_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity. lo_target_entity_resource = lo_entity_resource-> navigate_to_single( ‘team_2_manager’ ). Note You can use the target resource to create a READ request. Example 3 Navigate to an optional (for example. zero-to-one navigation) entity using the Navigation Property “Employee2Manager”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees('0004')/Employee2Manager Step-by-step Step 1: Create the target resource on the entity resource using the internal name of the navigation property (“EMPLOYEE_2_MANAGER”): DATA: lo_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity, lo_target_entity_resource TYPE REF TO /iwbep/if_cp_resource_entity01. lo_target_entity_resource = lo_entity_resource-> navigate_to_optional( ‘employee_2_manager’ ). Note You can use the target resource to create an optional READ request. Related Information OData Request: Read Entity OData Request: Including a Nextlink Create an OData request to read an entity list (entity collection) with a next link in the Client Proxy instance. OData Specification OData Version 4 This is custom documentation. For more information, please visit SAP Help Portal. 116 1/9/25, 11:50 AM See also: OData Version 4.01. Part 1: Protocol . In responses that include a partial set of the items identified by the request, the URL MUST include a link (a next link) that allows retrieving the next partial set of items.A next link representation is format-specific. The final partial set of items MUST NOT contain a next link. Nextlink Request Overview The starting point for a next link request is the Client Proxy instance, is read list response instance. Example You created a read list request in the Client Prox instance and want to manage potential next links: DATA: lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst, lt_employee TYPE STANDARD TABLE OF /iwbep/s_v4_tea_employee. lo_read_list_response->get_business_data( IMPORTING et_business_data = lt_employee ). WHILE lo_read_list_response->has_next( ). lo_read_response = lo_read_response->get_next( ). lo_read_list_response->get_business_data( IMPORTING et_business_data = lt_employee ). ENDWHILE. Steps Step 1: Fetch the first batch of entities from the read list response instance: DATA: lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst, lt_employee TYPE STANDARD TABLE OF /iwbep/s_v4_tea_employee. lo_read_list_response->get_business_data( IMPORTING et_business_data = lt_employee ). Step 2: Check that there are still next links using the HAS_NEXT method on the response instance). Then you can fetch the next batch of entities. Get the corresponding response instance by using the GET_NEXT method on the previous response instance. Then get the business data from this new instance: DATA: lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst, lt_employee TYPE STANDARD TABLE OF /iwbep/s_v4_tea_employee. WHILE lo_read_list_response->has_next( ). lo_read_response = lo_read_response->get_next( ). lo_read_list_response->get_business_data( IMPORTING et_business_data = lt_employee ). ENDWHILE. Constraints Next links are only supported for OData Version 4 requests. Next links are only supported for remote consumption. Related Information This is custom documentation. For more information, please visit SAP Help Portal. 117 1/9/25, 11:50 AM OData Request Terms OData Request: Read Entity List OData Request System Query Options Learn how to use OData system query options. System query options include: $expand Option Use the $expand system query option to represent associated EntityType instance or EntitySet inline. $filter Option Use the $filter system query option to restrict the returned set of items. $count Option Use the $count or $inlinecount system query option to indicate a certain number or total count of entities in the EntitySet. $orderby Option Use the $orderby system query option to determine what values are used to order the entities in the EntitySet. $select Option Use the $select system query option to return a subset for the returned properties of the URI without a $select query option. $skip and $top Options Use the $skip or $top system query options to identify a subset of the entities in an entity collection. $search Option Use the $search system query option to restrict results to include items you specify in the expression.. $expand Option Use the $expand system query option to represent associated EntityType instance or EntitySet inline. OData Specification OData Version 2 See [MS-ODATA]: Open Data Protocol (OData) . The $expand System Query Option indicates that entities associated with the EntityType instance or EntitySet (identified by the Resource Path section of the URI) must be represented inline. OData Version 4 See OData Version 4.01. Part 1: Protocol . The $expand system query option indicates the related entities and stream values that MUST be represented inline. The service MUST return the specified content and can choose to return additional information. The value of the $expand query option is a comma-separated list of navigation property names, stream property names, or $value that indicate the stream content of a media-entity. Example Requests This is custom documentation. For more information, please visit SAP Help Portal. 118 1/9/25, 11:50 AM Version 4 Get the team ‘TEAM_03’ and its manager with navigation property “Team2Manager”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams('TEAM_03')?$expand=Team2Manager Version 2 Get the manager with id ‘0004’ and the information about his team with navigation property “My_Team”: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Managers('0001')?$expand=My_Team $expand System Query Option Overview Note As the coding is independent of the OData version, we're presenting a general example on how to use the $expand option. The starting point for a request with the $expand option is an entity list read request. On the entity list read request, you can set the $expand option. Example Get all entities from the entity set “Teams”. For each term, fetch the corresponding manager using the navigation property “Team2Manager”. You want to retrieve only the Id of each manager: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams?$expand=Team2Manager($select=Id) Steps DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_expand_node_root TYPE REF TO /iwbep/if_cp_expand_node, lo_expand_node TYPE REF TO /iwbep/if_cp_expand_node. lo_expand_node_root = lo_read_list_request->create_expand_node( ). lo_expand_node = lo_expand_node_root->add_expand( ‘team_2_manager’ ). lo_expand_node->set_select_properties( VALUE #( ( CONV #( ‘id’ ) ) ) ). Note The SET_EXPAND method is obsolete. It's not necessary to explicitly set the expand node in the request. Step 1: Create the root expand node on the request instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_expand_node_root TYPE REF TO /iwbep/if_cp_expand_node. lo_expand_node_root = lo_read_list_request->create_expand_node( ). Step 2: Add the expand path by using the internal name of the navigation property (“TEAM_2_MANAGER”). This step creates a new expand node: This is custom documentation. For more information, please visit SAP Help Portal. 119 1/9/25, 11:50 AM DATA: lo_expand_node_root TYPE REF TO /iwbep/if_cp_expand_node, lo_expand_node TYPE REF TO /iwbep/if_cp_expand_node. lo_expand_node = lo_expand_node_root->add_expand( ‘team_2_manager’ ). Step 3: Set the selected properties (using internal names) on the select node. “ID” is the internal name of property “Id”: DATA: lo_expand_node TYPE REF TO /iwbep/if_cp_expand_node. lo_expand_node->set_select_properties( VALUE #( ( CONV #( ‘id’ ) ) ) ). Related Information OData Request Terms OData Request: Read Entity OData Request: Read Entity List $filter Option Use the $filter system query option to restrict the returned set of items. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . A data service URI with a $filter System Query Option identifies a subset of the entities in the EntitySet (identified by the Resource Path section of the URI) by only selecting the entities that meet the predicate expression the query option specifies. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . The $filter system query option restricts the set of items that are returned. Example Requests Version 4 Get the entities in entity set “Employees” that have the Id “0006” and the Postalcode “69190”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees?$filter=Location/City/Postalcod Version 2 Get the entities in entity set “Employees” with the Id “0006” and the PostalCode “69190”: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees?$filter=Location/City/PostalCode eq '69190 $filter System Query Option This is custom documentation. For more information, please visit SAP Help Portal. 120 1/9/25, 11:50 AM Overview Note As the coding is independent of the OData version, we're presenting a general example on how to use the $filter option. The starting point for a request with the $filter option is an entity list read request. Example Get all entities from the entity set “Buildings” with the BuildingID “ROT05” and Cityname is not “Walldorf”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Buildings?$filter=Location/City/Cityname Steps DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lt_range TYPE RANGE OF string, lo_filter_factory TYPE REF TO /iwbep/if_cp_filter_factory, lo_filter_node_1 TYPE REF TO /iwbep/if_cp_filter_node, lo_filter_node_2 TYPE REF TO /iwbep/if_cp_filter_node, lo_filter_node_final TYPE REF TO /iwbep/if_cp_filter_node. lo_filter_factory = lo_read_list_request->create_filter_factory( ). lt_range = VALUE #( ( option = ‘ne’ sign = ‘i’ low = ‘Walldorf’ ) ). lo_filter_node_1 = lo_filter_factory->create_by_range( iv_property_path = ‘location-city-cityname it_range = lt_range ). lt_range = VALUE #( ( option = ‘eq’ sign = ‘i’ low = ‘rot05’ ) ). lo_filter_node_2 = lo_filter_factory->create_by_range( iv_property_path = ‘building_id‘ it_range = lt_range ). lo_filter_node_final = lo_filter_node_1->and( lo_filter_node_2 ). lo_read_list_request->set_filter( lo_filter_node_final ). . Step 1: Create an instance of the filter factory at the read list request instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_filter_factory TYPE REF TO /iwbep/if_cp_filter_factory. lo_filter_factory = lo_read_list_request->create_filter_factory( ). Step 2: Create a filter node for the first filter expression (Location/City/Cityname ne 'Walldorf' ). We define the new values and set the business data to the request: Properties Internal Names Cityname CITYNAME Location LOCATION City CITY This is custom documentation. For more information, please visit SAP Help Portal. 121 1/9/25, 11:50 AM The filter expression must be expressed in a range: DATA: lt_range TYPE RANGE OF string, lo_filter_factory TYPE REF TO /iwbep/if_cp_filter_factory, lo_filter_node_1 TYPE REF TO /iwbep/if_cp_filter_node. lo_filter_factory = lo_read_list_request->create_filter_factory( ). lt_range = VALUE #( ( option = ‘ne’ sign = ‘i’ low = ‘Walldorf’ ) ). lo_filter_node_1 = lo_filter_factory->create_by_range( iv_property_path = ‘location-city-cityname it_range = lt_range Step 3: Create a filter node for the second filter expression BuildingID' ROT05'. The internal name of the primitive property “BuildingID” is “BUILDING_ID”. The filter expression must be expressed in a range: DATA: lt_range TYPE RANGE OF string, lo_filter_factory TYPE REF TO /iwbep/if_cp_filter_factory, lo_filter_node_2 TYPE REF TO /iwbep/if_cp_filter_node. lt_range = VALUE #( ( option = ‘eq’ sign = ‘i’ low = ‘rot05’ ) ). lo_filter_node_2 = lo_filter_factory->create_by_range( iv_property_path = ‘building_id‘ it_range = lt_range ). Step 4: Connect the two filter nodes with "and" in the final filter node: DATA: lo_filter_node_1 TYPE REF TO /iwbep/if_cp_filter_node, lo_filter_node_2 TYPE REF TO /iwbep/if_cp_filter_node, lo_filter_node_final TYPE REF TO /iwbep/if_cp_filter_node. lo_filter_node_final = lo_filter_node_1->and( lo_filter_node_2 ). Step 5: Set the final filter node in the request instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_filter_node_final TYPE REF TO /iwbep/if_cp_filter_node. lo_read_list_request->set_filter( lo_filter_node_final ). Negation To use negation call the NOT method on a filter node instance (for example, $filter=not(BuildingID is 'WDF03'). This step creates a new filter node (the negated filter node): DATA: lo_filter_node TYPE REF TO /iwbep/if_cp_filter_node, lo_filter_node_not TYPE REF TO /iwbep/if_cp_filter_node. lo_filter_node_not = lo_filter_node->not( ). Constraints $filter is only supported for primitive and complex properties. Only these range options are allowed: EQ, NE, GT, GE, LT, and LE. Only range signs “I” and “E” are allowed. Conversions with range option “CP” are not allowed. This is custom documentation. For more information, please visit SAP Help Portal. 122 1/9/25, 11:50 AM Only these functions can be used with CP: startswith, endswith, and substringof (for OData Version 2), contains (for OData Version 4). Not all filter expression are supported for local consumption. The currency code must be provided when the addressed property has a reference to a currency property. The unit of measurement must be provided when the addressed property has a reference to a unit property You can't set a $filter for an $expand. GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/TEAMS?$expand=TEAM_2_EMPLOYEES($fil Related Information OData Request Terms $count Option Use the $count or $inlinecount system query option to indicate a certain number or total count of entities in the EntitySet. OData Specification OData Version 2 See also: [MS-ODATA]: Open Data Protocol (OData) . $inlinecount: For a value of "allpages", the $inlinecount option indicates the response to the request must include the number of entities count in the EntitySet. The number of entities count is identified by the Resource Path section of the URI after all $filter System Query Options are applied. If the value is "none", this option indicates the response to the request MUST NOT include the count value. OData Version 4 See also: OData Version 4.01. Part 1: Protocol . The $count system query option with a value of true specifies that the total item count in a collection that matches the request is returned with the result. The $count system query option ignores $top, $skip, or $expand query options, and returns the total results count across all pages (including only the results that match any specified $filter and $search). The count returned inline might not equal the actual number of items returned. This happens due to latency between calculating the count and enumerating the last value or due to inexact calculations on the service. Example Requests Version 4 Get the number of entities in entity set “TEAMS”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/TEAMS/$count This is custom documentation. For more information, please visit SAP Help Portal. 123 1/9/25, 11:50 AM Get all Equipment entities associated with "Employee 1" and the total count of associated items: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/EMPLOYEES('1')/EMPLOYEE_2_EQUIPMENTS?$cou Version 2 Get the number of entities in entity set “EquipmentSet”: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/EquipmentSet/$count Get all Team Member entities associated with Team “TEAM_01” and the total count of associated members: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Teams('TEAM_01')/Team_Members?$inlinecount=allpages $count System Query Option Overview Note As the coding is independent of the OData version, we're presenting a general example on how to use the $count option. The starting point for a request with the $count option is an entity list read request. You can set the $count on the entity list read request. You can fetch the $count result from the entity list read response instance. Note The actual “flavor” of the $count that the Client Proxy sets depends on the request type: $count if no business data is requested. $count=true for OData Version 4 requests if business data is requested. $inlinecount=allpages for OData Version 2 if business data is requested. Example 1 Get the number of entities in entity set “TEAMS”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/TEAMS/$count Steps DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst, lv_count TYPE REF TO int8. lo_read_list_request-> request_no_business_data( ). lo_read_list_request->request_count( ). lo_read_list_response = lo_read_list_request->execute( ). lv_count = lo_read_list_response->get_count( ). This is custom documentation. For more information, please visit SAP Help Portal. 124 1/9/25, 11:50 AM Step 1: Set the request to NOT fetch the entity list (for example, request_no_business_data): DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request-> request_no_business_data( ). Step 2: Request the $count at the request instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request->request_count( ). Step 3: Run the request and fetch the count value from the read list response instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst, lv_count TYPE REF TO int8. lo_read_list_response = lo_read_list_request->execute( ). lv_count = lo_read_list_response->get_count( ). Example 2 Get all Equipment entities associated with "Employee 1" and the total count of associated items: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/EMPLOYEES('1')/EMPLOYEE_2_EQUIPMENTS?$cou Steps DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_read_list_response TYPE REF TO /iwbep/if_cp_response_read_lst, lv_count TYPE REF TO int8. lo_read_list_request->request_count( ). lo_read_list_response = lo_read_list_request->execute( ). lv_count = lo_read_list_response->get_count( ). Note The steps for this example are identical to the first example, except that you do NOT request to not return any business data (you skip step 1 in the first example). See example one for a the steps. Related Information OData Request Terms OData Request: Read Entity OData Request: Read Entity List $orderby Option Use the $orderby system query option to determine what values are used to order the entities in the EntitySet. This is custom documentation. For more information, please visit SAP Help Portal. 125 1/9/25, 11:50 AM OData Specification OData Version 2 See [MS-ODATA]: Open Data Protocol (OData) . A data service URI with the $orderby System Query Option specifies an expression for determining what values are used to order the entities in the EntitySet (identified by the Resource Path section of the URI). OData Version 4 See OData Version 4.01. Part 1: Protocol . The $orderby System Query option specifies the order that items are returned from the service. The value of the $orderby System Query option is a comma-separated list of expressions that use the primitive result values to sort the items. The expression can include the suffix asc for ascending or desc for descending that you separate from the property name by one or more spaces. Example Requests Version 4 Get all entities of entity set “Employees” and sort the response descending to property “Cityname” and ascending to property “Age”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees?$orderby=Location/City/Cityname Version 2 Get all entities of entity set “Employees” and sort the response ascending to property “Id” and descending to property “Name”: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Employees?$orderby=Id, Name asc $orderby System Query Option Overview Note As the coding is independent of the OData version, we're presenting a general example on how to use the $orderby option. The starting point for a request with the $orderby option is an entity list read request. You can set the $orderby on the entity list read request. Example Get all entities of entity set “Employees” and sort the response descending to property “Cityname” (in complex property “City”, which is part of complex property “Location”) and ascending to property “Age”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees?$orderby=Location/City/Cityname Steps This is custom documentation. For more information, please visit SAP Help Portal. 126 1/9/25, 11:50 AM Step 1: Set the $orderby values at the request instance: Properties Internal Names Age AGE Location LOCATION City CITY Cityname CITYNAME DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request-> set_orderby( value #(( property_path = ‘LOCATION-CITY-CITYNAME’ ( property_path = ‘AGE’ Related Information OData Request Terms OData Request: Read Entity OData Request: Read Entity List $select Option Use the $select system query option to return a subset for the returned properties of the URI without a $select query option. OData Specification OData Version 2 See [MS-ODATA]: Open Data Protocol (OData) . A data service URI with a $select System Query Option identifies the same set of entities as a URI without a $select query option. If you have a $select query option, the data service response returns a subset (identified by the $select query option) for the returned properties of the URI that didn't include a $select query option. OData Version 4 See OData Version 4.01. Part 1: Protocol . The $select system query option requests that the service return only the properties, dynamic properties, actions, and functions explicitly requested by the client. The service returns the specified content (if available) and any available expanded navigation or stream properties. It can also return additional information. Example Requests Version 4 Get the employee with Id ‘0002’ of entity set “Employees” and return only properties “Name” and “Age”: This is custom documentation. For more information, please visit SAP Help Portal. 127 1/9/25, 11:50 AM GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees('0002')?$select=Name,Age Version 2 Get all entities of entity set “Managers” and return only properties “Name” and “Age”: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Managers?$select=Name,Age $select System Query Option Overview Note As the coding is independent of the OData version, we're presenting a general example on how to use the $select option. The starting point for a request with $select is a read request on an entity list. You can set the selected properties on the entity list read request. Example Set the properties “Age”, “Name” and “Cityname” for the employee with Id ‘0002’ for the entity set “Employees”. “Cityname” is in the complex property “City”, which is of the complex property “Location”: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Employees('0002')?$select=Name,Age,Locati Steps Step 1: Set the properties you want to select at the read request instance: Properties Internal Names Age AGE Location LOCATION City CITY Cityname CITYNAME Name NAME DATA: lo_read_request TYPE REF TO /iwbep/if_cp_request_read. lo_read_request->set_select_properties( VALUE #( ( CONV #('AGE’) ) ( CONV #( ( CONV #('NAME Related Information OData Request Terms OData Request: Create Entity This is custom documentation. For more information, please visit SAP Help Portal. 128 1/9/25, 11:50 AM OData Request: Read Entity $skip and $top Options Use the $skip or $top system query options to identify a subset of the entities in an entity collection. OData Specification OData Version 2 See [MS-ODATA]: Open Data Protocol (OData) . A data service URI with: $skip System Query Option $top System Query Option identifies a subset of the entities in an entity collection (identified by the identifies a subset of the entities in an entity collection Resource Path section of the URI) (identified by the Resource Path section of the URI) the subset is defined by searching N entities in an collection and the subset is formed by selecting only the first N items of the selecting only the remaining entities (starting with entity N+1). set. N is a positive integer specified by this query option. N is a positive integer specified by this query option. OData Version 4 See OData Version 4.01. Part 1: Protocol . A data service URI with: $skip System Query Option $top System Query Option specifies a non-negative integer n that excludes the first n items specifies a non-negative integer n that limits the number of items of the queried collection. returned from a collection. the service returns items starting at position n+1. the service returns the number of available items up to but not greater than the specified value n. Example Requests Version 4 Skip the first entity in entity set “TEAMS” and get the following two ones: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams?$skip=1&$top=2 Version 2 Skip the first entity in entity set “Managers” and get the following two ones: GET /sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Managers?$skip=1&$top=2 This is custom documentation. For more information, please visit SAP Help Portal. 129 1/9/25, 11:50 AM $skip and $top Query Options Overview Note As the coding is independent of the OData version, we're presenting a general example on how to use the $count option. The starting point for a request with $skip or $top option is an entity list read request. You can set both the $skip and the $top on the entity list read request. Example Skip the first entity in entity set “TEAMS” and get these entities: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0003/Teams?$skip=1&$top=2 Steps DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request->set_skip( 1 ). lo_read_list_request->set_top( 2 ). Step 1: Set the $skip value at the request instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request->set_skip( 1 ). Step 2: Set the $top value at the request instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request->set_top( 2 ). Related Information OData Request Terms $search Option Use the $search system query option to restrict results to include items you specify in the expression.. OData Specification OData Version 4 See [MS-ODATA]: Open Data Protocol (OData) . The $search system query option restricts the result to include only the items that match the specified search expression. The type of match depends on your implementation. This is custom documentation. For more information, please visit SAP Help Portal. 130 1/9/25, 11:50 AM Example Requests Version 4 Get all entities of Entity Set “Employees” with “Peter” or “Wilson” in their name: GET/sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/EMPLOYEES?$search=Peter OR Wilson $search System Query Option Overview The starting point for a request with the $search option is an entity list read request. You can set the $search expression on the entity list read request. Note Depending on your implementation, the result of the $search option on a property can vary. In our example, $search acts on property “Name”. Example Search all entities of Entity Set “Employees” with “Peter” or “Wilson” in their name: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/EMPLOYEES?$search=Peter OR Wilson Steps: Option 1 Step 1: Set the search expression at the request instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list. lo_read_list_request->set_search( ‘Peter OR Wilson’ ). Note This approach is only supported for remote consumption, not for local consumption Steps: Option 2 DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_search_node TYPE REF TO /iwbep/if_cp_search_node. lo_search_node = lo_read_list_request->create_search_node( ‘Peter’ ). lo_search_node->or( ‘Wilson’ ). lo_read_list_request->set_search_node( lo_search_node ). Step 1: Create the search node on the request instance. For this step, you already provided the first part of your $search expression (“Peter” from “Peter OR Wilson”): DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_search_node TYPE REF TO /iwbep/if_cp_search_node. lo_search_node = lo_read_list_request->create_search_node( ‘Peter’ ). This is custom documentation. For more information, please visit SAP Help Portal. 131 1/9/25, 11:50 AM Step 2: Insert the second expression (“Wilson”) and connect it with “OR” to the first expression: DATA: lo_search_node TYPE REF TO /iwbep/if_cp_search_node. lo_search_node->or( ‘Wilson’ ). Step 3: Set the search node in the request: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_search_node TYPE REF TO /iwbep/if_cp_search_node. lo_read_list_request->set_search_node( lo_search_node ). Negation Negate the previous expression. For example, this request: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/EMPLOYEES?$search=NOT (Peter OR Wilson) Call the method "NOT" on the search node instance: DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_search_node TYPE REF TO /iwbep/if_cp_search_node. lo_search_node = lo_read_list_request->create_search_node( ‘Peter’ ). lo_search_node->or( ‘Wilson’ ). lo_search_node->not( ). lo_read_list_request->set_search_node( lo_search_node ). Connect Two Search Nodes You can connect two search nodes. For example, this request: GET /sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/EMPLOYEES?$search=(Peter OR Wilson) AND ( DATA: lo_read_list_request TYPE REF TO /iwbep/if_cp_request_read_list, lo_search_node_1 TYPE REF TO /iwbep/if_cp_search_node, lo_search_node_2 TYPE REF TO /iwbep/if_cp_search_node. lo_search_node_1 = lo_read_list_request->create_search_node( ‘Peter’ ). lo_search_node_1->or( ‘Wilson’ ). lo_search_node_2 = lo_read_list_request->create_search_node( ‘John’ ). lo_search_node_2->and( ‘Mary’ ). lo_search_node_1->and_node( lo_search_node_2 ). lo_read_list_request->set_search_node( lo_search_node_1 ). Constraints $search is only available for OData Version 4 requests. SET_SEARCH is not supported for local consumption. Related Information OData Request Terms This is custom documentation. For more information, please visit SAP Help Portal. 132 1/9/25, 11:50 AM Consuming an HTTP Service In the ABAP environment, you can consume services via the HTTP protocol. Context The HTTP protocol enables you to exchange data between systems. Because of the protocol's flexibility, you can adapt your implementations to a specific use case. You can implement free-style integrations without generated proxies via the HTTP client library. With the HTTP client, you can send a request to any HTTP endpoint. Other than for OData, RFC, and SOAP, you can't use the Service Consumption Model to consume an HTTP service. APIs to Call HTTP Services To enable HTTP communication, there are different approaches: Communication target: A communication target triggers the creation of an application destination, when a communication arrangement is created. The communication target approach provides APIs for receiver validation based on arbitrary properties. For more information, see Defining Specific Properties for Communication Scenarios. This is the recommended approach for HTTP service consumption. Communication arrangement: With the communication arrangement approach, the destination is determined in a so-called communication arrangement and communication system. See Communication Management. We recommend to use this approach, therefore, the other approaches are not covered in detail in this guide. Destination service: The destination service provides APIs to fetch connection information for a given destination name from the SAP BTP destination service. No additional development artifacts are required. The configuration is done in the SAP BTP cockpit. Note The destination service is not available in the ABAP environment in SAP S/4HANA Cloud Public Edition. URL approach: By using a plain URL and setter methods to provide the needed configuration directly in the coding. General Procedures 1. Create a communication target. 2. Create an outbound service of type communication target. 3. Create a communication scenario. 4. Add the outbound service to the communication scenario. 5. Publish the communication scenario, so that the administrator can use it in the Communication Management apps. Result The administrator can use the communication scenario you have published to create a communication arrangement. For more information, see Communication Management. You can the pass the name of the communication scenario and if required, the name of the communication system and the outbound service in an ABAP class to the CREATE_BY_COMM_ARRANGEMENT method, and perform the service call. This is custom documentation. For more information, please visit SAP Help Portal. 133 1/9/25, 11:50 AM Application Destination (Based on Communication System Details) Communication Target Outbound Service Communication Scenario Communication Arrangement Service Call in ABAP Class Communication System Developer Tasks in ADT Administrator Tasks in SAP Fiori Launchpad Related Information Calling the HTTP Service Outbound HTTP Development Tasks Creating a Communication Target for Outbound HTTP A communication target triggers the creation of an application destination. Creating an Outbound Service for HTTP To create a communication scenario to call the HTTP service, you need a corresponding outbound service. Creating a Communication Scenario for Outbound HTTP To consume the HTTP service and to create a corresponding communication arrangement, a communication scenario is required. Calling the HTTP Service You can call an HTTP service using communication targets. Other Approaches for HTTP Outbound Communication HTTP Protocols Creating a Communication Target for Outbound HTTP A communication target triggers the creation of an application destination. Context When a communication arrangement is saved that is based on a communication scenario that uses a communication target, an application destination is created. This application destination is used to call an HTTP service. For more information, see Communication Target. Procedure 1. Create a communication target of type HTTP as described in Creating Communication Targets, for example: This is custom documentation. For more information, please visit SAP Help Portal. 134 1/9/25, 11:50 AM Name Z_COTA_HTTP Description CoTa for HTTP outbound communication 2. Activate Allow Multiple Application Destinations. 3. Activate the communication target. Results The communication target can now be referenced in the corresponding outbound service. Creating an Outbound Service for HTTP To create a communication scenario to call the HTTP service, you need a corresponding outbound service. Prerequisites You have created a communication target as described in Creating a Communication Target for Outbound HTTP. Procedure 1. Create an outbound service of type communication target as described in Creating Outbound Services, for example: Name Z_HTTP_OUTBOUND_SERVICE_COTA Description Outbound service for HTTP Service Type Communication Target 2. Add the communication target: In the field Communication Target, enter the name of your communication target, for example Z_COTA_HTTP. 3. Save the outbound service. Results The outbound service can later be added to the inbound communication scenario. Related Information Outbound Service Creating a Communication Scenario for Outbound HTTP To consume the HTTP service and to create a corresponding communication arrangement, a communication scenario is required. Prerequisites You have created an outbound service of type communication target as described in Creating an Outbound Service for HTTP. This is custom documentation. For more information, please visit SAP Help Portal. 135 1/9/25, 11:50 AM Procedure 1. Create a communication scenario as described in Consuming Services in the Context of API with Communication Users (Outbound), for example: Name: Z_MY_HTTP_OUTBOUND_SCENARIO Description: Outbound scenario for HTTP 2. On the Outbound tab of the communication scenario, add the corresponding outbound service, for example Z_HTTP_OUTBOUND_SERVICE_COTA. 3. Publish the communication scenario. Results The administrator can now use the communication scenario to create a corresponding communication arrangement. Related Information Communication Scenario Calling the HTTP Service You can call an HTTP service using communication targets. Prerequisites You've created a communication scenario. For more information, see Communication Scenario. A corresponding runtime configuration (communication arrangement and communication system) for your scenario exists. For more information, see Creating a Communication Arrangement for Outbound HTTP. Procedure 1. Create a Customizing table to store the application destination that is created when the communication arrangement is saved. 2. Create an implementation of the COMMUNICATION_MANAGEMENT BAdI to store the name of the application destination in the Customizing table. For more information about BAdI implementations, see Implementing BAdIs. Note The Customizing table and the BAdI implementation is only required when the communication target allows multiple application destinations, as shown in this example. If the communication arrangement is created before the implementation of the COMMUNICATION_MANAGEMENT BAdI, the communication arrangement must be saved again to write the name of the application destination to the Customizing table. 3. Create an ABAP class to trigger the service call as described in the example. In this example, the HTTP service described in Creating an HTTP Service is called. The service call returns the HTML text in the console that was defined in the inbound HTTP service. Example Create a Customizing table to store the name of the application destination. Expand the following code sample to view the source codeof the Customizing table. This is custom documentation. For more information, please visit SAP Help Portal. 136 1/9/25, 11:50 AM Sample Code @EndUserText.label : 'Cota Custom Table' @AbapCatalog.enhancement.category : #NOT_EXTENSIBLE @AbapCatalog.tableCategory : #TRANSPARENT @AbapCatalog.deliveryClass : #C @AbapCatalog.dataMaintenance : #RESTRICTED define table zcota_custom { key client : abap.clnt not null; key usecase : abap.int1 not null; appldest : abap.sstring(50) not null; } Retrieve the name of the relevant application destination. Expand the following code sample to view the source code of the BAdI implementation. Sample Code METHOD if_com_arrangement_badi~during_save. * * !io_com_arrangement TYPE REF TO if_com_arrangement * !io_com_system TYPE REF TO if_com_system * !io_com_user TYPE REF TO if_com_user * !io_com_scenario TYPE REF TO if_com_scenario DATA ls_custom TYPE zcota_custom. DATA(lt_out_srv) = io_com_scenario->get_outbound_services( ). DATA(lt_out_srv_a) = io_com_arrangement->get_outbound_services( ). FIELD-SYMBOLS: <ls_out_srv> LIKE LINE OF lt_out_srv_a. DATA(lt_properties) = io_com_arrangement->get_properties( ). DATA lv_scenarioid TYPE i VALUE 1. LOOP AT lt_properties INTO DATA(ls_property). IF ls_property-name EQ 'USECASE'. lv_scenarioid = ls_property-values[ 1 ]. ENDIF. ENDLOOP. " save the application destination to an application-specific persistence LOOP AT lt_out_srv_a ASSIGNING <ls_out_srv>. ls_custom-usecase = lv_scenarioid. ls_custom-appldest = <ls_out_srv>-destination_name. MODIFY zcota_custom FROM @ls_custom. ENDLOOP. ENDMETHOD. METHOD if_com_arrangement_badi~before_delete. * ! @parameter io_com_arrangement | <p class="shorttext synchronized" lang="en">Communicat * ! @parameter io_com_system | <p class="shorttext synchronized" lang="en">Communicat * ! @parameter io_com_user | <p class="shorttext synchronized" lang="en">Communicat * ! @parameter io_com_scenario | <p class="shorttext synchronized" lang="en">Communicat * ! @parameter et_message | <p class="shorttext synchronized" lang="en">Messages</ DATA(lt_out_srv) = io_com_arrangement->get_outbound_services( ). FIELD-SYMBOLS: <ls_out_srv> LIKE LINE OF lt_out_srv. LOOP AT lt_out_srv ASSIGNING <ls_out_srv>. DELETE FROM zcota_custom WHERE appldest = @<ls_out_srv>-destination_name. ENDLOOP. This is custom documentation. For more information, please visit SAP Help Portal. 137 1/9/25, 11:50 AM ENDMETHOD. Call the HTTP service. Expand the following code sample to view the source code of the HTTP service call. Sample Code METHOD if_oo_adt_classrun~main. DATA lo_cota TYPE REF TO z_cota_http. DATA lt_output TYPE STANDARD TABLE OF string. DATA lv_appl_dest TYPE sappdestname. DATA(lv_scen) = '1'. " select the relevant application destination from the Customizing table SELECT SINGLE appldest FROM zcota_custom WHERE usecase = @lv_scen INTO @lv_appl_dest. TRY. lo_cota = NEW z_cota_http( lv_appl_dest ). DATA(lo_client) = lo_cota->create_web_http_client( ). DATA(lo_response) = lo_client->execute( if_web_http_client=>get ). DATA(ls_status) = lo_response->get_status( ). CATCH cx_appdestination INTO DATA(lx_appdestination). APPEND lx_appdestination->get_text( ) TO lt_output. CATCH cx_communication_target_error INTO DATA(lx_communication_target_error). APPEND lx_communication_target_error->get_text( ) TO lt_output. CATCH cx_web_http_client_error INTO DATA(lx_web_http_client_error). APPEND lx_web_http_client_error->get_text( ) TO lt_output. ENDTRY. out->write( lo_response->get_text( ) ). ENDMETHOD. Other Approaches for HTTP Outbound Communication HTTP Communication via Communication Arrangements HTTP outbound communication can be established using so-called communication arrangements. HTTP Communication via Destination Service (Deprecated) Use the destination service in SAP BTP to store destination information that can be reused by applications deployed in one of the BTP environments. HTTP Communication via URL HTTP Communication via Communication Arrangements This is custom documentation. For more information, please visit SAP Help Portal. 138 1/9/25, 11:50 AM HTTP outbound communication can be established using so-called communication arrangements. Prerequisites You've created a communication scenario. For more information, see Communication Scenario. Procedure 1. Create a corresponding outbound service of type HTTP. a. In your ABAP project, select the relevant package node in the Project Explorer. b. Open the context menu and choose File New Management Outbound Service Next . Other ABAP Repository Object Cloud Communication c. Enter the name of the outbound service. d. Select HTTP Service in the Service Type dropdown list. e. Choose Next and select a transport request. f. Optional: Go to your outbound service and enter the URL in the field Default Path Prefix. g. Save the outbound service. 2. Add the newly created outbound service to your scenario. 3. Publish the communication scenario. The administrator can then create the required communication management objects as described in Communication Management. 4. Adapt the communication arrangement call according to your needs as described in the example. See Service Consumption via Communication Arrangements for more information. According to your developed communication scenario, add the following: comm_scenario mandatory ID of the developed communication scenario. comm_system_id optional ID of the configured communication system. Use method query_ca of class cl_com_arrangement_factory to derive it dynamically. service_id optional ID of the developed outbound service. Note You can't use the create_by_comm_arrangement method for SAP-delivered scenarios. Example Sample Code DATA: lr_cscn type if_com_scenario_factory=>ty_query-cscn_id_range. " find CA by scenario lr_cscn = value #( ( sign = 'I' option = 'EQ' low = '<Scenario ID>' ) ). DATA(lo_factory) = cl_com_arrangement_factory=>create_instance( ). lo_factory->query_ca( EXPORTING is_query = value #( cscn_id_range = lr_cscn ) IMPORTING et_com_arrangement = data(lt_ca) ). This is custom documentation. For more information, please visit SAP Help Portal. 139 1/9/25, 11:50 AM IF lt_ca is initial. EXIT. ENDIF. " take the first one READ TABLE lt_ca INTO DATA(lo_ca) INDEX 1. " get destination based to Communication Arrangement TRY. DATA(lo_dest) = cl_http_destination_provider=>create_by_comm_arrangement( comm_scenario = '<Scenario ID>' service_id = '<Outbound Service ID>' comm_system_id = lo_ca->get_comm_system_id( ) ). DATA(lo_http_client) = cl_web_http_client_manager=>create_by_http_destination( lo_dest ) " execute the request DATA(lo_request) = lo_http_client->get_http_request( ). DATA(lo_response) = lo_http_client->execute( if_web_http_client=>get ). CATCH cx_http_dest_provider_error. " handle exception here CATCH cx_web_http_client_error. " handle exception here ENDTRY. Note We recommend to retrieve the correct destination reference based on the communication scenario and a customer-defined property as described in Service Consumption via Communication Arrangements. Test Your Outbound Call To test your outbound call, you have to provide a configuration for the outbound service you want to call in your code. Create a communication system and communication arrangement for the communication scenario and maintain the required data, such as host name and credentials in the Communication Systems and Communication Arrangements apps. For more information, see Communication Management. These tasks are performed by the administrator. HTTP Communication via Destination Service (Deprecated) Use the destination service in SAP BTP to store destination information that can be reused by applications deployed in one of the BTP environments. Context Note You can use the destination service. However, this approach is deprecated. We recommend using the communication arrangement approach instead. See Consuming an HTTP Service for more information. You've the following options to consume a destination service: Dynamic by using a communication arrangement and a communication system This is custom documentation. For more information, please visit SAP Help Portal. 140 1/9/25, 11:50 AM Static by using the method create_by_cloud_destination in the code Procedure When using create_by_cloud_destination, proceed as follows: Create a destination object using class cl_http_destination_provider and method create_by_cloud_destination with the following parameters: i_name: the name of the destination Optional: i_service_instance_name: Typically, you use the destinations of the subaccount in which the ABAP instance resides or, in case of a SaaS solution based on the ABAP environment, the destinations of the consumer subaccount. However, you can add more destinations using your own destination service instance and communication scenario SAP_COM_0276, for example, to achieve separation of concerns (see also Create a Destination). In this case, specify the value of the service instance name property of the communication arrangement for SAP_COM_0276. i_authn_mode: Set the value of this parameter according to the authentication method configured in your destination. If the authentication method uses user propagation, the value is if_a4c_cp_service=>user_propagation, if it doesn't, set if_a4c_cp_service=>service_specific: Authentication Methods Value if_a4c_cp_service=>user_propagation Proxy Type Internet OAuth User Token Exchange Authentication Proxy Type OnPremise Principal Propagation SSO Authentication for HTTP OAuth SAML Bearer Assertion Authentication OAuth JWT Bearer Authentication if_a4c_cp_service=>service_specific No Authentication No Authentication Basic Authentication Basic Authentication Client Authentication Types for HTTP Destinations OAuth Client Credentials Authentication OAuth Password Authentication Other authentication methods are currently not supported by the SAP BTP, ABAP environment. Example The actual processing of an HTTP request and its response is shown in the following code example: Sample Code This is custom documentation. For more information, please visit SAP Help Portal. 141 1/9/25, 11:50 AM DATA lo_http_destination TYPE REF TO if_http_destination. DATA lo_http_client TYPE REF TO if_web_http_client. DATA lo_http_response TYPE REF TO if_web_http_response. TRY. " create HTTP destination by cloud destination lo_http_destination = cl_http_destination_provider=>create_by_cloud_destination( i_name " create HTTP client by HTTP destination lo_http_client = cl_web_http_client_manager=>create_by_http_destination( lo_http_destina " adding header fields lo_http_client->get_http_request( )->set_header_fields( VALUE #( ( name = if_web_http_he ( name = if_web_http_he " execute HTTP GET-request and store response lo_http_response = lo_http_client->execute( if_web_http_client=>get ). " print response text to console DATA(ls_status) = lo_http_response->get_status( ). out->write( |Response is: { ls_status-code } { ls_status-reason }.| ). out->write( lo_http_response->get_text( ) ). CATCH cx_http_dest_provider_error cx_web_http_client_error INTO DATA(lx_error). " display error details out->write( lx_error->get_text( ) ). ENDTRY. Test Your Outbound Call To test your outbound call, configure an HTTP destination as described in Create HTTP Destinations. Authentication Methods Only the authentication methods listed in table Authentication Methods are available. If you're using Client Certificate Authentication as authentication method, activate Use client provided certificate. This flag is only visible if the URL field contains a URL string starting with https://... . For proxy type Internet and the use of authentication type client certificate, you must upload the X.509 client certificate in P12 format on the client side in the SAP BTP, ABAP environment using the Maintain Client Certificates application. Uploading the client certificate via destination service isn't supported. The use of if_a4c_cp_service=>user_propagation isn't supported in the ADT class runner. It can only be tested when a business user context is available, for example, during processing of OData services or HTTP services. HTTP Communication via URL You can configure the URL static in the code: Sample Code DATA(lo_url_destination) = cl_http_destination_provider=>create_by_url( 'https://<host>/sap/bc/srt/xip/sap/<provider>/00 Note This is custom documentation. For more information, please visit SAP Help Portal. 142 1/9/25, 11:50 AM Using create_by_url is only suitable for public services or test purposes, because credentials should be stored in the destination service, or using communication arrangements (create_by_comm_arrangement, create_by_cloud_destination). HTTP Protocols Example: Retry Design Pattern Repeat an HTTP request automatically in ABAP. Example: HTTP Multipart Request Using multipart requests for HTTP communication from the ABAP environment. Example: Enable Path Prefix Enable a path prefix for HTTP calls in ABAP. Example: Retry Design Pattern Repeat an HTTP request automatically in ABAP. Using this feature, you can repeat a request automatically up to 3 times, as long as the status code from the response has an appropriate value. You can provide a set of response codes upon which the request is supposed to be repeated, if the corresponding response returns a status code from this set. If you do not provide this set of codes, a default set is drawn depending on the idempotence of a request. You can control the idempotence of a request via parameter. The default set for a non-idempotent request is 408, 429 and 503. For an idempotent request, the default set is 308, 429, 500, 502, 503, 504, 507, 509. All other parameters correspond to the known execute method. Sample Code DATA: http_client TYPE REF TO if_web_http_client, lo_response TYPE REF TO if_web_http_response, lt_retry_status_codes TYPE http_status_codes, iv_url TYPE string. iv_url = 'https://hostfoobar:port/foo/bar'. "Enter a correct url TRY. http_client = cl_web_http_client_manager=>create_by_http_destination( i_destination = cl_htt "select for which numbers the execution should be retried lt_retry_status_codes = VALUE http_status_codes( ( '409' ) ( '418' ) ). lo_response = http_client->retry_execute( i_retry_status_codes = lt_retry_status_codes This is custom documentation. For more information, please visit SAP Help Portal. " Table for HTTP status co 143 1/9/25, 11:50 AM i_method = if_web_http_client=>post " HTTP Method (GET, POST etc i_idempotent_method = abap_true " Idempotent request metho ). DATA(status) = lo_response->get_status( ). IF status-code NE 200. "Error handling here ENDIF. CATCH cx_web_http_client_error cx_http_dest_provider_error. " handle exception here ENDTRY. has occurrred!'. ENDTRY. Example: HTTP Multipart Request Using multipart requests for HTTP communication from the ABAP environment. The code examples below show an HTTP multipart request: Client Side Sample Code DATA: http_client TYPE REF TO if_web_http_client, lo_response TYPE REF TO if_web_http_response, iv_url TYPE string. iv_url = 'https://...'. "Enter a correct url TRY. http_client = cl_web_http_client_manager=>create_by_http_destination( i_destination = cl_http_ DATA(lo_request) = http_client->get_http_request( lo_request->set_header_field( i_name = ). 'Content-type' i_value = 'multipart/mixed' ). DATA(part_1) = lo_request->add_multipart( part_1->set_header_field( i_name = ). 'Content-type' i_value = 'text/html; charset=UTF-8' ). part_1->set_text( 'This is part one.' ). DATA(part_2) = lo_request->add_multipart( part_2->set_header_field( i_name = ). 'Content-type' i_value = 'text/html; charset=UTF-8' ). part_2->set_text( 'This is part two.' ). lo_response = http_client->execute( if_web_http_client=>post ). This is custom documentation. For more information, please visit SAP Help Portal. 144 1/9/25, 11:50 AM DATA(status) = lo_response->get_status( ). IF status-code NE 200. "Error handling here ENDIF. CATCH cx_web_http_client_error cx_http_dest_provider_error. "Handle exception here. ENDTRY. Server Side Sample Code CLASS ZCL_TEST_MULTIPART IMPLEMENTATION. method IF_HTTP_SERVICE_EXTENSION~HANDLE_REQUEST. DATA: answer TYPE string, num_part TYPE i. num_part = request->num_multiparts( ). IF num_part = 0. answer = '<html><body>No multipart found in request!!</body></html>'. response->set_text( answer ). ELSE. DO num_part TIMES. DATA(lo_part_request) = request->get_multipart( index = sy-index ). IF lo_part_request IS BOUND. "Do something here with this part. ENDIF. ENDDO. ENDIF. ENDMETHOD. ENDCLASS. Example: Enable Path Prefix Enable a path prefix for HTTP calls in ABAP. Interface IF_WEB_HTTP_CLIENT provides a method ENABLE_PATH_PREFIX to extend a URL set by the method SET_URI_PATH. Calling only SET_URI_PATH overwrites the URL used to instantiate the client: Sample Code DATA: http_client TYPE REF TO if_web_http_client, lo_response TYPE REF TO if_web_http_response, iv_url TYPE string. iv_url = 'https://hostfoobar:port/foo1/bar1'. "Enter a correct url This is custom documentation. For more information, please visit SAP Help Portal. 145 1/9/25, 11:50 AM TRY. http_client = cl_web_http_client_manager=>create_by_http_destination( i_destination = cl_http_ DATA(lo_request) = http_client->get_http_request( ). lo_request->set_uri_path( EXPORTING i_uri_path = '/foo2/bar2' ). "the request will be send to /foo2/bar2 lo_response = http_client->execute( if_web_http_client=>post ). DATA(status) = lo_response->get_status( ). IF status-code NE 200. "Error handling here ENDIF. CATCH cx_web_http_client_error cx_http_dest_provider_error. " handle exception here ENDTRY. If you call the method ENABLE_PATH_PREFIX before calling SET_URI_PATH, the path passed by SET_URI_PATH is appended to the initial path: Sample Code DATA: http_client TYPE REF TO if_web_http_client, lo_response TYPE REF TO if_web_http_response, iv_url TYPE string. iv_url = 'https://hostfoobar:port/foo1/bar1'. "Enter a correct url TRY. http_client = cl_web_http_client_manager=>create_by_http_destination( i_destination = cl_http_ DATA(lo_request) = http_client->get_http_request( ). http_client->enable_path_prefix( ). lo_request->set_uri_path( EXPORTING i_uri_path = '/foo2/bar2' ). "the request will be send to /foo1/bar1/foo2/bar2 lo_response = http_client->execute( if_web_http_client=>post ). DATA(status) = lo_response->get_status( ). IF status-code NE 200. "Error handling here ENDIF. CATCH cx_web_http_client_error cx_http_dest_provider_error. " handle exception here ENDTRY. Outbound HTTP Administration Tasks This is custom documentation. For more information, please visit SAP Help Portal. 146 1/9/25, 11:50 AM Creating a Communication System for Outbound HTTP As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Creating a Communication Arrangement for Outbound HTTP As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. Creating a Communication System for Outbound HTTP As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Procedure 1. In SAP Fiori launchpad, create a new communication system in the Communication Systems app. Enter the following data: General Data Field Input System ID Provide a system name, for example, MY_HTTP_OUTBOUND_SYSTEM. System Name Provide a system name, for example MY_HTTP_OUTBOUND_SYSTEM. Technical Data Field Input General: Host Name Enter the host name. For example, use the API-URL of the inbound communication arrangement, that you have created in Creating a Communication Arrangement for Inbound HTTP without the https:// prefix. Users for Inbound Communication Authentication Method User Name/Client ID User ID and Password Enter the user name of the communication user, for example MY_INBOUND_RFC_USER. For more information, see Creating a Communication User for Inbound HTTP. 2. Save the communication system. Related Information Communication Management This is custom documentation. For more information, please visit SAP Help Portal. 147 1/9/25, 11:50 AM Creating a Communication Arrangement for Outbound HTTP As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. Prerequisites You have create a communication system as described in Creating a Communication System for Outbound HTTP. You have created a communication scenario as described in Creating a Communication Scenario for Outbound HTTP. Context In this case, the communication arrangement is used to call the HTTP service that was created in Creating an HTTP Service. Procedure 1. In SAP Fiori launchpad, create a new communication arrangement in the Communication Arrangements app. Field Input Scneario ID Select the scenario, for example Z_MY_HTTP_OUTBOUND_SCENARIO. Arrangement Name Provide a name, for example, MY_OUTBOUND_HTTP_ARRANGEMENT. Communication System Select the communication system, for example MY_HTTP_OUTBOUND_SYSTEM. For more information, see Creating a Communication System for Outbound HTTP. 2. Save the communication arrangement. Related Information Communication Management Consuming an RFC Service In the ABAP environment, you can consume services via the RFC protocol. Context RFC is the SAP-proprietary protocol for communication between ABAP systems. It is used for synchronous process integration and data replication with old ABAP systems. With RFC, a remote function module is called. RFC calls are characterized by high performance. To connect on-premise to cloud systems, an RFC connector may be required. For RFC calls, you can either use the Service Consumption Model (SRVC) or the CALL FUNCTION ... DESTINATION statement. As described in Service Consumption Model, we recommend to use the SRVC because it is less error prone and eases the coding process. Also, the SRVC generates data types required for a typed access to the RFC response. APIs to Call RFC Services This is custom documentation. For more information, please visit SAP Help Portal. 148 1/9/25, 11:50 AM To enable RFC communication, there are two different approaches: Communication arrangement: With the communication arrangement approach, the destination is determined in a so-called communication arrangement and communication system. See Communication Management. We recommend to use this approach, therefore, the other approaches are not covered in detail in this guide. Destination service: The destination service provides APIs to fetch connection information for a given destination name from the SAP BTP destination service. No additional development artifacts are required. The configuration is done in the SAP BTP cockpit. Note The destination service is not available in the ABAP environment in SAP S/4HANA Cloud Public Edition. General Procedure 1. You need a service metadata file in .xml format that describes the service that you want to consume. 2. Use the .xml file to create a Service Consumption Model (SRVC) and activate it. 3. Create an outbound service of type RFC. 4. Create a communication scenario. 5. Add the outbound service to the communication scenario. 6. Publish the communication scenario, so that the administrator can use it in the Communication Management apps. Result The administrator can use the communication scenario you have published to create a communication arrangement. For more information, see Communication Management. You can use the generated code snippet of the SRVC in an ABAP class, pass the name of the communication scenario and if required, the name of the communication system and the outbound service to the CREATE_BY_COMM_ARRANGEMENT method, and perform the service call. Provides Code Snippet Including Data Types Service Call in ABAP Class Service Consumption Model Outbound Service Communication Scenario Communication Arrangement Service Call With CALL FUNCTION ... DESTINATION XML File of the RFC Service Communication System Developer Tasks in ADT Administrator Tasks in SAP Fiori Launchpad Related Information RFC This is custom documentation. For more information, please visit SAP Help Portal. 149 1/9/25, 11:50 AM Outbound RFC Development Tasks Creating a Service Consumption Model for Outbound RFC Create a service consumption model to consume the RFC service. Creating an Outbound Service for RFC To create a communication scenario to call the RFC service, you need a corresponding outbound service. Creating a Communication Scenario for Outbound RFC To consume the RFC service and to create a corresponding communication arrangement, a communication scenario is required. Calling the RFC Service Other Approaches for RFC Outbound Communication Creating a Service Consumption Model for Outbound RFC Create a service consumption model to consume the RFC service. Prerequisites You have created the example as described in Providing an RFC Service. Context In the inbound communication arrangement described in Creating a Communication Arrangement for Inbound RFC, you can download the service metadata file of the function module, that described the RFC service. You can use this file to create a service consumption model (SRVC) for you RFC service call. Note For RFC calls, the SRVC is optional. You can use the CALL FUNCTION ... DESTINATION statement instead. For more information, see RFC. Procedure 1. Create an SRVC as described in Generating Model Class for Remote Function Call (RFC) with the service metadata file, for example: Name Z_RFC_CALL_SRVC Description SRVC for RFC call 2. Activate the SRVC. This generates all necessary artifacts that are required for the next steps. Creating an Outbound Service for RFC To create a communication scenario to call the RFC service, you need a corresponding outbound service. Procedure This is custom documentation. For more information, please visit SAP Help Portal. 150 1/9/25, 11:50 AM 1. Create an outbound service of type RFC as described in Creating Outbound Services, for example: Name Z_RFC_OUTBOUND_SERVICE_SRFC Description Outbound service for RFC 2. In field RFC Function Module, enter the name of the relevant RFC function module, for example Z_RFC_SUM. 3. Save the outbound service. Related Information Outbound Service Creating a Communication Scenario for Outbound RFC To consume the RFC service and to create a corresponding communication arrangement, a communication scenario is required. Prerequisites You have created an outbound service of type RFC as described in Creating an Outbound Service for RFC. Procedure 1. Create a communication scenario as described in Consuming Services in the Context of API with Communication Users (Outbound), for example: Name: Z_MY_RFC_OUTBOUND_SCENARIO Description: Outbound scenario for RFC 2. On the Outbound tab of the communication scenario, add the corresponding outbound service, for example Z_RFC_OUTBOUND_SERVICE_SRFC. 3. Publish the communication scenario. Results The administrator can now use the communication scenario to create a corresponding communication arrangement. Related Information Communication Scenario Calling the RFC Service To establish communication via RFC, you need to create an outbound service of type RFC and use a Service Consumption Model (SRVC) or the CALL FUNCTION ... DESTINATION statement to call other systems from the ABAP environment. Prerequisites You've created a communication scenario as described in Creating a Communication Scenario for Outbound RFC. This is custom documentation. For more information, please visit SAP Help Portal. 151 1/9/25, 11:50 AM Optional: You have created a service consumption model as described in Creating a Service Consumption Model for Outbound RFC A corresponding runtime configuration (communication arrangement and communication system) for your scenario exists. For more information, see Creating a Communication Arrangement for Outbound RFC. Procedure 1. If you want to use the service consumption model, copy the generated code snippet from the Overview tab of the service consumption model. 2. Call the RFC service as described in the example, using the CREATE_BY_COMM_ARRANGEMENT method. In this example, the remote-enabled function module described in Creating a Remote-Enabled Function Module (RFM) is called. Note You can't use the create_by_comm_arrangement method for SAP-delivered scenarios. To call an RFC function module in your communication scenario, it's sufficient to define one outbound service of type RFC that can be used to call multiple RFC function modules. For this outbound service, go to the corresponding communication scenario. On the Outbound tab in the Outbound Service section, select Generate Destination. To document which RFC function modules are called by a communication scenario, you can define separate outbound services and define the name of the function modules without selecting Generate Destination. Example Using a Service Consumption Model This example shows how to use RFC communication with an SRVC. Expand the following code sample to view the source codeof the RFC service call. Sample Code DATA dest TYPE REF TO if_rfc_dest. DATA myobj TYPE REF TO z_rfc_call_srvc. DATA input1 TYPE i. DATA input2 TYPE i. DATA result TYPE i. TRY. dest = cl_rfc_destination_provider=>create_by_comm_arrangement( comm_scenario = 'Z_MY_RFC_OUTBOUND_SCENARIO' ). CREATE OBJECT myobj EXPORTING destination = dest. myobj->z_rfc_sum( EXPORTING input1 = input1 input2 = input2 IMPORTING result = result ). CATCH cx_aco_communication_failure INTO DATA(lcx_comm). " handle CX_ACO_COMMUNICATION_FAILURE (sy-msg* in lcx_comm->IF_T100_MESSAGE~T100KEY) CATCH cx_aco_system_failure INTO DATA(lcx_sys). " handle CX_ACO_SYSTEM_FAILURE (sy-msg* in lcx_sys->IF_T100_MESSAGE~T100KEY) CATCH cx_aco_application_exception INTO DATA(lcx_appl). This is custom documentation. For more information, please visit SAP Help Portal. 152 1/9/25, 11:50 AM " handle APPLICATION_EXCEPTIONS (sy-msg* in lcx_appl->IF_T100_MESSAGE~T100KEY) CATCH cx_rfc_dest_provider_error. " handle CX_RFC_DEST_PROVIDER_ERROR ENDTRY. out->write( result ). Note We recommend to retrieve the correct destination reference based on the communication scenario and a customer-defined property as described in Service Consumption via Communication Arrangements. Using CALL FUNCTION ... DESTINATION To use the CALL FUNCTION ... DESTINATION statement, use the following code: Expand the following code sample to view the source codeof the RFC service call. Sample Code DATA: lr_cscn TYPE if_com_scenario_factory=>ty_query-cscn_id_range. " find Communication Arrangement by scenario ID lr_cscn = VALUE #( ( sign = 'I' option = 'EQ' low = 'Z_MY_RFC_OUTBOUND_SCENARIO' ) ). DATA(lo_factory) = cl_com_arrangement_factory=>create_instance( ). lo_factory->query_ca( EXPORTING is_query = VALUE #( cscn_id_range = lr_cscn ) IMPORTING et_com_arrangement = DATA(lt_ca) ). IF lt_ca IS INITIAL. EXIT. ENDIF. " take the first one READ TABLE lt_ca INTO DATA(lo_ca) INDEX 1. " get destination based on Communication Arrangement TRY. DATA(lo_dest) = cl_rfc_destination_provider=>create_by_comm_arrangement( EXPORTING comm_scenario = 'Z_MY_RFC_OUTBOUND_SCENARIO' service_id = 'Z_RFC_OUTBOUND_SERVICE_SRFC' comm_system_id = lo_ca->get_comm_system_id( ) ). DATA(destination_name) = lo_dest->get_destination_name( ). " handle CX_RFC_DEST_PROVIDER_ERROR ENDTRY. CATCH cx_rfc_dest_provider_error. DATA input1 TYPE i. This is custom documentation. For more information, please visit SAP Help Portal. 153 1/9/25, 11:50 AM DATA input2 TYPE i. DATA result TYPE i. ENDTRY. CALL FUNCTION 'Z_RFC_SUM' DESTINATION destination_name EXPORTING input1 = input1 input2 = input2 IMPORTING result = result. CASE sy-subrc. WHEN 1. " handle system failure WHEN 2. " handle communication failure WHEN 3. " handle application failure ENDCASE. out->write( result ). Related Information Call a Remote Function Module (RFC) From SAP BTP, ABAP Environment Other Approaches for RFC Outbound Communication RFC Communication via Destination Service (Deprecated) Use the destination service in SAP BTP to store destination information that can be reused by SAP BTP app services. RFC Communication via Destination Service (Deprecated) Use the destination service in SAP BTP to store destination information that can be reused by SAP BTP app services. Context Note You can use the destination service. However, this approach is deprecated. We recommend using the communication arrangement approach instead. See Calling the RFC Service for more information. You've the following options to consume a destination service: Dynamic by using a communication arrangement and a communication system Static by using the method create_by_cloud_destination in the code This is custom documentation. For more information, please visit SAP Help Portal. 154 1/9/25, 11:50 AM Prerequisites If you want to call other systems via SRVC, you must have created an SRVC of type RFC as described in Generating Proxies for Remote Function Call (RFC). Procedure When using create_by_cloud_destination, proceed as follows: Create a destination object using class cl_http_destination_provider and method create_by_cloud_destination with the following parameters: i_name: the name of the destination. Optional: i_service_instance_name: Typically, you use the destinations of the subaccount in which the ABAP instance resides or, in case of a SaaS solution based on the ABAP environment, the destinations of the consumer subaccount. However, you can add more destinations using your own destination service instance and communication scenario SAP_COM_0276, for example, to achieve separation of concerns (see also Create a Destination). In this case, specify the value of the service instance name property of the communication arrangement for SAP_COM_0276. Example Using a Service Consumption Model You can consume your service using a Service Consumption Model (SRVC). Create an SRVC and replace the call of the method cl_rfc_destination_provider=>create_by_comm_arrangement( ) that is proposed in the SRVC with cl_rfc_destination_provider=>create_by_cloud_destination( ): Sample Code TRY. " replace Method create_by_comm_arrangement( ). " dest = cl_rfc_destination_provider=>create_by_comm_arrangement( " comm_scenario = 'MY_COMM_SCENARIO' " ). " replacement DATA(dest) = cl_rfc_destination_provider=>create_by_cloud_destination( EXPORTING i_name = 'name of destination' ). CREATE OBJECT myobj EXPORTING destination = dest. myobj->bapi_activitytype_getlist( IMPORTING return = lt_return CHANGING activitytype_list = lt_acttype_list. ). CATCH cx_aco_communication_failure INTO DATA(lcx_comm). " handle CX_ACO_COMMUNICATION_FAILURE (sy-msg* in lcx_comm->IF_T100_MESSAGE~T100KEY) CATCH cx_aco_system_failure INTO DATA(lcx_sys). " handle CX_ACO_SYSTEM_FAILURE (sy-msg* in lcx_sys->IF_T100_MESSAGE~T100KEY) CATCH cx_aco_application_exception INTO DATA(lcx_appl). " handle APPLICATION_EXCEPTIONS (sy-msg* in lcx_appl->IF_T100_MESSAGE~T100KEY) CATCH cx_rfc_dest_provider_error. " handle CX_RFC_DEST_PROVIDER_ERROR This is custom documentation. For more information, please visit SAP Help Portal. 155 1/9/25, 11:50 AM ENDTRY. Using CALL FUNCTION ... DESTINATION The sample code below shows how to get a reference to a destination and how to use it when calling a remote-enabled function module. Sample Code " getting the reference to the relevant destination TRY. DATA(lr_dest) = cl_rfc_destination_provider=>create_by_cloud_destination( EXPORTING i_name = 'name_of_destination' ). CATCH cx_rfc_dest_provider_error. " handle CX_RFC_DEST_PROVIDER_ERROR ENDTRY. DATA(lo_dest) = lr_dest->get_destination_name( ). " using the destination in RFC DATA msg TYPE c LENGTH 255. CALL FUNCTION 'BAPI_ACTIVITYTYPE_GETLIST' DESTINATION lo_dest->get_destination_name( ) IMPORTING return = lt_return TABLES activitytype_list = lt_acttype_list. EXCEPTIONS system_failure = 1 MESSAGE msg communication_failure = 2 MESSAGE msg OTHERS = 3. CASE sy-subrc. WHEN 1. " handle system failure WHEN 2. " handle communication failure WHEN 3. " handle application failure ENDCASE. Note When using on-premise connectivity, make sure the called RFC function module is exposed in Cloud Connector. See Configure Access Control (RFC). Test Your Outbound Call To test your outbound call, configure an RFC destination as described in Create RFC Destinations. The following authentication methods are supported in the SAP BTP, ABAP environment: Internet: Basic Authentication: Fill the User and Password fields. If an alias logon is required, use the field Alias User. Client Certificate Authentication: Use the additional property jco.client.tls_client_certificate_logon with value 1 to enable Client Certificate Authentication. OnPremise: This is custom documentation. For more information, please visit SAP Help Portal. 156 1/9/25, 11:50 AM Basic Authentication: Fill the User and Password fields. Principal Propagation: Use the additional property jco.destination.auth_type with value PrincipalPropagation to enable Principal Propagation. Note For proxy type Internet and the use of authentication type client certificate, you must upload the X.509 client certificate in P12 format on the client side in the SAP BTP, ABAP environment, using the Maintain Client Certificates application. Uploading the client certificate via destination service isn't supported. For proxy type OnPremise, the use of authentication type PrincipalPropagation for a destination isn't supported in the ADT class runner. Outbound RFC Administration Tasks Creating a Communication System for Outbound RFC As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Creating a Communication Arrangement for Outbound RFC As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. Creating a Communication System for Outbound RFC As described Communication System, a communication system is a representation of a communication partner that stores data about authentication. Procedure 1. In SAP Fiori launchpad, create a new communication system in the Communication Systems app. Enter the following data: General Data Field Input System ID Provide a system name, for example, MY_RFC_OUTBOUND_SYSTEM. System Name Provide a system name, for example MY_RFC_OUTBOUND_SYSTEM. Technical Data Field Input General: Host Name Enter the host name. For example, use the API-URL of the inbound communication arrangement, that you have created in This is custom documentation. For more information, please visit SAP Help Portal. 157 1/9/25, 11:50 AM Field Input Creating a Communication Arrangement for Inbound RFC without the https:// prefix. Users for Inbound Communication Authentication Method User Name/Client ID User ID and Password Enter the user name of the communication user, for example MY_INBOUND_RFC_USER. For more information, see Creating a Communication User for Inbound RFC. 2. Save the communication system. Related Information Communication Management Creating a Communication Arrangement for Outbound RFC As described in Communication Arrangement, a communication arrangement is the runtime configuration of a specific communication scenario. Prerequisites You have create a communication system as described in Creating a Communication System for Outbound RFC. You have created a communication scenario as described in Creating a Communication Scenario for Outbound RFC. Context In this case, the communication arrangement is used to call the RFC service that was created in Creating a Remote-Enabled Function Module (RFM). Procedure 1. In SAP Fiori launchpad, create a new communication arrangement in the Communication Arrangements app. Field Input Scneario ID Select the scenario, for example Z_MY_RFC_OUTBOUND_SCENARIO. Arrangement Name Provide a name, for example, MY_OUTBOUND_RFC_ARRANGEMENT. Communication System Select the communication system, for example MY_RFC_OUTBOUND_SYSTEM. For more information, see Creating a Communication System for Inbound RFC. 2. Save the communication arrangement. This is custom documentation. For more information, please visit SAP Help Portal. 158 1/9/25, 11:50 AM 3. Optional: Test the connection. Choose Check Connection. Related Information Communication Management Consuming a SOAP Service In the ABAP environment, you can consume services via the SOAP protocol. Calling SOAP Services With the SOAP protocol, you can consume web services. SOAP calls can be performed either synchronously or asynchronously. In synchronous communication, the sender waits for an answer of the provider and is therefore blocked. In asynchronous communication, the sender doesn't wait for an answer by the receiver. The request can be processed at any time. An administrator can also monitor asynchronous SOAP calls in SAP Fiori launchpad. For more information, see Monitoring. APIs to Call SOAP Services To enable SOAP communication, there are three different approaches: Communication arrangement: With the communication arrangement approach, the destination is determined in a so-called communication arrangement and communication system. See Communication Management. We recommend using this approach, therefore, the other approaches aren't covered in detail in this guide. Destination service: The destination service provides APIs to fetch connection information for a given destination name from the SAP BTP destination service. No additional development artifacts are required. The configuration is done in the SAP BTP cockpit. Note The destination service isn't available in the ABAP environment in SAP S/4HANA Cloud Public Edition. URL approach: By using a plain URL and setter methods to provide the needed configuration directly in the coding. All the approaches listed require a Service Consumption Model. For more information, see Service Consumption Model as SOAP Consumer. SOAP Protocols You can also use released protocols to adjust certain parts of a SOAP request, such as: The SOAP header protocol to add custom SOAP header elements The HTTP header protocol to add the AIR key to the HTTP header The web service sequence protocol to enable exactly once in order (EOIO) processing General Procedure 1. You need a service metadata file in .wsdl format that describes the service that you want to consume. You can get this, for example, from the SAP Business Accelerator Hub or another web service provider. 2. Use the .wsdl file to create a Service Consumption Model (SRVC) and activate it. As described in Service Consumption Model, the SRVC provides a code snippet that you can use in an ABAP class to call the respective web service. This is custom documentation. For more information, please visit SAP Help Portal. 159 1/9/25, 11:50 AM 3. Create an outbound service of type Web Service. 4. Create a communication scenario. 5. Add the outbound service to the communication scenario. 6. Publish the communication scenario, so that the administrator can use it in the Communication Management apps. Result The administrator can use the communication scenario you've published to create a communication arrangement. For more information, see Communication Management. You can use the generated code snippet of the SRVC in an ABAP class, pass the name of the communication scenario and if required, the name of the communication system and the outbound service to the CREATE_BY_COMM_ARRANGEMENT method. Then, perform the service call. Provides Code Snippet Service Consumption Model Generates Artifacts Outbound Service Communication Scenario Communication Arrangement Service Call in ABAP Class Communication System APIs to Adjust the Service Call (e.g. EOIO) WSDL File of the SOAP Service Developer Tasks in ADT Administrator Tasks in SAP Fiori Launchpad Related Information SOAP Outbound SOAP Development Tasks Calling the SOAP Service Call the SOAP service via a communication arrangement. Other Approaches for SOAP Outbound Communication SOAP Protocols Protocols allow you to use additional SOAP runtime features. Calling the SOAP Service Call the SOAP service via a communication arrangement. Prerequisites You have created a communication scenario. For more information, see Communication Scenario You have a service meta data file (WSDL file) for the service you want to consume. This is custom documentation. For more information, please visit SAP Help Portal. 160 1/9/25, 11:50 AM You have created and activated a service consumption model (SRVC) of type Web Service. See Generating Model Class for Remote Web Service for more information. Procedure 1. Create a corresponding outbound service of type SOAP as described in Creating Outbound Services. 2. Add the newly created outbound service to the communication scenario. See Service Consumption via Communication Arrangements for more information. Note You can't use the create_by_comm_arrangement method for SAP-delivered scenarios. 3. Publish the communication scenario. The administrator can then create the required communication management objects. For more information, see Communication Management. 4. Call the SOAP service as described in the example. Copy the code snippet from the Overview tab in your SRVC and add the comm_system_id and service_id parameters if necessary. Note the difference between synchronous and asynchronous services. According to your developed communication scenario, add the following: comm_scenario mandatory ID of the developed communication scenario comm_system_id optional ID of the configured communication system service_id optional ID of the developed outbound service Example In general, the procedure for synchronous services and asynchronous services is the same. There are only differences in the coding for calling asynchronous services: The IMPORTING parameter is missing since the service doesn't return any value. A COMMIT WORK triggers the SOAP call. Note When sending an outbound call within the ABAP RESTful Application Programming Model (RAP, you can't trigger the COMMIT WORK as the Logical Unit of Work (LUW) is handled by the RAP framework. For more information, see The RAP Transactional Model and the SAP LUW. Synchronous Services Sample Code TRY. DATA(soap_destination) = cl_soap_destination_provider=>create_by_comm_arrangement( comm_scenario = '<demo scenario>' service_id = '<service id>' comm_system_id = '<comm system>' ). DATA(proxy) = NEW zsc_co_epm_product_soap( destination = soap_destination ). DATA(request) = VALUE zsc_req_msg_type( req_msg_type-product = '<product name>' ). proxy->get_price( EXPORTING input = request This is custom documentation. For more information, please visit SAP Help Portal. 161 1/9/25, 11:50 AM IMPORTING output = DATA(response) ). "handle response CATCH cx_soap_destination_error. "handle error CATCH cx_ai_system_fault. "handle error CATCH zsc_cx_fault_msg_type. "handle error ENDTRY. Note We recommend to retrieve the correct destination reference based on the communication scenario and a customer-defined property as described in Service Consumption via Communication Arrangements . Asynchronous Services For asynchronous services, follow the same procedure as for synchronous services. The only differences in the code are the following: The IMPORTING parameter is missing since the service doesn't return any value. A COMMIT WORK triggers the SOAP call. Sample Code TRY. DATA(destination) = cl_soap_destination_provider=>create_by_comm_arrangement( comm_scenario = '<demo scenario>' * service_id = '<service id>' * comm_system_id = '<comm system>' ). DATA(proxy) = NEW zco_appointment_activity_reque( destination = destination ). DATA(request) = VALUE zappointment_activity_request1( ). proxy->appointment_activity_request_i( EXPORTING input = request ). COMMIT WORK. "to trigger async call CATCH cx_soap_destination_error. "handle error CATCH cx_ai_system_fault. "handle error ENDTRY. Test Your Outbound Call To test your outbound call, you have to provide a configuration for the outbound service you want to call in your code. This is custom documentation. For more information, please visit SAP Help Portal. 162 1/9/25, 11:50 AM Create a communication system and communication arrangement for the communication scenario in the Communication Systems and Communication Arrangements apps and maintain the required data. For more information, see Communication Management. To check if an asynchronous call was successfully sent to the provider system, see SOAP Monitoring. These tasks are performed by the administrator. Related Information SOAP Other Approaches for SOAP Outbound Communication SOAP Communication via Destination Service (Deprecated) You can call a web service with the CREATE_BY_CLOUD_DESTINATION method. SOAP Communication via URL You can call a web service by using a static URL in the code. SOAP Communication via Destination Service (Deprecated) You can call a web service with the CREATE_BY_CLOUD_DESTINATION method. To configure a SOAP-specific destination, create an HTTP destination as described in Create HTTP Destinations. Note You can use the destination service. However, this approach is deprecated. We recommend using the communication arrangement approach instead. See Calling the SOAP Service for more information. You can set web service-specific properties by maintaining the following Additional Properties in the destination: ws.soapVersion: Sets the SOAP version. ws.maxWaitTime: Sets the maximum waiting time for the consumer (in seconds). ws.compressMessage: Enables compression of the message. ws.soapAction.<operationName>: Sets the SOAP action for a given operation with name <operationName>. Sample Code TRY. DATA(lo_soap_dest) = cl_soap_destination_provider=>create_by_cloud_destination( i_name = '<destination name>' i_service_instance_name = '<destination service instance name>'). DATA(proxy) = NEW zco_appointment_activity_reque( destination = destination ). DATA(request) = VALUE zsc_req_msg_type( req_msg_type-product = '<product name>' ). proxy->get_price( EXPORTING This is custom documentation. For more information, please visit SAP Help Portal. 163 1/9/25, 11:50 AM input = request IMPORTING output = DATA(response) ). "handle response CATCH cx_soap_destination_error. "handle error CATCH cx_ai_system_fault. "handle error CATCH zsc_cx_fault_msg_type. "handle error ENDTRY. Related Information SOAP SOAP Communication via URL You can call a web service by using a static URL in the code. Instead of setting the Additional Properties as in the destination service approach, you can set them programmatically: set_soap_version( ): Sets the SOAP version. Valid values for the SOAP version are provided by the constants if_soap_destination=>soap_version_11 and if_soap_destination=>soap_version_12. set_max_wait_time( ): Sets the maximum waiting time for the consumer (in seconds). set_compress_message( ): Enables compression of messages if parameter i_compress_message is set to true. Disables compression if the parameter is set to false. set_soap_action( ): Sets the SOAP action for a given operation. Parameters are the name of the operation and the value of the SOAP action. set_url( ): Sets the URL of the endpoint. set_basic_authentication( ): Sets the authentication method to basic authentication and sets user and password. use_client_certificate( ): Sets the authentication method to client certificate authentication. The default client certificate is used. Note An existing service consumption model (SRVC) is required. Note Use the URL approach mainly for testing purposes. Call the SOAP service as described in the example. As described in Calling the SOAP Service, copy the code snippet from the Overview tab in your SRVC. Replace the CREATE_BY_COMM_ARRANGEMENT method with the CREATE_BY_URL method and pass the required URL to the method. Sample Code This is custom documentation. For more information, please visit SAP Help Portal. 164 1/9/25, 11:50 AM TRY. "replace create_by_comm_arrangement with create_by_url DATA(soap_destination) = cl_soap_destination_provider=>create_by_url( 'https://<host>/sap/bc/srt/xip/sap/<provider>/00 soap_destination->use_client_certificate( ). "generated code snippet DATA(proxy) = NEW zsc_co_service( destination = soap_destination ). DATA(request) = VALUE zsc_req_msg_type( req_msg_type-product = '<product name>' ). proxy->get_price( EXPORTING input = request IMPORTING output = DATA(response) ). "handle response CATCH cx_soap_destination_error. "handle error CATCH cx_ai_system_fault. "handle error CATCH zsc_cx_fault_msg_type. "handle error ENDTRY. Related Information Tutorial: Consume SOAP-Based Web Services with SAP BTP ABAP Environment SOAP SOAP Protocols Protocols allow you to use additional SOAP runtime features. The CL_WS_PROTOCOL_FACTORY class provides factory methods that return an interface specific to each protocol that you want to use. The exception CX_WS_PROTOCOL_ERROR is raised whenever a protocol error occurs. The following protocols are available: Adding Custom SOAP Header Elements With the web services SOAP header protocol, you can programmatically add custom XML elements to the SOAP request header. Enabling EOIO Processing With the web services sequence protocol, you can enable exactly once in order (EOIO) processing for asynchronous web services. Adding the AIR Key to a SOAP Request in the HTTP Header With the web services HTTP header protocol, you can programmatically add the Application Interface Key (AIR key) field to the HTTP header of a SOAP request. Adding Custom SOAP Header Elements This is custom documentation. For more information, please visit SAP Help Portal. 165 1/9/25, 11:50 AM With the web services SOAP header protocol, you can programmatically add custom XML elements to the SOAP request header. Context Some services can require setting specific XML elements in the SOAP header. To add such custom elements, you can use the method ADD_SOAP_HEADER_ELEMENT. Procedure 1. Create a consumer proxy by instantiating the generated class with a SOAP destination object. See Consuming a SOAP Service for more information. 2. Pass the proxy object to the factory method cl_ws_protocol_factory=>get_soap_header_protocol( ). The factory method returns a (proxy-specific) WS protocol object to adjust the SOAP header. 3. Pass the custom XML element as string to the method add_soap_header_element().. DATA(ws_soap_header_facade) = cl_ws_protocol_factory=>get_soap_header_protocol( proxy ). ws_soap_header_facade->add_soap_header_element( '<XML element>' ). Note To add multiple XML elements, call the method for each element separately. Exception Handling The API raises the exception CX_WS_PROTOCOL_ERROR, for example, if the code snippet is syntactically incorrect or if one of the following reserved namespaces is used: http://schemas.xmlsoap.org/ws/2004/08/addressing http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd http://www.w3.org/2005/08/addressing http://www.sap.com/webas/640/soap/features/messageId http://schemas.xmlsoap.org/ws/2005/02/rm http://docs.oasis-open.org/ws-rx/wsrm/200702 http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512 http://schemas.xmlsoap.org/ws/2005/02/sc http://www.sap.com/webas/630/soap/runtime/session/protocol Example The following example shows how to adjust the SOAP request header followed by the web service call. Note First, you must get a SOAP destination object according to your SAP product as described in Consuming a SOAP Service. This is custom documentation. For more information, please visit SAP Help Portal. 166 1/9/25, 11:50 AM Sample Code " Get destination object TRY. DATA(proxy) = NEW example_consumer( destination = soap_destination ). DATA xml_element TYPE string VALUE '<n0:CustomHeaderElement xmlns:n0="http://ws.example.org/ws/">' & '<n0:CustomElement>' & '<n0:value>specific info</n0:value>' & '</n0:CustomElement>' & '</n0:CustomHeaderElement>' . TRY. " Pass the proxy object to factory method and add XML element to the SOAP request header. DATA(ws_header_facade) = cl_ws_protocol_factory=>get_soap_header_protocol( proxy ). ws_header_facade->add_soap_header_element( xml_element ). CATCH cx_ws_protocol_error. " Handle error. ENDTRY. " Call server DATA(request) = VALUE example_req_msg_type( ). proxy->example_operation( EXPORTING input = request IMPORTING output = DATA(response) ). CATCH cx_ai_system_fault. " Handle error. ENDTRY. The resulting SOAP request looks like this: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Header> ... <n0:CustomHeaderElement xmlns:n0="http://ws.example.org/ws/"> <n0:CustomElement> <n0:value>specific info</n0:value> </n0:CustomElement> </n0:CustomHeaderElement> ... </env:Header> <env:Body> ... </env:Body> </env:Envelope> Related Information SOAP Enabling EOIO Processing With the web services sequence protocol, you can enable exactly once in order (EOIO) processing for asynchronous web services. Context This is custom documentation. For more information, please visit SAP Help Portal. 167 1/9/25, 11:50 AM It can sometimes be important that service requests arrive at the provider side in the correct order. This is the case when database entries that depend on a previous write process are being written. If a database entry is changed that has not yet even been created, errors occur. To ensure that calls are processed in the correct order, calls that belong together are given a sequence and then are evaluated by the provider. If proxy object methods are called as part of a sequence, these calls are processed 'exactly once in order' (EOIO). If the proxy object methods are called without sequence, the methods are called 'exactly once' without a particular order. To enable EOIO processing, proceed as follows. Procedure 1. Create a consumer proxy by instantiating the generated class with a SOAP destination object. See Consuming a SOAP Service for more information. 2. Pass the proxy object to the factory method cl_ws_protocol_factory=>get_sequence_protocol( ). The factory method returns a (proxy-specific) WS protocol object. 3. To enable EOIO processing, use the methods ws_sequence_facade->begin_eoio_sequence( ) and ws_sequence_facade->end_eoio_sequence( ). The proxy calls in between these two methods are processed EOIO. 4. Use COMMIT WORK to trigger web service calls in the EOIO sequence block. Sample Code DATA(ws_sequence_facade) = cl_ws_protocol_factory=>get_sequence_protocol( proxy ). ws_sequence_facade->begin_eoio_sequence( ). <WS calls to be executed EOIO> ws_sequence_facade->end_eoio_sequence( ). Note If there are multiple begin/end_eoio_sequence blocks, the corresponding sequences are executed independently of each other. All messages within a sequence are still executed exactly once in order. Example Note First, you must get a SOAP destination object according to your SAP product as described in Consuming a SOAP Service. Sample Code " Get destination object TRY. DATA(proxy) = NEW zco_appointment_activity_reque( destination = destination ). DATA(ws_sequence_facade) = cl_ws_protocol_factory=>get_sequence_protocol( proxy ). " Begin EOIO sequence ws_sequence_facade->begin_eoio_sequence( ). DATA(request1) = VALUE zco_appointment_activity_reque( ). proxy->check_operation( EXPORTING This is custom documentation. For more information, please visit SAP Help Portal. 168 1/9/25, 11:50 AM input = request1 ). DATA(request2) = VALUE zco_appointment_activity_reque( ). proxy->check_operation( EXPORTING input = request2 ). " End EOIO sequence. ws_sequence_facade->end_eoio_sequence( ). COMMIT WORK. CATCH cx_ws_protocol_error "handle response CATCH cx_ai_system_fault. "handle error CATCH cx_srt_check_oper_fault. "handle error ENDTRY. Related Information SOAP Adding the AIR Key to a SOAP Request in the HTTP Header With the web services HTTP header protocol, you can programmatically add the Application Interface Key (AIR key) field to the HTTP header of a SOAP request. Context If your application calls an SAP SOAP API, the Application Interface Key must be part of the request. The Application Interface Key is passed in the HTTP header. For SOAP requests, you can do this with the HTTP header protocol. To add this field, you can use the method SET_FIELD of the interface IF_WS_HTTP_HEADER_FACADE. Note It isn't possible to add a field other than the Application Interface Key field. Once a web service call is performed, the custom HTTP header is reset. If you want to use the same value again, you must set the value again. Procedure 1. Create a consumer proxy by instantiating the generated class with a SOAP destination object. See Consuming a SOAP Service for more information. 2. Pass the proxy object to the factory method cl_ws_protocol_factory=>get_http_header_protocol( ). The factory method returns a (proxy-specific) WS protocol object to adjust the HTTP header. 3. Pass the name of the HTTP header field and value as string to the method set_field().. Sample Code DATA(header) = cl_ws_protocol_factory=>get_http_header_protocol( io_proxy = proxy ). header->set_field( iv_name = if_ws_http_header_facade=>co_field_appl_interface_key iv_value This is custom documentation. For more information, please visit SAP Help Portal. 169 1/9/25, 11:50 AM Example Note After executing a service call, the field value is initialized by the SOAP runtime. Therefore, you have to set the HTTP field values for each service call with the SET_FIELD method. Sample Code " Get destination object TRY. DATA(destination) = cl_soap_destination_provider=>create_by_comm_arrangement( comm_scenario = 'HTTP_HEADER' ). DATA(proxy) = NEW zco_srt_test_provider( destination = destination ). " Pass the proxy object to factory method to obtain an instance of the HTTP header protocol DATA(header) = cl_ws_protocol_factory=>get_http_header_protocol( io_proxy = proxy ). " First service call " Add HTTP field to the SOAP request. header->set_field( iv_name = if_ws_http_header_facade=>co_field_appl_interface_key iv_value " Call service DATA(request) = VALUE zrfc_system_info( ). proxy->rfc_system_info( EXPORTING input = request IMPORTING output = DATA(response) ). " Second service call " Add HTTP field to the SOAP request. header->set_field( iv_name = if_ws_http_header_facade=>co_field_appl_interface_key iv_value " Call service DATA(request) = VALUE zrfc_system_info( ). proxy->rfc_system_info( EXPORTING input = request IMPORTING output = DATA(response) ). CATCH cx_ws_protocol_error INTO DATA(lx_protocol_error). " Handle protocol error CATCH cx_soap_destination_error INTO DATA(lx_error). " Handle destination error CATCH cx_ai_system_fault INTO DATA(lx_fault). " Handle system fault ENDTRY. Related Information SOAP Outbound SOAP Administration Tasks Context To consume SOAP services in the ABAP environment, you have to create a corresponding runtime configuration in the Communication Management apps in SAP Fiori launchpad. Procedure 1. Create a communication system. For more information, see Communication System. This is custom documentation. For more information, please visit SAP Help Portal. 170 1/9/25, 11:50 AM 2. Create a communication arrangement based on your outbound SOAP communication scenario. For more information, see Communication Arrangement. Results A developer can now perform the SOAP service call as described in Calling the SOAP Service. SOAP Monitoring When calling asynchronous SOAP services as described in Calling the SOAP Service, you can check if the call has been sent to the receiver using the Message Monitoring Overview app. Prerequisites sYou can find error logs related to SOAP services in the SOAP Error Log application. To monitor asynchronous SOAP calls, use the Message Monitoring Overview app. To use the app, the following is required. Roles based on the following business catalogs are assigned to your user in SAP Fiori launchpad: SAP_CA_BC_COM_ERR_PC SAP_CA_BC_COM_CONF_PC The user is a recipient of the /SPRX name space. You can manage this in the Assign Recipients to Users app. Procedure 1. Create a Service Consumption Model (SRVC) of type Web Service as described in Generating Model Class for Remote Web Service. 2. Activate the SRVC. This creates a so-called AIF interface in the Message Monitor Overview app. Note For every operation in your web service, a new AIF interface is generated. 3. Open the Message Monitoring Overview app. 4. Select the relevant AIF interface. Results You've created an AIF interface for each operation in your asynchronous web service. When you call an operation, you can monitor it in the Message Monitor Overview app. Related Information Consuming a SOAP Service SOAP Error Log, OData Error Log, and Event Error Log (SAP BTP) SOAP Error Log, OData Error Log, and Event Error Log (SAP S/4HANA Cloud Public Edition) Authorization Basics (SAP BTP) Authorization Basics (SAP S/4HANA Cloud Public Edition) Business Catalogs (SAP BTP) Business Catalogs (SAP S/4HANA Cloud Public Edition) This is custom documentation. For more information, please visit SAP Help Portal. 171 1/9/25, 11:50 AM Assign Recipients to Users (SAP BTP) Assign Recipients to Users (SAP S/4HANA Cloud Public Edition) Message Monitoring Overview (SAP BTP) Message Monitoring Overview (SAP S/4HANA Cloud Public Edition) Data Integration Data integration addresses the data exchange between two or more communication partners without a relation to a business process. Learn how you can enable inbound and outbound data integration using SQL services and external entities. Enabling Inbound Data Integration Using SQL Services By exposing SQL services for data integration, you can access CDS view entities in an ABAP system. As a result, you can use SQL statements in external analytical tools to access data in database tables that reside in an ABAP system. Enabling Outbound SQL Access Using an External Entity With external entities and logical external schemas in SQL, you can query data from other remote data stores. Access to these remote systems is managed using SAP HANA Smart Data Access. Enabling Inbound Data Integration Using SQL Services By exposing SQL services for data integration, you can access CDS view entities in an ABAP system. As a result, you can use SQL statements in external analytical tools to access data in database tables that reside in an ABAP system. Depending on the product that you use, you can expose SQL services for data federation, for data replication, or both. For accessing the data in data federation scenarios, you can use external analytical tools that support the driver for the open database connectivity (ODBC), a standard API for accessing databases. Alternatively, for data federation and for data replication, you can also use SAP Datasphere as analytical tool. Related Information Accessing ABAP-Managed Data Using SQL Services for Data Integration Scenarios (in the SAP BTP, ABAP environment documentation) Accessing ABAP-Managed Data Using SQL Services for Data Integration Scenarios (in the SAP S/4HANA Cloud Public Edition documentation) Accessing ABAP-Managed Data From External ODBC-Based Clients (in the SAP S/4HANA documentation) Enabling Outbound SQL Access Using an External Entity With external entities and logical external schemas in SQL, you can query data from other remote data stores. Access to these remote systems is managed using SAP HANA Smart Data Access. An external entity can be used to retrieve data from an external system. The external entity is a design-time CDS object that represents a specific data source in another system. The connection between an external entity and the external system is configured using a logical external schema. A logical external schema is a CDS object that maps an external entity to a specific database schema in a remote database system. A logical external schema can be linked with one or more external entities. This is custom documentation. For more information, please visit SAP Help Portal. 172 1/9/25, 11:50 AM The connection to an external system is managed using SAP HANA Smart Data Access. SAP HANA Smart Data Access is a technology that enables the SAP HANA database to access and query data from other remote data stores based on a data federation approach. External communication is performed with the Open Database Connectivity (ODBC) protocol. The artifacts implicitly created during this procedure are SAP HANA remote sources and SAP HANA virtual tables. More Information External Entities (in the ABAP Data Models documentation) Event-Based Integration Get an overview of integrating the Enterprise Event Enablement framework into your ABAP system. The Enterprise Event Enablement framework enables the exchange of events across different platforms for seamless event-driven communication. To successfully exchange events between the respective event exchange infrastructure and an ABAP environment system, an upright connection is required. This connection is maintained by the Enterprise Event Enablement framework during the creation of the corresponding Communication Management artifacts like Communication Arrangements and Communication Systems. You can publish events triggered from ABAP environment applications through RAP Business Events and consume events delivered through the respective event exchange infrastructure from external applications. Depending on your use case, you can choose between the following event exchange infrastructures: SAP Event Mesh (Integration with SAP Event Mesh) SAP Advanced Mesh Service Plan (Integration with Advanced Mesh Service Plan for Service Cloud) SAP Cloud Application Event Hub (Integration with SAP Cloud Application Event Hub) The respective event exchange infrastructure service provided on the SAP Business Technology Platform is a service providing real-time messaging capabilities. All events are exposed in a standard way with a well-defined hierarchy and metadata so they can easily be consumed on different platforms. Find more information about the exchange of events here: Event-Based Integration. Prerequisites The following prerequisites must be met to integrate the Enterprise Event Enablement: You have a subaccount in the SAP BTP. Refer to Getting Started. You have created a service instance for SAP Event Mesh, SAP Cloud Application Event Hub or SAP Advanced Mesh Service Plan. The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Communication Management The Communication Management app helps you to integrate your system with SAP BTP, Cloud Foundry environment systems to enable data exchange. This is custom documentation. For more information, please visit SAP Help Portal. 173 1/9/25, 11:50 AM You can use a communication scenario ID to configure a connection with SAP Event Mesh, SAP Cloud Application Event Hub or SAP Advanced Mesh Service Plan to enable the exchange of events. Note For SAP S/4HANA Cloud, you can use the SAP_COM_0092, SAP_COM_0892 and SAP_COM_0492 communication scenario IDs to configure a connection. Note For the SAP Business Technology Platform, you can use the SAP_COM_0092 and the SAP_COM_0492 communication scenario IDs to configure a connection. To set up a communication scenario using the Communication Management app, follow the steps in the following topics: Checking Business Event Handling (1NN) Scope Item (Only relevant for SAP S/4HANA Cloud) Creating a Technical Communication User To set up the communication arrangement, refer to the respective topics in: Integration with SAP Event Mesh Integration with SAP Cloud Application Event Hub (Only relevant for SAP S/4HANA Cloud) Integration with Advanced Mesh Service Plan for Service Cloud Checking Business Event Handling (1NN) Scope Item The Business Event Handling (1NN) scope item must be active to use the Communication Management app. Prerequisites You have a subaccount in the SAP BTP. Refer to Getting Started. You have created a service instance for SAP Event Mesh, SAP Cloud Application Event Hub or SAP Advanced Mesh Service Plan. The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Context The Business Event Handling (1NN) scope item must be active. Depending on your configuration environment for the ABAP environment, choose one of the following options to check the status. Procedure Define your Scope In the ABAP environment system, in the SAP Fiori launchpad, open the Define Your Scope app. Search for XX_1NN. This is custom documentation. For more information, please visit SAP Help Portal. 174 1/9/25, 11:50 AM Manage Your Solution In the ABAP environment system, in the SAP Fiori launchpad, open the Manage Your Solution app. Go to View Solution Scope. Search for XX_1NN. SAP Central Business Configuration In the Scope and Organizational Structure phase, navigate to the Activities tab. Search for Define Scope. Choose Open. Results The scope item should be active. If the scope item is not active, request the activation using the XX-S4C-OPR-SRV BCP ticket component. For more information, see Setting Up Business Event Handling (1NN) . Creating a Technical Communication User You use this procedure to create a communication user for inbound communication. Prerequisites You have a subaccount in the SAP BTP. Refer to Getting Started. If you are working in SAP BTP, ABAP environment, you need a service instance for SAP Event Mesh or SAP Advanced Mesh Service Plan. The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Context A communication user enables the integration with other solutions. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, choose the Maintain Communication Users artifact. 3. Choose New to create a new user. 4. Enter a User Name for the user. 5. Enter a Description for the user. 6. Assign a Password for the user. 7. Choose Create. 8. Make a note of the User Name. The user name is required when you create the communication arrangement. This is custom documentation. For more information, please visit SAP Help Portal. 175 1/9/25, 11:50 AM Results You have created a communication user. It is listed in the Maintain Communication Users artifact. CloudEvents Context Attributes Events published through the Enterprise Event Enablement are compliant with the CloudEvents specification. Context attributes contained in events are listed in this topic. The following table lists required and optional context attributes of the CloudEvents specification (Cloud Events Context Attribute Requirement Description id required identifies the event instance source required identifies the issuer of the event ). containing: region the region where the application service is located value: default applicationNamespace the registered namespace of the application, which emits the event value sap.s4.beh for SAP released events sap.abap.custom for events created by customers instanceID identifier of the application instance issuing the event value: represented through the cloud landscape directory (CLD) tenant ID of the system tenant. Note All contained values are set for events published in SAP S/4HANA Cloud. specversion required specifies the version of the CloudEvents specification, which the event uses currently: 1.0 type required specifies the type of event datacontenttype optional content type of the event time optional timestamp of the occurrence of the event data optional business payload of the event This is custom documentation. For more information, please visit SAP Help Portal. 176 1/9/25, 11:50 AM Tip You can use the Converter for CloudEvents to AsyncAPI to convert your CloudEvents event payload in JSON into a corresponding AsyncAPI catalog. See: Converter for CloudEvents to AsyncAPI . Integrating Event Exchange Infrastructures Integration with SAP Event Mesh This section describes the integration of the Enterprise Event Enablement with the integration scenario SAP_COM_0092. Integration with Advanced Mesh Service Plan for Service Cloud With the SAP Event Mesh Advanced Plan, you can connect directly to your own SAP Advanced Event Mesh (AEM) instance. You can use SAP Event Mesh Advanced Plan for very large projects, where performance is crucial. Integration with SAP Cloud Application Event Hub This section describes the integration of the Enterprise Event Enablement with the integration scenario SAP_COM_0892. Direct Push-Based Integration With direct push-based integration, you can connect neighboring ABAP Systems with each other. Integration with SAP Event Mesh This section describes the integration of the Enterprise Event Enablement with the integration scenario SAP_COM_0092. Note The SAP Event Mesh is also referred as SAP Enterprise Messaging 1.0 for Cloud Foundry. When working in an SAP S/4HANA Cloud system, it is mandatory that the scope item Business Event Handling (1NN) is active. Refer to Checking Business Event Handling (1NN) Scope Item. Communication Arrangements for SAP Event Mesh When you work with SAP Event Mesh, a communication arrangement is required. To use a communication arrangement, you need to create a service instance for the SAP Event Mesh. The service instance contains all information required to establish a connection. This required information, such as endpoints and credentials, is stored in the service key. The Enterprise Event Enablement extracts the information of the service key and creates the corresponding destination and OAuth 2.0 client configuration automatically. Creating Communication Arrangements for SAP Event Mesh In this topic, a communication arrangement is created. Prerequisites You have a subaccount in the SAP BTP. Refer to Getting Started. You have created a service instance for SAP Event Mesh. If you haven't created a service instance before, refer to Creating an Event Mesh Instance Using the Default Plan. This is custom documentation. For more information, please visit SAP Help Portal. 177 1/9/25, 11:50 AM Note When defining the Service Descriptor for the service instance of the SAP Event Mesh service, make sure that the length of the namespace property does not exceed the maximum of 24 characters. For more information about the syntax, see Syntax for Service Descriptor. The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Context Create a communication arrangement to enable the exchange of events. Note Events can only be published if the topic space matches the namespace of the SAP Event Mesh service. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Communication Arrangements artifact. 3. Choose New to create a new communication arrangement. 4. Enter or select the Scenario SAP_COM_0092 (communication scenario ID) for Enterprise Eventing Integration. 5. Adapt the Arrangement Name. 6. To specify additional properties, proceed as follows: You can either use the default values and can ignore the following substeps. To maintain additional properties, choose the Additional Properties button and see the following substeps. a. Specify the Channel name. The Channel name is required in the next steps to configure topic bindings. Note Optional. If the Channel name is not specified, the Channel name equals the Arrangement Name. The channel name is used as a key in all Enterprise Event Enablement SAP Fiori applications. b. Enter a Description. Note Optional. If you don't enter a description, this field will be filled with a default description similar to Channel CHANNEL_NAME for Enterprise Event Enablement. c. Enter the Topic Space. Note Optional. The Topic Space is extracted from the service key. d. Enter the QoS (Quality of Service) value. The default QoS value is 1. Note Optional. This is custom documentation. For more information, please visit SAP Help Portal. 178 1/9/25, 11:50 AM 0 1 At most once delivery. At least once delivery. The message is delivered according to the capabilities of This Quality of Service ensures that the message arrives the underlying network. No response is sent by the at the SAP Event Mesh at least once. receiver and no retry is performed by the sender. The message arrives at the SAP Event Mesh either once or not at all. e. Enter the Reconnect Attempts value. The default value of the reconnection attempts is 0. Note Optional. The reconnect attempts value is the number of attempts the Enterprise Event Enablement framework tries to reestablish the connection if the connection is lost. If the value is 0, the framework tries to reconnect infinitely (until the connection is reestablished). If any value greater than 0 is specified, the framework tries to reestablish the connection as many times as specified. If the connection is not established after reaching the specified reconnect attempts, the communication arrangement and the underlying channel are deactivated. You can reactivate the communication arrangement and channel by selecting the corresponding communication arrangement and choosing Reactivate. a. Define the Reconnect wait time(sec). The default wait time for reconnection is 10 seconds. Note Optional. The Enterprise Event Enablement framework waits for the mentioned time (in seconds) and then tries to reconnect. The value entered here is the initial wait time. For all subsequent wait times, the Enterprise Event Enablement framework increases the wait time according to the internal logic. If the attempts fail, the framework increases the wait time until the reconnect wait time (1800 seconds) is reached. 7. Choose Close to confirm your entries. 8. Select a Communication User. For information about how to create a communication user, see Creating a Technical Communication User. 9. Enter the Service Key. 10. Choose Create. Note The connection is checked automatically. If the check fails, the communication arrangement is not created and the end user is informed about the failure reasons. The edit page is opened. 11. Optional: In the Outbound Services section, under Delivery of Events, you can unmark the Active checkbox to save the communication arrangement in status "inactive". This can be useful, for example, if you want to complete the allowlisting before activating the communication arrangement. To activate the communication arrangement at a later time, open the edit screen again and set the mark for the Active checkbox. 12. Choose Save. After saving the communication arrangement, the channel is activated and the connection is established. The result of the connection test is displayed in the message view on the bottom left. This is custom documentation. For more information, please visit SAP Help Portal. 179 1/9/25, 11:50 AM Results You have created a communication arrangement. Note To maintain inbound and outbound bindings, refer to Configuration of Event Publishing and Event Consumption Scenarios. Maintaining Communication Arrangements for SAP Event Mesh In this topic, a communication arrangement is maintained. Prerequisites The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Context After creating a communication arrangement, you can still change parameters, either via a service key or by entering parameters manually. You can change the default values for the Quality of Service (QoS), the number of reconnect attempts, the reconnect wait time, and the topic space. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Communication Arrangements artifact. 3. Select the communication arrangement you want to maintain. Update by Service Key 4. To change connection details, click the Update by Service Key button. 5. Enter the service key with the new connection details. 6. Choose Update to save your entries. Update Additional Properties 7. Note Updating via the additional properties reactivates the communication arrangement and channel (if deactivated). To change additional properties, choose Edit. 8. To save your changes, choose Save. Results You have maintained a communication arrangement. Deleting Communication Arrangements for SAP Event Mesh This is custom documentation. For more information, please visit SAP Help Portal. 180 1/9/25, 11:50 AM In this topic, a communication arrangement is deleted. Prerequisites The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Context After creating a communication arrangement, you can still delete the communication arrangement. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Communication Arrangements artifact. 3. Select the checkbox of the communication arrangement you want to delete. 4. Choose Delete. Results You have deleted a communication arrangement. Note When a communication arrangement is deleted, all events belonging to the channel ‒ including those that have not yet been successfully published to the event exchange service ‒ are deleted from the event queue. Additionally, the configuration for the underlying channel, such as inbound and outbound bindings, is deleted. Next Steps After deleting the communication arrangement, you need to delete the communication system belonging to the communication arrangement manually. Queue Subscriptions Published events can be consumed at the SAP Event Mesh. Events published to a queue defined in your SAP Event Mesh service instance can also be consumed in your ABAP system. Queues can be used to buffer events until a consumer can process them. For the right events to arrive at a queue, the queue must be subscribed to the corresponding topics. A consumer can then subscribe to the queue. Context Once a queue has been subscribed to the corresponding topic and you have subscribed to the queue, you can view the list of applications and service instances. The SAP Event Mesh dashboard enables you to create queues and bind incoming message topics to such queues. Note The syntax used to compose topics and the payload for business events supports the standardized CloudEvents format (Cloud Events ). This is custom documentation. For more information, please visit SAP Help Portal. 181 1/9/25, 11:50 AM For more information about the syntax, see also Syntax for Service Descriptor. Ensure that the pattern of the topic, to which the queue is subscribed, consists of the following three parts: Name Topic namespace Description Contains three segments: vendor, product information, and a technical identifier. The topic namespace originates from the namespace of the service key created for the respective SAP Event Mesh instance. Note When defining the Service Descriptor for the service instance of the SAP Event Mesh service, make sure that the length of the namespace property does not exceed the maximum of 24 characters. Abbreviation Value ce for cloud events Event topic Value as displayed in the value help in the previous Outbound Topic Binding configuration step. You can also use wildcards, such as <namespace>/*. Example If you want to create a queue-topic subscription for the sap/s4/beh/businesspartner/v1/BusinessPartner/Changed/v1 event topic, you need to add the topic namespace and the ce abbreviation at the beginning of the topic: <namespace>/ce/sap/s4/beh/businesspartner/v1/BusinessPartner/Changed/v1. Related Information Manage Queue Subscriptions Configuration of Event Publishing and Event Consumption Scenarios CloudEvents Context Attributes Integration with Advanced Mesh Service Plan for Service Cloud With the SAP Event Mesh Advanced Plan, you can connect directly to your own SAP Advanced Event Mesh (AEM) instance. You can use SAP Event Mesh Advanced Plan for very large projects, where performance is crucial. If you have a valid subscription to the SAP Integration Suite, advanced event mesh, you can use the Virtual Message Router (VMR) endpoint of SAP AEM broker obtained from the SAP AEM Console UI. The SAP AEM's validation service then only checks if a valid SAP AEM broker instance is available. If a valid SAP AEM instance is available, a direct connection to this instance is established. This section describes the integration of the Enterprise Event Enablement with the communication scenarios SAP Advanced Event Mesh Integration (SAP_COM_0492) and SAP Advanced Event Mesh Validation Service Integration (SAP_COM_0493). The communication scenario SAP_COM_0492 is the prerequisite for SAP_COM_0493. To integrate with the SAP Advanced Event Mesh service, you need to create one communication arrangement of both scenarios. For the integration of an ABAP Platform Cloud tenant, you require a subscription to the SAP Advanced Event Mesh service and to the SAP AEM Validation service. This is custom documentation. For more information, please visit SAP Help Portal. 182 1/9/25, 11:50 AM Note In your S/4 HANA Cloud system, the scope item Business Event Handling (1NN) must be active. Refer to Checking Business Event Handling (1NN) Scope Item. Uploading the Client Certificate Context To connect your system with the SAP AEM broker, you need to upload the client certificate to the SAP AEM broker. Procedure 1. To prepare the Client Certificate, proceed as follows: a. On the SAP Fiori launchpad, open the app Maintain Client Certificate. b. Open the Client Default from the Client Certificates list. c. Choose Export. d. On the Export Certificate dialog box, choose the X.509 Certificate (.pem) format. e. Choose Export. 2. Note You need both the client and the root certificate. The root certificate can be extracted from the client certificate. To access the root certificate, you must download the client certificate again in the crt-format and then extract the root certificate from this file. To prepare the root certificate, proceed as follows: a. In the Maintain Client Certificate app, for the Client Default, choose Export again. b. On the Export Certificate dialog box, choose the Base-64-encoded X.509 certificate (.crt) format. Note The root certificate must be extracted from the crt-file. The procedure depends on whether you work on a Windows or on a Mac computer. 3. To prepare the root certificate on a Windows computer, proceed as follows: a. Double-click on the downloaded crt-file, or right click on the file and choose Open. b. Open the Details tab. c. Choose the Copy to File... button, then choose Next. d. Select the Base-64 encoded X.509 (.CER) format, and choose Next. e. Enter a file name and browse for a location, then choose Next. f. Choose Finish. 4. To prepare the Root Certificate on a Mac computer, proceed as follows: a. Open the Keychain app. b. Search for SAP. c. Select the correct root certificate. Make sure to select the correct root certificate. This is custom documentation. For more information, please visit SAP Help Portal. 183 1/9/25, 11:50 AM d. Right-click on it and select Export <name of certificate>. e. Select the Privacy Enabled Mail (.pem) format. f. choose Save. 5. To upload the certificate to the SAP AEM broker, proceed as follows: a. Open the SAP AEM broker UI console. b. On the Manage tab, choose the Certificate Authorities tile. c. Choose the Add Client Certificate Authority button. d. Provide a Certificate Authority Name. e. Copy the content of the client certificate you downloaded from your system before. f. Paste the the content into Client Certificate Content field. g. Choose Save. 6. To upload the root certificate, proceed in the same way as for the client certificate. 7. In the AEM broker, ensure to enable Manage Authentication Client Certificate Authentication . 8. In the section Access Control, create and enable a client username that matches the common name (CN) of the client certificate you imported in AEM. For more information on configuring certificates in AEM, see Configuring Client Certificate Authentication . Creating a Communication Arrangement for the Advanced Event Mesh Integration Scenario (SAP_COM_0492) Context This communication arrangement is the prerequisite for the AEM Validation Service (SAP_COM_0493). Procedure To create a communication arrangement, proceed as follows: 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Communication Arrangements artifact. 3. Choose New. 4. Enter or select the Scenario SAP_COM_0492 (communication scenario ID) for SAP Integration Suite, Advanced Mesh Integration. 5. Adapt the Arrangement Name. 6. Choose Create. a. Specify the Channel name. The Channel name is required in the next steps to configure topic bindings. b. Enter a Description. Note Optional. c. Enter the Topic Space. The topic space is the identifier for events that originate from the same source. Note Mandatory. The topic space has to match regex: [A-Za-z0-9]{1,}(/[A-Za-z0-9\-.]{1,}){2} This is custom documentation. For more information, please visit SAP Help Portal. 184 1/9/25, 11:50 AM Segments: exactly three (firstSegment/secondSegment/thirdSegment) Allowed characters: First segment: [a-zA-Z0-9] Hyphens and dots aren't allowed. Recommended value: Default. Second segment: [a-zA-Z0-9-.] Starts with a character or number. Followed by . or Must contain at least one character or number before or after the period or hyphen. Third segment: [a-zA-Z0-9-.] Use the same guidelines given for the second segment. Max Length: 24 Tip You can enable a sender verification for your Advanced Event Mesh instance by configuring the access control per client in the SAP Integration Suite, advanced event mesh. The following steps are required in your Advanced Event Mesh instance: i. Choose Access Control ACL Profiles . ii. Select the client profile for which you want to configure the ACL profile. iii. Choose Publish Topic. iv. Select Disallow as Publish Default Action. v. Choose the + Exception button. vi. Enter the topic space of the event channel in your system and a wildcard. For example: topic space/> with SMF or topic space/# with MQTT. For more information, refer to Using Client Profiles and Client Usernames . d. Enter the QoS (Quality of Service) value. The default QoS value is 1. Note Optional. 0 1 At most once delivery. At least once delivery. The message is delivered according to the capabilities of This Quality of Service ensures that the message arrives the underlying network. No response is sent by the at the SAP AEM broker at least once. receiver and no retry is performed by the sender. The message arrives at the SAP AEM broker either once or not at all. This is custom documentation. For more information, please visit SAP Help Portal. 185 1/9/25, 11:50 AM e. Enter the Number of Publish Connections. Defines the number of available parallel connections for publishing events to the SAP AEM broker for this channel. The default value is 1, the maximum value is 10. Note Optional. f. Enter the Reconnect Attempts value. The default value of the reconnection attempts is 0. Note Optional. The reconnect attempts value is the number of attempts the Enterprise Event Enablement framework tries to reestablish the connection if the connection is lost. If the value is 0, the framework tries to reconnect infinitely (until the connection is reestablished). If any value greater than 0 is specified, the framework tries to reestablish the connection as many times as specified. If the connection is not established after reaching the specified reconnect attempts, the communication arrangement and the underlying channel are deactivated. You can reactivate the communication arrangement and channel by selecting the corresponding communication arrangement and choosing Reactivate. g. Enter the Reconnect wait time in seconds. Note Optional. The default time is 10 seconds. To create a communication system, proceed as follows: 7. In the Common Data section, press New to create a Communication System. 8. In the New Communication System dialog box, proceed as follows: a. Enter the System ID. b. Enter the System Name. c. Choose Create. 9. In the General tab, in the Host Name field, enter the host name of the AMQP connectivity endpoint specified in the cluster manager of the broker instance. In your AEM UI Console, open the Connect tab. Find the destination URL under Host Connection Details Secured AMQP Copy the host name only. Example In this destination URL example: amqps://mr-connection-demo4xyz.messaging.solace.cloud:1234 The host name is: mr-connection-demo4xyz.messaging.solace.cloud 10. Copy the digits from end part of the URL into the Port field. Example In the above mentioned destination URL example, the port number is 1234. 11. In the Users for Inbound Communication tab, press +. This user is used to run the background process that keeps the connection up and running. 12. In the New Inbound Communication User dialog box, proceed as follows: This is custom documentation. For more information, please visit SAP Help Portal. 186 1/9/25, 11:50 AM a. Choose the Authentication Method User Name and Password. b. Enter the User Name. c. Enter a Description. d. Choose the Propose Password button. e. Choose Create. f. Choose OK. 13. In the Users for Outbound Communication tab, press +. 14. In the New Outbound User dialog box, proceed as follows: a. Choose the Authentication Method SSL Client Certificate. b. Choose the Client Default for the Client Certificate from the value help. c. Choose Create. 15. Choose Save to save the communication system. 16. Choose Save to save the communication arrangement. Note Note The connection to the SAP Advanced Event Mesh only becomes active after creation of SAP_COM_0493. Creating a Communication Arrangement for the Advanced Event Mesh Validation Service Integration (SAP_COM_0493) Context This communication arrangement is needed to validate the SAP AEM broker destination URL. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Communication Arrangements artifact. 3. Choose New to create a new communication arrangement. 4. Enter or select the Scenario SAP_COM_0493 (communication scenario ID) for SAP AEM Validation Service. 5. Adapt the Arrangement Name. 6. Choose the Additional Properties button. a. For Channel, enter the name of the first channel you created in the previous chapter (SAP_COM_0492). 7. Choose Close to confirm your entries. 8. Enter the Service Key. You find the service key in your SAP BTP subaccount under View Credentials. 9. Choose Create. To check the connection, proceed as follows: This is custom documentation. For more information, please visit SAP Help Portal. 187 1/9/25, 11:50 AM 10. In the Communication Management app, go to Communication Arrangements. 11. Open the SAP_COM_0492 channel you created before. 12. Under Outbound Services, choose the Check Connection button. The connection is tested. You get a status message from the Fiori launchpad whether the connection check was succesful. Results Note To maintain inbound and outbound bindings, refer to Configuration of Event Publishing and Event Consumption Scenarios. Integration with SAP Cloud Application Event Hub This section describes the integration of the Enterprise Event Enablement with the integration scenario SAP_COM_0892. Communication Arrangements Creating Communication Arrangements Deleting Communication Arrangements Creating Communication Arrangements Prerequisites The SAP Cloud Application Event Hub standard application is subscribed in your SAP Business Technology Platform cockpit subaccount. For more information, see Subscribing to SAP Cloud Application Event Hub Application. You have global admin privileges and can access System Landscape in your SAP Business Technology Platform global account. Later you’ll need to find the AMQP URL that’s available in the Formations tab. The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Procedure 1. Log on to the SAP Fiori launchpad. Create a communication arrangement 2. In the Communication Management app, select the Communication Arrangements artifact. 3. Choose New. 4. Enter or select the Scenario SAP_COM_0892 (communication scenario ID) for SAP Cloud Application Event Hub. 5. Adapt the Arrangement Name. 6. Choose Create. Create a communication system This is custom documentation. For more information, please visit SAP Help Portal. 188 1/9/25, 11:50 AM 7. In the Common Data section, press New to create a Communication System. 8. In the New Communication System dialog box, proceed as follows: a. Enter the System ID. b. Enter the System Name. c. Choose Create. 9. In the General tab, enter the destination URL of the SAP Cloud Application Event Hub application in the Host Name field. In your SAP BTP cockpit global account, select System Landscape and then open the Formations tab. Under System Name, select the relevant single tenant application. In the Configurations for System "…", in the Configuration Provider list, find the Event Broker. Choose the Action icon on the right side to display the JSON code containing the AMQP URL. Copy the host name only. Example In this AMQP URL example: { "amqpGatewayURL": "wss://amqp-gateway.canary.beb.em.services.cloud.sap/protocols/amqp The host name is: amqp-gateway.canary.beb.em.services.cloud.sap 10. In the Users for Inbound Communication tab, press +. 11. In the New Inbound Communication User dialog box, proceed as follows: a. Choose the Authentication Method User Name and Password. b. Enter a User Name / Client ID. Proceed as follows: Choose a User Name / Client ID from the value help. Create a New User by choosing New User. Enter the User Name. Enter a Description. Press the Propose Password button. Choose Create. Note This user is used to run the background process that keeps the connection up and running. c. Choose OK. 12. In the Users for Outbound Communication tab, press +. 13. In the New Outbound User dialog box, proceed as follows: a. Choose the Authentication Method SSL Client Certificate. b. Choose the Client Default for the Client Certificate from the value help. c. Choose Create. 14. Choose Save to save the communication system. Finalize the communication arrangement 15. In the Additional Properties section, enter the Channel name. If the Channel name is not specified, the Channel name equals the Arrangement Name. The channel name is used as key in all Enterprise Event Enablement SAP Fiori applications. 16. In the Outbound Services section, add the path of the AMQP URL. The path is everything after the hostname in the AMQP URL. This is custom documentation. For more information, please visit SAP Help Portal. 189 1/9/25, 11:50 AM Example In this AMQP URL example: wss://amqp-gateway.canary.beb.em.services.cloud.sap/protocols/amqp10ws?em-tenant=bb4b7e The path is: /protocols/ampq10ws?em-tenant=bb4b7ece-7b00-47be-a7a3-368ce9a1f765. 17. Choose Save. Results You have created a communication arrangement. Related Information Enabling SAP Event Subscriptions Deleting Communication Arrangements Prerequisites You've created a communication arrangement. Refer to Creating Communication Arrangements. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Communication Arrangements artifact. 3. Select the checkbox of the communication arrangement you want to delete. 4. Note If you delete the communication arrangement, you’ll break the event integration. Deleting the communication arrangement closes the AMQP connection and events are no longer delivered to your communication system. For more information, see SAP Note 3287352 . Choose Delete. Results You have deleted a communication arrangement. Note When a communication arrangement is deleted, all events belonging to the channel ‒ including those that have not yet been successfully published to the event exchange service ‒ are deleted from the event queue. Additionally, the configuration for the underlying channel, such as inbound and outbound bindings, is deleted. Checking Event Publishing and Event Consumption Scenarios This topic describes how to check the channel bindings for the Enterprise Event Enablement. This is custom documentation. For more information, please visit SAP Help Portal. 190 1/9/25, 11:50 AM Prerequisites An event consumer is available. For more information about creating event consumers, see Enabling Event Consumption for an Event Consumption Model. Context Configure the integration with the SAP Cloud Application Event Hub instance. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Select the Channel name of the corresponding SAP_COM_0892 communication arrangement. In the overview page, you can see the inbound and outbound bindings for the selected channel. Note The inbound and outbound bindings can only be maintained using the configuration reconciliation. That's why the Maintained by field in the Inbound Topic Bindings section has the value SAP BTP. The configuration reconciliation is triggered through the end user in the SAP Cloud Application Event Hub UI at activation of the event flow. For more information, see About Configuration Reconciliation. You can check the event log for reconciliation events. The event monitor displays requested configurations and the respective response. Reconciliation events remain in the event queue for two weeks and are visible in the event monitor during that time. Related Information About Configuration Reconciliation About Configuration Reconciliation This topic provides some information about configuration reconciliation. The SAP Cloud Application Event Hub uses configuration events of type sap.em.Reconcile.Requested.v1. The event payload reflects the complete target state of the configuration which shall be applied to the configuration tables of the Enterprise Event Enablement framework (EEE). A configuration event describes the event types a connected system shall publish and the event types it shall consume from SAP Cloud Application Event Hub. The EEE framework provides an event consumer, which is capable of processing and understanding events of type sap.em.Reconcile.Requested.v1 from the SAP Cloud Application Event Hub. The event consumer processes the requested revision and configures it for the same connection receiving the configuration event. After processing a configuration event request, a reconciliation event of type sap.em.Reconcile.Completed.v1 is expected by the SAP Cloud Application Event Hub. The EEE framework provides a corresponding event producer to publish such an event of type sap.em.Reconcile.Completed.v1. As result of this reconciliation process, the EEE framework publishes the sap.em.Reconcile.Completed.v1 event, containing the status of the achieved configuration. The status of the configuration is reported in the This is custom documentation. For more information, please visit SAP Help Portal. 191 1/9/25, 11:50 AM sap.em.Reconcile.Completed.v1 event individually for each event type requested to be configured either for consumption or publishing. Linking SAP Fiori Launchpad to SAP Cloud Application Event Hub Learn how to open your SAP Cloud Application Event Hub subscriptions directly from the SAP Fiori launchpad. Prerequisites You have already created a communication arrangement SAP_COM_0892 for SAP Cloud Application Event Hub. Context With the communication arrangement SAP_COM_0A43, you can use the tile Manage Event Distribution Models on your SAP Fiori launchpad as a direct link to your SAP Cloud Application Event Hub subscriptions. In the subscriptions editor, you can manage your event subscriptions and filters. For more information on SAP Cloud Application Event Hub subscriptions, see Use SAP Cloud Application Event Hub Application. Procedure 1. In your SAP BTP cockpit, go to System Landscape Formations . 2. Copy the URL of the SAP Cloud Application Event Hub to your clipboard. 3. Open your SAP Fiori launchpad. 4. Go to Communication Arrangements New . 5. In the Scenario field, choose SAP_COM_0A43 SAP Cloud Application Event Hub for SAP cloud applications - UI Integration. 6. Define and enter an arrangement name. Note You can only create one SAP_COM_0A43 arrangement for each system, since you can only connect one SAP Cloud Application Event Hub per tenant. 7. In the Communication Arrangements editor window, in the Communication System field, select your existing SAP Cloud Application Event Hub communication system and choose Display. Note For more information about how to create the communication system, see Creating Communication Arrangements. 8. In the Communication System window, choose Edit. 9. In the UI Host Name field, paste the URL that you retrieved before and choose Save. The URL is added to the communication arrangement SAP_COM_0A43. 10. Choose Save. The tile Manage Event Distribution Models on your Fiori launchpad now links directly to your SAP Cloud Application Event Hub subscriptions. Direct Push-Based Integration This is custom documentation. For more information, please visit SAP Help Portal. 192 1/9/25, 11:50 AM With direct push-based integration, you can connect neighboring ABAP Systems with each other. With direct push-based integration, you can connect neighboring ABAP Systems (for example SAP S/4HANA Public/Private Cloud, SAP S/4HANA On-Premise or SAP BTP, ABAP environment tenants) with each other. In this scenario, the connected systems exchange data (like business events) by calling each other directly via RFC. Advantages of this functionality are a simpler setup and a faster connectivity (depending on the RFC technology used). This integration can also be used to try out event-driven architecture in a small scope. Note Direct push-based integration can only be used between ABAP systems. An ABAP system can be an SAP S/4HANA Cloud, SAP S/4HANA On-Premise or SAP BTP, ABAP environment system. For this one-directional process, you need (at least) two ABAP systems: one receiver system one (or more) sender system(s) Creating the Receiver Channel SAP_COM_0A23 Context Outline: Create a new communication arrangement. Create a new communication system. Create a new inbound user as daemon user. Copy user and password. Save the communication system. Save the communication arrangement. Copy API-url. Procedure 1. Open the SAP Fiori launchpad of the receiver system. 2. In the Communication Management section, open Communication Arrangements. 3. Choose the New button. 4. Select the scenario SAP_COM_0A23, labeled Enterprise Event Enablement - Direct Event Inbound Integration. 5. Enter an arrangement name and choose Create. The communication arrangement editor is opened. 6. In the Common Data section, next to the Communication System field, choose New to create a new communication system. The communication system editor is opened. 7. Provide a System ID and a System Name. You can choose any system ID and name. For example, you can use the same as for the communication arrangement for both ID and name. 8. Choose Create. This is custom documentation. For more information, please visit SAP Help Portal. 193 1/9/25, 11:50 AM The new Communication System is opened. 9. In the Technical Data section, under General, mark the Inbound Only checkbox. 10. In the section Users for Inbound Communication, choose the + symbol on the right to create a new user. a. For the Authentication Method, select User Name and Password. b. Leave the User Name/Client ID field blank and choose New User. The Create Communication User editor is opened. c. Enter a User Name and a Description. d. Enter a Password or choose Propose Password and save it for later. e. Choose Create. f. Choose OK in the New Inbound Communication User popup window. A new inbound user is created and added to the communication system. 11. Choose Save in the Communication System creation window. 12. In the Communication Arrangements window, in the Additional Properties tab, provide a Channel and a Description. You can choose any channel name. For example, you can use the same as for the communication arrangement for both channel and description. This channel name is used later during the channel configuration and monitoring. 13. From the Common Data section, copy the provided API-URL without https://. You will need this info later for the host name of the sender channel. 14. Choose Save. Creating the Sender Channel SAP_COM_0A22 Prerequisites You have created a receiver channel as described in Creating the Receiver Channel SAP_COM_0A23. Context Outline: Create a new communication arrangement Create a new communication system. Create a new outbound user: choose the daemon user created before. Additionally, create a new inbound user as destination. Save the communication system. Save the communication arrangement. Procedure 1. Open the SAP Fiori launchpad of the sender system. 2. In the Communication Management section, open Communication Arrangements. 3. Choose the New button. 4. Select the scenario SAP_COM_0A22, labeled Enterprise Event Enablement - Direct Event Outbound Integration. 5. Enter an arrangement name and choose Create. This is custom documentation. For more information, please visit SAP Help Portal. 194 1/9/25, 11:50 AM The communication arrangement editor is opened. 6. In the Common Data section, next to the Communication System field, choose New to create a new communication system. The communication system editor is opened. 7. In the General section, paste the API-url you created in the communication arrangement of receiver channel into the Host Name field, without https://. For more information about where to find the API-url for the host name, see Creating the Receiver Channel SAP_COM_0A23. 8. In the section Users for Outound Communication, choose the + symbol on the right to create a new user. a. For the Authentication Method, select User Name and Password. b. In the User Name/Client ID field, enter the inbound user you created in the receiver channel. c. Enter the Password you defined for the inbound user of the receiver channel. d. Choose Create. A new outbound user is added to the communication system. 9. In the section Users for Inbound Communication, choose the + symbol on the right to create a new user. a. For the Authentication Method, select User Name and Password. b. Leave the User Name/Client ID field blank and choose New User. The Create Communication User editor is opened. c. Enter a User Name and a Description. d. Enter a Password or choose Propose Password. e. Choose Create. f. Choose OK in the New Inbound Communication User popup window. A new inbound user is created and added to the communication system. 10. In the Communication Arrangements window, in the Additional Properties tab, provide a Channel and a Description. You can choose any channel name. For example, you can use the same as for the communication arrangement for both channel and description. 11. In the Communication Partner ID field, enter the name of the SAP_COM_0A23 receiver channel you created before. 12. Choose Save. The communication arrangement is activated. Configuring the Receiver Context Create a new communication arrangement representing a consumer on the receiver side. Outline: Create a new communication arrangement. Create a new communication system. Mark checkbox Inbound Only This is custom documentation. For more information, please visit SAP Help Portal. 195 1/9/25, 11:50 AM Set Event Exchange Infrastructure slider to On. Add the SAP_COM_0A23 receiver event channel. Create a new inbound user. Save the communication system. Save the communication arrangement. Open the receiver channel to see all inbound topics listed. Procedure 1. Open the SAP Fiori launchpad of the receiver system. 2. In the Communication Management section, open Communication Arrangements. 3. Choose the New button. 4. Select a suitable consumption scenario. 5. Enter an arrangement name and choose Create. The communication arrangement editor is opened. 6. In the Common Data section, next to the Communication System field, choose New to create a new communication system. The communication system editor is opened. 7. Provide a System ID and a System Name. You can choose any system ID and name. For example, you can use the same as for the communication arrangement for both ID and name. 8. Choose Create. The new Communication System is opened. 9. In the Technical Data section, under General, mark the Inbound Only checkbox. 10. In the OAuth 2.0 Settings section, set the Event Exchange Infrastructure slider to On. 11. In the Event Exchange Infrastructure section, choose the + symbol on the top right to add an event channel. 12. Select the SAP_COM_0A23 receiver event channel you created earlier. (See: Creating the Receiver Channel SAP_COM_0A23). 13. In the section Users for Inbound Communication, choose the + symbol on the right to create a new user. You can select an existing user from the value help or create a new one. To create a new user, proceed as follows: a. For the Authentication Method, select User Name and Password. b. Leave the User Name/Client ID field blank and choose New User. The Create Communication User editor is opened. c. Enter a User Name and a Description. d. Enter a Password or choose Propose Password and save it for later. e. Choose Create. f. Choose OK in the New Inbound Communication User popup window. A new inbound user is created and added to the communication system. 14. Choose Save in the Communication System creation window. 15. Choose Save in the Communication Arrangement window. This is custom documentation. For more information, please visit SAP Help Portal. 196 1/9/25, 11:50 AM Results In the receiver channel, all defined inbound topics bindings are now displayed. You can now proceed to the following topic to syncronize the sender with the receiver channel. Synchronizing Sender and Receiver Channels Prerequisites You have created an active receiver channel with inbound bindings, as described in the previous topics. Context Outline: Open sender channel, outbound topic bindings. Choose button Overwrite with remote topic bindings. The available outbound topics are called from the receiver and set up automatically. Sender and receiver are now synchronized. Test your connection: Go to Event Monitor. Mark your sender channel. Choose Produce Test Event. Refresh the page. Procedure 1. Open the SAP Fiori launchpad of the sender system. 2. Open the app Enterprise Event Enablement - Configure Channel Binding. 3. Open your sender channel. The Outbound Topic Bindings list is empty if it hasn't been synchronized before. 4. Choose the Overwrite with remote topic bindings button on the top right. The available outbound topics are called from the receiver channel and set up automatically in the sender channel. Note If the corresponding event topic cannot be assigned, for example because the event topic doesn't exist in the system, a corresponding message is displayed. Note If the receiver receives events that are not listed in the inbound binding allowlist, these events are stored in the receiver channel in status failed. Note This is the only possible way to configure outbound bindings. It is not possible to configure outbound bindings manually. This is due to the fact that in a direct connection, you know exactly what your receiver wants to receive. 5. [Optional] To test your connection, go to the Event Monitor. a. Mark your sender channel and choose Produce Test Event. b. Refresh the page. The test event is counted in the column In Process Events. This is custom documentation. For more information, please visit SAP Help Portal. 197 1/9/25, 11:50 AM Configuration of Event Publishing and Event Consumption Scenarios You can define which event types shall be published or consumed using a connection defined through the communication arrangement. Each event type is assigned to one topic. Topics form a logical tree to organize events, such as a folder hierarchy in a file system. Thus, the topics appear as strings that consist of multiple segments and are separated by one defined delimiter, similar to file paths. Note Only events, which are bound to a connection, can be exchanged between an ABAP system and the SAP Business Technology Platform. The following steps are required to configure event publishing and event consumption scenarios: Event Publishing Event Consumption Event Metadata Event Publishing The following chapters describe how to publish events to a consumer using outbound event topics. You can also define filters to prevent specific events from going out of the source system. Note Manual configuration of event publishing is only relevant for the integration with SAP Event Mesh and Advanced Event Mesh. Maintain Outbound Event Topics Prerequisites The Enterprise Event Enablement ‒ Configure Channel Bindings app is visible. If the Enterprise Event Enablement ‒ Configure Channel Bindings app is not visible, add the Enterprise Event Enablement business catalog to the SAP_BR_ADMINISTRATOR role using the Maintain Business Roles app. The change in your role becomes effective after you have logged out and logged in again. Note You have established a connection through the configuration of the communication arrangementFor more information about adding catalogs to business roles, see links below (Related Information). Context You can configure outbound event topic bindings for publishing events. Procedure This is custom documentation. For more information, please visit SAP Help Portal. 198 1/9/25, 11:50 AM 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Choose the respective channel, which you have created before. 4. In the Outbound Topic Bindings tab, you can do the following: Option Description Create a new topic. a. Choose Create. b. Enter a topic name. c. Choose Create to save your entries. The new topic will be listed in the Topic table. Delete an existing topic. a. Select the checkbox of the topic you want to delete. b. Choose Delete. Define table parameters. Click the gear icon to define the table parameters. Each topic has a corresponding API state: Unreleased: The topic is available, but not released. Released: The topic is available and stable. Deprecated: The use of the topic is not recommended any more. For topics containing wildcards, the API state is not displayed. Next Steps Events reside in an internal queue of the Enterprise Event Enablement. Once the processing of an event is finalized, it is deleted from the queue. The processing of an event is finalized if: Status: Ok Status: Invalid The event has been successfully published according to the chosen quality of service. The Enterprise Event Enablement failed to publish the event after 5 attempts. Related Information Maintain Business Roles (SAP BTP) Maintain Business Roles (SAP S/4HANA Cloud Public Edition) Queue Subscriptions Maintain Filters for Outbound Event Topics You can filter the events that should be sent via a channel by defining filters per channel and topic. Prerequisites You have created an outbound event topic as described here: Maintain Outbound Event Topics This is custom documentation. For more information, please visit SAP Help Portal. 199 1/9/25, 11:50 AM Note Event filters for event topics containing wildcards are not supported. Context You can define filters for context and custom context attributes defined for the corresponding event type. In the RESTful Application Programming framework (RAP), you can define a custom context attribute for your RAP business object with the CDS annotation @event.context.attribute. For more information on the CDS annotation, see Event Annotations. The custom defined context attribute is then available as a property in the event filter creation wizard in the Enterprise Event Enablement ‒ Configure Channel Binding app. Procedure 1. Log on to the SAP Fiori launchpad. 2. On the Communication Management page, select the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Choose a channel. In the Outbound Topics table, the column Has Event Filters indicates whether filters are defined for the outbound topic. 4. Open an Outbound Topic. Choose the Event Filter tab to display existing filters for the outbound topic. 5. To add a filter to the outbound topic, choose Create Event Filter. 6. On the Create Event Filter dialog box, proceed as follows: a. Select a Property from the dropdown menu. The properties available in the dropdown menu are defined by the custom context attributes (see Context section above). b. Choose an Option from the dropdown menu to define the filter behavior. c. Define a Low Value. You can use the value help, if available for the respective property. d. If applicable, define a High Value. e. Choose Create Event Filter. The new filter is added to the outbound topic. In accordance with existing filters, the new filter is added with an OR logic for inclusive options such as EQUALS. New filters are added with an AND logic for exclusive options such as NOT EQUALS. Different Properties are always AND connected. To delete a filter from an outbound event topic, select one or more filters and choose the Delete button. Note For more information on the usage of event filters, refer to SAP Note 3343266 also Maintain Filters for Outbound Event Topics . For an end-to-end tutorial, see . Using Dynamic Topics in Advanced Event Mesh You can use dynamic topics for routing and filtering outbound events in the Advanced Event Mesh (AEM). Prerequisites This is custom documentation. For more information, please visit SAP Help Portal. 200 1/9/25, 11:50 AM Note Dynamic topics are available in the Advanced Event Mesh (AEM) only. For more information about the use of events in the context of AEM, see Understanding Topics . You have created an outbound event topic as described here: Maintain Outbound Event Topics You have added event.context.attribute annotations to define dynamic topic segments for the given event type, as described in Event Annotations. In addition, you have added event.context.position annotations to specify the position of the corresponding dynamic topic segment relative to the other dynamic segments. Context Dynamic topics make use of the context attribute annotations to extend the corresponding event topic with further dynamic segments, derived from the corresponding annotated payload field. Dynamic topics enable detailed event filtering and routing, ensuring that events are delivered only to the relevant components, improving efficiency and reducing unnecessary processing. The Enterprise Event Enablement framework (EEE) enables the usage of dynamic topics for the Advanced Event Mesh integration (AEM). A possible example for such a dynamic topic would be as follows: sap/custom/MySalesOrder/v1/{companyCode}/{SalesOrderID} --------------- properties -----------------------------to: sap.custom.MySalesOrder.Created.v1.de.10002 content-type: application/cloudevents+json; charset=utf-8 ----------- application-properties ---------------------------------- application-data -------------------------{ "specversion" : "1.0", "type": "sap.custom.MySalesOrder.Created.v1" "xsapcompanycode": "de" "xsapsalesorder": 1002, "data": { ... } } Note Note that the dynamic topic segment values are also part of the CloudEvent header as defined in the event.context.attribute annotation. Procedure To enable dynamic topics, proceed as follows: 1. Log on to the SAP Fiori launchpad. 2. On the Communication Management page, open the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Select the corresponding AEM event channel. This is custom documentation. For more information, please visit SAP Help Portal. 201 1/9/25, 11:50 AM 4. Choose the Enable Dynamic Topics button on the top right. Note When you enable dynamic topics, topics containing wildcards will be resolved, as dynamic segments are specific to a single event topic. In the Outbound Topic Bindings section, the outbound topic bindings are now displayed with the derived dynamic attributes in curly brackets. Example sap/custom/MySalesOrder/v1/{companyCode}/{SalesOrderID} The Use Dynamic Topics indicator on the top left changes to Yes. 5. To disable dynamic topics, choose the Disable Dynamic Topics button on the top right. Related Information Maintain Outbound Event Topics Event Consumption Event consumption can be configured manually for some event types (for example subscription billing). These configuration options are described in this section. For all other event types, follow the steps described in Creating an Event Consumption Model. You can configure the consumption of events. To do so, proceed as follows: Configuring Inbound Event Topic Bindings Configuring Subscriptions Simulating Consumption Enabling Event Consumption for an Event Consumption Model Configuring Inbound Event Topic Bindings Prerequisites You have established a connection through the configuration of the communication arrangement in the previous steps. The Enterprise Event Enablement ‒ Configure Channel Bindings app is visible. If the Enterprise Event Enablement ‒ Configure Channel Bindings app is not visible, add the Enterprise Event Enablement business catalog to the SAP_BR_ADMINISTRATOR role using the Maintain Business Roles app. The change in your role becomes effective after you have logged out and logged in again. Note For more information about adding catalogs to business roles, see links below (Related Information). Context This is custom documentation. For more information, please visit SAP Help Portal. 202 1/9/25, 11:50 AM You can configure event consumers delivered by SAP manually. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Choose the respective channel, which you have created before. 4. In the Inbound Topic Bindings tab, you can do the following: Option Description Create a new topic. a. Choose Create. b. Enter a topic name. c. Choose Create to save your entries. The new topic is listed in the Inbound Topics table. Delete an existing topic created by an end user. a. Select the checkbox of the topic you want to delete. b. Choose Delete. Define table parameters. Click the gear icon to define the table parameters. Next Steps The Inbound Topics table contains all inbound event topic bindings that exist for the selected channel and communication arrangement. The fields can have the following values: Status: Ok Status: Incomplete Status: Invalid No topic consumer exists for current topic binding. The current topic binding is invalid for at least one topic consumer. This means either the topic filter doesn't exist or the corresponding destination is incorrect. Topic Maintained by: End User Maintained by: Communication Management Is the topic presentation. The event inbound topic binding was created manually by a user. The event inbound topic binding was created automatically during the configuration of a generated event consumption model. Note In case invalid bindings maintained by an end user exist, you can delete this binding by: choosing Delete invalid bindings on top of the page or selecting the respective topic and choosing Delete. Note This is custom documentation. For more information, please visit SAP Help Portal. 203 1/9/25, 11:50 AM To enable the consumption of events, the AMQP protocol replaces the MQTT protocol. New communication arrangements use the AMQP protocol by default. Existing communication arrangements can be updated via the service key. To do so, refer to Maintaining Communication Arrangements for SAP Event Mesh. Related Information Maintain Business Roles (SAP BTP) Maintain Business Roles (SAP S/4HANA Cloud Public Edition) Configuring Subscriptions Prerequisites You have established a connection through the configuration of the communication arrangement in the previous steps. The Enterprise Event Enablement ‒ Configure Channel Bindings app is visible. If the Enterprise Event Enablement ‒ Configure Channel Bindings app is not visible, add the Enterprise Event Enablement business catalog to the SAP_BR_ADMINISTRATOR role using the Maintain Business Roles app. The change in your role becomes effective after you have logged out and logged in again. Note For more information about adding catalogs to business roles, see links below (Related Information). Note Subscriptions are only available for SAP Event Mesh and Advanced Event Mesh. Context Subscriptions, which are based on a queue, provide all incoming events. These incoming events are forwarded to the corresponding consumer. Note Events are only forwarded to an event consumer when an inbound event topic binding exists for the related event topic. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Choose the respective channel, which you have created before. 4. In the Subscriptions tab, you can do the following: Option Description Create a new subscription. a. Choose Create. b. Enter a valid subscription address that corresponds to the name of the queue created in the respective event exchange infrastructure. This is custom documentation. For more information, please visit SAP Help Portal. 204 1/9/25, 11:50 AM Option Description c. Choose Create to save your entries. The new subscription is listed in the Subscriptions table. Note When working with SAP Event Mesh, you can create a maximum of 10 subscriptions. Delete an existing subscription. a. Select the checkbox of the subscription you want to delete. b. Choose Delete. Define table parameters. Click the gear icon to define the table parameters. Next Steps Subscriptions must have a valid subscription address provided by the respective event exchange infrastructure. Both subscriptions and inbound bindings are required to consume events. For more information, refer to Configuring Inbound Event Topic Bindings. The Subscriptions table contains all subscriptions that exist for the selected channel. The different fields can have the following values: Status: New Subscription was newly created and has not been acknowledged by the respective event exchange infrastructure service instance yet. Status: Subscription is active and acknowledged by the respective event exchange infrastructure service instance. Acknowledged Status: Rejected The channel has been deactivated and the subscription is rejected by the respective event exchange infrastructure service instance. Status: Inactive Subscription wasn't acknowledged by the respective event exchange infrastructure service instance. Subscription Depicts the current address. Address Type Kind Queue-Based Subscription Related Information Maintain Business Roles (SAP BTP) Maintain Business Roles (SAP S/4HANA Cloud Public Edition) Simulating Consumption Simulating Consumption Prerequisites The Enterprise Event Enablement ‒ Configure Channel Bindings app is visible. This is custom documentation. For more information, please visit SAP Help Portal. 205 1/9/25, 11:50 AM If the Enterprise Event Enablement ‒ Configure Channel Bindings app is not visible, add the Enterprise Event Enablement business catalog to the SAP_BR_ADMINISTRATOR role using the Maintain Business Roles app. The change in your role becomes effective after you have logged out and logged in again. Note For more information about adding catalogs to business roles, see links below (Related Information). You have an inbound topic binding with status Ok in your Inbound Topics table. Context To allow you to test your consumer implementation, you can use the Simulate Consumption action. Then a dummy event of a given Topic Consumer will be sent to its consumer implementation. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Choose the respective channel, which you have created before. 4. Select an Inbound Topic. If you have no Inbound Topic with Status: Ok, refer to Configuring Inbound Event Topic Bindings. 5. Select the radio button of the Topic Consumer you want to simulate consumption with. 6. Choose Simulate Consumption. Results In case of a wildcard in the topic, the wildcard is resolved and events for all resolved topics are created. The dummy events are sent to the corresponding consumer implementation. Then the simulated event is retrieved from the internal event queue and the status is checked. A short message is raised, informing the user on the success or failure of the simulation. Related Information Maintain Business Roles (SAP BTP) Maintain Business Roles (SAP S/4HANA Cloud Public Edition) Event Metadata Enabling Event Consumption for an Event Consumption Model In this topic, you can find information about how to enable the event consumption for an event consumption model defined using the ABAP Development Tools and how to set up the corresponding communication arrangement. Via communication arrangements, the ABAP system receives events from the event queue and transfers the events to the event consumption model, which then processes the event. The event is processed according to the logic implemented in the method for handling the event in the consumer extension class. Note This is custom documentation. For more information, please visit SAP Help Portal. 206 1/9/25, 11:50 AM The communication arrangements SAP_COM_0092, SAP_COM_0892 or SAP_COM_0492 define the connection from SAP S/4HANA Cloud to the respective event exchange infrastructure. Note The communication arrangements SAP_COM_0092 or SAP_COM_0492 define the connection from ABAP environment to the respective event exchange infrastructure. The following steps are required to configure the event consumer: Creating a Communication Arrangement for the Communication Scenario bound to an Event Consumption Model To be able to receive events from the event exchange infrastructure service instance, you must configure the inbound communication from the event exchange infrastructure to the consuming event consumption model. Checking Channel Binding This topic describes how to check the channel binding for the Enterprise Event Enablement. Related Information Queue Subscriptions Creating a Communication Arrangement for the Communication Scenario bound to an Event Consumption Model To be able to receive events from the event exchange infrastructure service instance, you must configure the inbound communication from the event exchange infrastructure to the consuming event consumption model. Prerequisites You've set up a communication arrangement as described in Communication Management. You've created an event consumption model and a Communication Scenario as described in Event Consumption. Context Following the procedure, you create an inbound communication arrangement. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Communication Arrangements artifact. 3. Choose New. 4. Select the Communication Scenario that was created for the respective event consumption model. You can recognize the scenario by its Inbound Service. An Inbound Service is created for each event consumption model and later on assigned to the respective communication scenario. 5. Choose an Arrangement Name and click on Create. 6. To assign a communication system, proceed as follows: Assign an existing communication system by selecting a Communication System. You can ignore the substeps. This is custom documentation. For more information, please visit SAP Help Portal. 207 1/9/25, 11:50 AM Create a communication system (see Related Information below). a. In the General tab under Technical Data, pull the switch for Event Mesh to ON. Note that communication arrangements created for an event consumption model only support inbound communication. That's why the Inbound Only flag is activated when switching Event Mesh on. b. In the General tab under Technical Data, select the Event Channel that you've configured as described in Communication Management. The Event Channel name you see in the value help is the name that was assigned in the property Channel of the respective communication arrangement. c. In the Users for Inbound Communication tab, add an inbound user. Note The User for Inbound Communication (inbound user) and the Communication User must be maintained as two different users. Make sure to create a dedicated inbound user, apart from your communication user. The inbound user is used later for event processing. This user has authorizations maintained in the Authorization Default Values as described in Adjusting Generated Artifacts. d. Choose Save. In general, you can assign multiple event consumption models via the corresponding communication scenarios to the same communication arrangement. Results You've created an inbound communication arrangement for your event consumption model. Related Information How to Create Communication Systems (SAP S/4HANA Cloud Public Edition) How to Create Communication Systems (SAP BTP) How to Create Communication Users (SAP BTP) How to Create Communication Users (SAP S/4HANA Cloud Public Edition) How to Create a Communication Arrangement (SAP BTP) How to Create a Communication Arrangement (SAP S/4HANA Cloud Public Edition) Checking Channel Binding This topic describes how to check the channel binding for the Enterprise Event Enablement. Prerequisites You've set up a communication arrangement as described in Communication Management. You've created an event consumption model and a communication scenario as described in Event Consumption. Context Inbound topic bindings are automatically created during generation and configuration of an event consumption model by assigning the communication system of your event consumption model to the corresponding communication arrangement. This is custom documentation. For more information, please visit SAP Help Portal. 208 1/9/25, 11:50 AM Maintaining inbound topic bindings can only be done through changes of the communication system of your event consumption model. Follow the steps below to view the inbound topic bindings. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Select the Channel name of the corresponding communication arrangement to which the communication system of your event consumption model has been assigned to in Creating a Communication Arrangement for the Communication Scenario bound to an Event Consumption Model. In the Inbound Topic Bindings tab under Inbound Topics, the event topics of the event consumption model are displayed. The topics you see here correspond to the event types you've selected during the creation of the event consumption model. Since these are created automatically, the Maintained by field has the value Communication Management. 4. Maintain the subscriptions in the Subscriptions. Here you can add all subscription addresses of the respective event exchange infrastructure queues from which you want to consume events. If a subscription to a queue of the respective event exchange infrastructure service instance is maintained and acknowledged, all events on this queue are consumed by the ABAP system. Only if the event topics are maintained under Inbound Topics, the incoming events are handed over to the consumer extension class of the corresponding event consumption model. If the event topic isn't maintained, the event is consumed without any further processing. Event Metadata Prerequisites You have established a connection through the configuration of the communication arrangement in the previous steps. The Enterprise Event Enablement ‒ Configure Channel Bindings app is visible. If the Enterprise Event Enablement ‒ Configure Channel Bindings app is not visible, add the Enterprise Event Enablement business catalog to the SAP_BR_ADMINISTRATOR role using the Maintain Business Roles app. The change in your role becomes effective after you have logged out and logged in again. Note For more information about adding catalogs to business roles, see links below (Related Information). Context The Enterprise Event Enablement is applying the CloudEvents specification (Cloud Events ) for the runtime representation of an event. CloudEvents is a specification for describing event data in common formats to ensure interoperability across services, platforms, and systems. You can find all released SAP events on the SAP Business Accelerator Hub (Creating an Event MeshSAP Business Accelerator Hub ). The SAP Business Accelerator Hub is the central catalog of SAP and selected partner APIs to search, discover, test, and consume these APIs to build extensions or integrations using the SAP Business Technology Platform. The Enterprise Event Enablement applies the AsyncAPI specification to describe a catalog of events. This is custom documentation. For more information, please visit SAP Help Portal. 209 1/9/25, 11:50 AM Note You can find the corresponding AsyncAPI event catalogs for released events in the Event Resources section of the individual released events on the SAP Business Accelerator Hub. This specification is required for example to create an event consumption model. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Enterprise Event Enablement ‒ Configure Channel Binding app. 3. Choose the respective channel, which you have created before. 4. Select Event Metadata. Next Steps In the Event Metadata tab, you can view the metadata for the event types selected on the Outbound Topic Bindings tab for event publishing. This metadata contains the definition of the structure of all event types, which you have selected for publishing from the ABAP environment system. The metadata is represented as an AsyncAPI catalog of events and can contain released SAP events as well as customer events. You can also use the AsyncAPI representation for creating your event consumption model. Related Information Creating an Event Consumption Model CloudEvents Context Attributes Maintain Business Roles (SAP BTP) Maintain Business Roles (SAP S/4HANA Cloud Public Edition) Monitoring Read Access Logging (RAL) Read Access Logging (RAL) allows monitoring and logging of read access to sensitive data, helping to comply with data privacy regulations. It can be used to track who accessed sensitive data, how, and when, and is offered for different channels. Message Monitoring You can monitor messages using the Message Monitoring for Integration Experts app, provided by the SAP Application Interface Framework (SAP AIF). Monitoring Events Read Access Logging (RAL) Read Access Logging (RAL) allows monitoring and logging of read access to sensitive data, helping to comply with data privacy regulations. It can be used to track who accessed sensitive data, how, and when, and is offered for different channels. With Read Access Logging (RAL) for events, you can monitor and log read access to sensitive data because of diverse data privacy regulations. The categorization of sensitive data can vary: it can depend on your country’s code of law or on your external or internal company policies. RAL thus helps you to find out who had access to sensitive data, in which way and at what time. This is custom documentation. For more information, please visit SAP Help Portal. 210 1/9/25, 11:50 AM RAL is offered for different channels. A channel is a way for data to leave the system, for example dynpros of Web services. The Enterprise Event Enablement is another channel that is supported in the central RAL monitor. For more information on RAL in the context of SAP NetWeaver, see Read Access Logging. Note Using RAL requires system resources. This can have a strong impact on your system performance, depending on the number and type of logs. Events can be logged for two scenarios: Read access of events during support (monitoring) This is the case when the event monitor was opened by SAP support to check the payload of sent or consumed events. Read access of events during sending (runtime) This is the case when an outbound binding exists and an event is to be sent to the respective event exchange infrastructure by the Enterprise Event Enablement. For more information, refer to Configuration of Event Publishing and Event Consumption Scenarios. You can define which properties of an event are to be logged to avoid that all events are logged. Consider this carefully as it may affect the system performance. The following types can be logged once a corresponding configuration exists: Channel Fields Condition Fields Access Context Cloud Event Context Fields Source Type Id Time Payload Types Payload types of a selected producer or consumer. A producer or consumer is a set of event types belonging to a business entity. System Fields User Name Screen Title Transaction code Related Information Read Access Logging (SAP S/4HANA Cloud Public Edition) Data Protection (SAP S/4HANA Cloud Public Edition) Events on SAP Business Accelerator Hub (SAP S/4HANA Cloud Public Edition) Searching for Existing Configurations This is custom documentation. For more information, please visit SAP Help Portal. 211 1/9/25, 11:50 AM Prerequisites The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Read Access Logging Configuration app, select the Administration tab. 3. Choose Configuration. 4. Choose Enterprise Event Enablement as Channel. 5. Specify your Search Criteria: Registration ID Registration Version Repository ID Event Scenario Description State 6. Click Search. Results A list of existing configurations is displayed. Creating Configurations Prerequisites The key user must have the business role SAP_BR_ADMINISTRATOR (Administrator) that contains the business catalog SAP_CORE_BC_COM (Communication Management). Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Read Access Logging Configuration app, select the Administration tab. 3. Choose Configuration. 4. Choose Enterprise Event Enablement as Channel. 5. Click Create at the bottom of the page. 6. On the Create Configuration screen, you can search for existing event consumers or event producers to which you can assign a configuration. To do so, specify your search criteria: Registration ID Registration Version Repository ID Event Scenario This is custom documentation. For more information, please visit SAP Help Portal. 212 1/9/25, 11:50 AM Busi Object Name a. Click Search. A list of existing producers (P) and consumers (C), matching your search criteria, is displayed. Note If you do not specify your search criteria and click Search, all existing producers and consumers are displayed. b. Choose one producer or consumer. c. Click Create. For the chosen consumer or producer, the following sections are displayed: Attributes Application/Software Component that is assigned to a consumer or producer Description for the Application/Software Component Administrative Information Technical Data Created Changed Log Groups Log groups are groups of fields that are displayed in one log entry in the read access log. To add a log group, do the following: Click the button with the tooltip Create Log Group. In the Create Log Group dialog box, do the following: Define the Purpose. Define the Description. Click Create. Note Keep in mind to drag and drop Channel Fields and/or System Fields from the Field list to the Fields section of the log group. Tip You can create log groups without adding conditions. If you want to add conditions, uncheck the Without Condition flag. Conditions To add a condition, do the following: Click the button with the tooltip Create Condition. In the Create Condition dialog box, do the following: Define the Condition. Define the Description. Click Create. Field list d. Click Save as Active to activate your configuration. This is custom documentation. For more information, please visit SAP Help Portal. 213 1/9/25, 11:50 AM Related Information Defining Conditions for Configurations Defining Conditions for Configurations Prerequisites You've created a configuration in the Read Access Logging Configuration app. Refer to Creating Configurations. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Read Access Logging Configuration app, select the Administration tab. 3. Choose Configuration. 4. Choose Enterprise Event Enablement as Channel. 5. Search for your configuration in the Search Criteria section. Refer to Searching for Existing Configurations. 6. Click the Edit Configuration icon of the configuration you want to define a condition for. 7. In the Conditions section, click the button with the tooltip Create Condition. a. Define the Condition. b. Define the Description. c. Click Create. Next Steps Adding conditions is recommended to specify configurations (refer to Adding Expressions to Conditions). This can influence the system performance depending on the logging scenario you have chosen. If you have chosen read access of events during support (monitoring), the system performance is improved. If you have chosen read access of events during sending (runtime), the system performance can become worse. Adding Expressions to Conditions Prerequisites You've created a condition for a configuration in the Read Access Logging Configuration app. Refer to Defining Conditions for Configurations. Context Once you've created a condition and you want to log events only in a certain context, like at runtime, add an expression to your condition. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Read Access Logging Configuration app, select the Administration tab. This is custom documentation. For more information, please visit SAP Help Portal. 214 1/9/25, 11:50 AM 3. Choose Configuration. 4. Choose Enterprise Event Enablement as Channel. 5. Search for your configuration in the Search Criteria section. Refer to Searching for Existing Configurations. 6. Click the Edit Configuration icon of the configuration you want to define a condition for. 7. In the Conditions section, select the condition you want to add expressions for. 8. Click Create in the Expressions section of the condition. a. Define a name for the Expression. b. Choose Create. The Attributes and Select options are displayed in the Details of Expression section. 9. Drag and drop the Access Context condition field from the options section under Details of Expression. Field List Channel Fields Condition Fields to the Select 10. Click Save as Active to activate your configuration including assigned conditions. Related Information Defining Configurations in Read Access Logging Monitoring Logged Events Prerequisites The user must have the business role BR_DATA_PRIVACY_SPECIALIST (Data Privacy Specialist). If the user doesn't have the business role BR_DATA_PRIVACY_SPECIALIST, add the business role in the Maintain Business Roles app. Using the business role BR_DATA_PRIVACY_SPECIALIST, you can block, unblock, and display blocked personal data. Refer to Access Control and Data Protection. Procedure 1. Log on to the SAP Fiori launchpad. 2. Select the Read Access Logging: Monitor app. 3. Choose Raw Database as Source in the Data Source section. 4. Specify your search criteria: Channel Date/Time User Name Application Comp. Software Component 5. Specify the Maximum Number of Hits. 6. Choose Search. A list of logs according to the search criteria is displayed. Related Information This is custom documentation. For more information, please visit SAP Help Portal. 215 1/9/25, 11:50 AM How to Monitor the Read Access Log (SAP BTP) How to Monitor the Read Access Log (SAP S/4HANA Cloud Public Edition) Data Protection (SAP S/4HANA Cloud Public Edition) Message Monitoring You can monitor messages using the Message Monitoring for Integration Experts app, provided by the SAP Application Interface Framework (SAP AIF). The /IWXBE_TECHNICAL interface allows you to receive messages in case a technical error occurs for a given channel. Note Specific event monitoring is only enabled for inbound events. To display messages in the Message Monitoring for Integration Experts app, proceed as follows: Configuring Message Monitoring for General Framework Issues Learn how to configure message monitoring for general and technical framework issues. Configuring Message Monitoring for Event Consumption Models Learn how to configure message monitoring specifically for each of your event consumption models. Using Message Monitoring Configuring Message Monitoring for General Framework Issues Learn how to configure message monitoring for general and technical framework issues. Prerequisites The user must have the business role BR_CONF_EXPERT_BUS_NET_INT (Configuration Expert ‒ Business Network Integration). If the user doesn't have the business role BR_CONF_EXPERT_BUS_NET_INT, add the business role in the Maintain Business Roles app. Context Before you can display messages in the Message Monitoring for Integration Experts app, you must assign a user to a specific recipient. Procedure 1. Log on to the SAP Fiori launchpad. 2. Open the Assign Recipients to Users app. A list containing all users that are already assigned to recipients is displayed. 3. Click the + in the bottom row of the left-hand side of the screen. Note This is custom documentation. For more information, please visit SAP Help Portal. 216 1/9/25, 11:50 AM If you want to add additional recipients to a user who is already assigned to a recipient, use the Search Users with Assigned Recipients search field. 4. On the Add User dialog box, enter a user name or a user ID. 5. Choose Add. a. In the Assign Recipients dialog box, enter the following: Namespace: /IWXBE Recipient Name: RECIPIENT_CHANNEL Message Type: Technical Error b. Choose Assign to save the user assignment. The assigned recipient is now displayed in the Recipients for User list. Next Steps If you want to assign additional recipients to the user, click the Assign button on the right hand side of the Recipients for User list and repeat the steps. Related Information Assign Recipients to Users (SAP BTP) Assign Recipients to Users (SAP S/4HANA Cloud Public Edition) Configuring Message Monitoring for Event Consumption Models Learn how to configure message monitoring specifically for each of your event consumption models. Prerequisites The user must have the business role BR_CONF_EXPERT_BUS_NET_INT (Configuration Expert ‒ Business Network Integration). If the user doesn't have the business role BR_CONF_EXPERT_BUS_NET_INT, add the business role in the Maintain Business Roles app. Context In order to receive alerts for the consumption with the given event consumption model, you can assign your user to the SAP Application Interface Framework interface by a corresponding recipient. Procedure 1. Log on to the SAP Fiori launchpad. 2. Open the Assign Recipients to Users app. A list containing all users that are already assigned to recipients is displayed. 3. Click the + in the bottom row of the left-hand side of the screen. Note If you want to add additional recipients to a user who is already assigned to a recipient, use the Search Users with Assigned Recipients search field. This is custom documentation. For more information, please visit SAP Help Portal. 217 1/9/25, 11:50 AM 4. On the Add User dialog box, enter a user name or a user ID. 5. Choose Add. a. In the Assign Recipients dialog box, enter the following: Namespace: /IWXBE Recipient Name: Choose the generated recipient name. The generated recipient name is a <generic_hash> with the description <event_consumption_model_id> <event_consumption_model_version> ##GENERATED. Message Type: Choose a Message Type. Tip There is also a general framework monitoring case with the Recipient Name RECIPIENT_CHANNEL. Refer to Configuring Message Monitoring for General Framework Issues. b. Choose Assign to save the user assignment. The assigned recipient is now displayed in the Recipients for User list. Next Steps If you want to assign additional recipients to the user, click the Assign button on the right hand side of the Recipients for User list and repeat the steps. Using Message Monitoring Context Before you can display messages in the Message Monitoring for Integration Experts app, you must assign a user to a specific recipient. Refer to Configuring Message Monitoring for General Framework Issues. Procedure 1. Log on to the SAP Fiori launchpad. 2. Open the Message Monitoring for Integration Experts app. a. Enter the following parameters: Time: Define the period of time to be considered. From: Specify the period of time. To: Specify the period of time. Interface: Enter /IWXBE_TECHNICAL or select /IWXBE_TECHNICAL from the combo box. You can also select the event consumption model specific message monitoring interface as described in Configuring Message Monitoring for Event Consumption Models. Additional Interface Options: Specify the interface that should be displayed. b. Choose Go. The Message Status Overview screen displays your interfaces and all error messages with the following states: All Error Warning This is custom documentation. For more information, please visit SAP Help Portal. 218 1/9/25, 11:50 AM Success In Process Canceled Next Steps You can click the number of received messages of a specific status to display the corresponding list of messages. Select a message from the Log Details section to display the log message details on the right-hand side of the screen. If there is a correlation between the error message and the related communication arrangement, the Display Communication Arrangement link is displayed in the Functions section. Click the link to open the Communication Arrangements app and to display the related communication arrangement. Note You need authorization to open the Communication Arrangements app. For more information, see below (Related Information). Related Information Message Monitoring for Integration Experts (SAP BTP) Message Monitoring for Integration Experts (SAP S/4HANA Cloud Public Edition) Creating a Technical Communication User Monitoring Events Prerequisites You have established a connection through the configuration of the communication arrangement in the previous steps. The Enterprise Event Enablement ‒ Event Monitor app is visible. If the Enterprise Event Enablement ‒ Event Monitor app is not visible, add the Enterprise Event Enablement business catalog to the SAP_BR_ADMINISTRATOR role using the Maintain Business Roles app. The change in your role becomes effective after you have logged out and logged in again. Note For more information about adding catalogs to business roles, see links below (Related Information). Context Using the Enterprise Event Enablement ‒ Event Monitor app, you can monitor events by status and access the payload. Procedure 1. Log on to the SAP Fiori launchpad. 2. In the Communication Management app, select the Enterprise Event Enablement ‒ Event Monitor app. You will see an overview of all configured channels. The columns filled with numbers correspond to the number of events for a given status. 3. Choose the respective channel, which you have created before. This is custom documentation. For more information, please visit SAP Help Portal. 219 1/9/25, 11:50 AM The Inbound Events and Outbound Events tabs contain all inbound or outbound events by topic and status. 4. Select a Topic. All events for the given topic and status are listed. 5. Select an event to access detailed information. The detailed view of a consumer inbound event contains: Times Publish Time Arrival Time Consume Time Fail Time Event Data Cloud Event Source Cloud Event ID Quality of Service Consumed by Consumer ID Consumer Version Payload Payload Size (kB) Events reside in an internal queue of the Enterprise Event Enablement. Once the processing of an event is finalized, it is deleted from the queue after a certain time period. Processing an event is finalized if the status is acknowledged or failed. Deletion timeline Event status Description Hourly before the current full hour Acknowledged The event has been successfully published or consumed according to the chosen quality of service. An hourly background job deletes all acknowledged events from the event monitor. No deletion Failed The Enterprise Event Enablement either failed to publish the event after 5 attempts or the event could not be consumed by the corresponding consumer. Failed events are stored until you either delete or retry them again. No deletion Not processed yet All events that have a different status than acknowledged or failed are not deleted since they are not yet fully processed. The timeline for deleting is subject to change. This is custom documentation. For more information, please visit SAP Help Portal. 220 1/9/25, 11:50 AM Related Information Maintain Business Roles (SAP BTP) Maintain Business Roles (SAP S/4HANA Cloud Public Edition) Managing the SAP BTP ABAP Environment Service Instance In this chapter, you learn how to create configurations as an administrator for different integration use cases. Configuring the Timeout of the @sap/approuter Component Configure the timeout of the @sap/approuter component of a communication arrangement for inbound communication with service key OAuth. Creating an Inbound Communication Arrangement With Service Key Type Basic Learn how to quickly create a communication user and communication arrangement for an inbound communication scenario by using a service key of type basic. Configuring the Timeout of the @sap/approuter Component Configure the timeout of the @sap/approuter component of a communication arrangement for inbound communication with service key OAuth. Prerequisites You have created a space. See Create Spaces. You have the space developer role. See Assigning the Space Developer Role to the Developer Users. Context By default, communication between the approuter and connected services is timed out after 30 seconds. This default value is suitable for most applications. However, for long-lasting data transfer, communication lasts longer. If you experience timeouts, you can set the service key parameter abap_endpoint_timeout to a value higher than 30 seconds. Procedure 1. Log on to the cockpit and go to the subaccount that contains the space you'd like to navigate to. See Navigate in the Cockpit. 2. In the navigation area, go to 3. Select Services Instances Cloud Foundry Spaces and choose your space. from the navigation area and navigate to your ABAP system service instance. 4. Click on and select Create Service Key. 5. In the New Service Key dialog, enter a name for your service key and specify the parameter in JSON format as follows: { "abap_endpoint_timeout": 600000 } Note You can use s (seconds) or m (minutes) to define the value. If no unit is defined, the value is interpreted as seconds. This is custom documentation. For more information, please visit SAP Help Portal. 221 1/9/25, 11:50 AM The maximum value is 600s or 10m. Related Information Integration with Business Services Creating an Inbound Communication Arrangement With Service Key Type Basic Learn how to quickly create a communication user and communication arrangement for an inbound communication scenario by using a service key of type basic. Prerequisites You have created a communication scenario. You have created a space. See Create Spaces. You have the space developer role. See Assigning the Space Developer Role to the Developer Users. Procedure 1. Log on to the cockpit and go to the subaccount that contains the space you'd like to navigate to. See Navigate in the Cockpit. 2. In the navigation area, go to 3. Select Services Instances Cloud Foundry Spaces and choose your space. from the navigation area and find your ABAP system service instance. 4. Click on and select Create Service Key. 5. In the New Service Key dialog, enter a name for your service key and specify the parameters in JSON format as follows: { "scenario_id":"SAP_COM_XYZ", "type":"basic" } Note SAP_COM_XYZ is the ID of the communication scenario in your ABAP system. basic is the type of service key that is needed to generate a communication user and communication arrangement for an inbound communication scenario. 6. (Optional to step 5) If your communication scenario has additional custom properties, you can automatically assign values to them by using the optional parameter additional_properties. { "scenario_id":"SAP_COM_XYZ", "type":"basic", "additional_properties": [ { "technical_name": "CUSTOM_PROPERTY_1", "value": "VALUE_1" }, { "technical_name": "CUSTOM_PROPERTY_2", "value": "VALUE_2" } This is custom documentation. For more information, please visit SAP Help Portal. 222 1/9/25, 11:50 AM ] } Note CUSTOM_PROPERTY_1 and CUSTOM_PROPERTY_2 are the technical names of the properties as specified in your communication scenario. You can add any number of additional properties to the array additional_properties (CUSTOM_PROPERTY_3, CUSTOM_PROPERTY_4, and so on). VALUE_1, VALUE_2, and so on are the values that should be assigned to the properties. Results The communication user is generated and the credentials, depending on the selected type, are returned in the service key. The communication user receives authorizations for all services included in the communication scenario. This is custom documentation. For more information, please visit SAP Help Portal. 223