Docs / Connectors / SAP Advanced Event Mesh

SAP Advanced Event Mesh Connector

Connect SAP S/4HANA and SAP ERP Central Component (ECC) with SAP Integration Suite, Advanced Event Mesh (AEM) — SAP's enterprise event broker for asynchronous, real-time communication across hybrid, multi-cloud, and edge environments. Because AEM is based on Solace PubSub+, many settings are similar — you may find configuration values named "Solace" within this guide.

The ASAPIO Event Add-on for ERP bridges SAP systems with AEM without requiring additional middleware infrastructure. Payloads are code-less and extensible via CDS views, classic tables, or the Payload Designer. Both outbound event streaming and inbound data receipt are supported.

Getting Started via SAP BTP Discovery Center

The fastest way to jump-start the configuration is through the SAP BTP Discovery Center:

  1. Obtain Connections entitlements via the SAP Discovery Center (multiple commercial models available).
  2. Enable the Event Add-on flag on your active broker in the SAP BTP Cluster Manager.
  3. Install the ASAAEMEE component on top of ASANWEE in your SAP system.
  4. Configure the broker as an SM59 endpoint and complete the add-on configuration below.

Overview

The following add-on components are required for the SAP AEM connector:

Add-on / ComponentType
Netweaver Event Enablement Add-on (ASANWEE)Base component (required)
SAP Integration Suite, Advanced Event Mesh – Event Add-on for ERP (ASAAEMEE)Connector package
SAP AEM ERP Add-on (AEMERP)S/4HANA-specific event enablement content

Key capabilities of this connector:

Prerequisites

An instance of SAP Advanced Event Mesh is required, which is part of SAP Integration Suite on BTP.

The necessary configuration steps are:

  1. RFC destination for the Validation service endpoint
  2. RFC destination for the token endpoint (Validation service)
  3. Add-on instance for the Validation service
  4. RFC destination for the AEM messaging endpoint
  5. Add-on instance for AEM

Important: To use the add-on with your broker instance, it must be activated in the Cluster Manager.

AEM activation in Cluster Manager

Create an outbound interface (Event Studio)

Select a data object in the Data Catalog with an AEM-compatible load type, click Deploy, and choose the SAP AEM connection. Configure the required header attributes (see Header Attributes below) and deploy. Dynamic topic segments can be configured in the Field Mapping section of the interface.

Header Attributes

The following header attributes apply to both Event Studio and SAP GUI configuration.

Header AttributeValueDescription
SOLACE_CALL_METHODPOSTMandatory — HTTP method
SOLACE_CONT_TYPEapplication/jsonMandatory — content type
SOLACE_DELIV_MODEPersistentMandatory — delivery mode
SOLACE_DMQ_ELIGIBLEtrueOptional — activate Dead Message Queue eligibility
SOLACE_TIME_TO_LIVE2000Optional — message lifetime in milliseconds

Create an outbound interface (SAP Gui)

AEM-Specific Default Values (Instance Level)

Default Value NameDefault ValueDescription
AUTH_INSTANCE<cloud instance>Validation service instance; checks add-on activation
ACI_CLIENT_ID<client id>Client identifier
ACI_TOKEN_DESTINATION<token rfc destination>RFC destination for the OAuth token endpoint
AUTH_TYPECERTIFICATE or OAUTHAuthorization method

Extraction and Format Functions

Function NameTypePayload DesignNotes
/ASADEV/ACI_GEN_PDVIEW_EXTRACTExtractionYesRecommended extractor for Payload Design interfaces
/ASADEV/ACI_GEN_VIEW_FORM_CBFormatYesRecommended standard formatter
/ASADEV/ACI_IDOC_FORMATTER_AEMFormatNoIDoc conversion formatter
/ASADEV/ACI_GEN_FORM_CE_CB_AEMFormatYesStandard formatter with CloudEvents wrapping
/ASADEV/ACI_GEN_VIEWEXT_AEMExtractionNoDB view-based extractor
/ASADEV/ACI_GEN_NOTIFY_AEMExtraction/FormatNoNotification events processor
/ASADEV/ACI_GEN_META_AEMExtractionNoExample extractor
/ASADEV/ACI_GEN_DATA_AEMExtractionNoExample extractor
/ASADEV/ACI_GEN_CHANGES_AEMExtractionNoExample extractor
/ASADEV/ACI_GEN_VIEWFRM_AEMFormatYesDeprecated — use /ASADEV/ACI_GEN_VIEW_FORM_CB

Response handler: /ASADEV/ACI_GEN_RH_AEM

Set Up Instance for Validation Service

Two authentication options are available: OAuth 2.0 with ClientID/ClientSecret, or OAuth 2.0 with a client certificate.

Create RFC Destinations (SM59)

Validation Endpoint

In transaction SM59, create an RFC destination of type G (HTTP Connection to External Server). Specify the target host and port for the validation endpoint.

RFC destination for AEM validation endpoint

OAuth Token Endpoint

In transaction SM59, create a second type G RFC destination for the OAuth token endpoint.

RFC destination for OAuth token endpoint

On the Logon & Security tab, specify the default anonymous certificate store.

RFC security settings for token endpoint

Create Token Certificate (Certificate-Based Auth Only)

This section is only required when using certificate-based authentication.

Create an SSL Client Identity (STRUST)

In transaction STRUST, navigate to Environment > SSL Client Identities.

SSL Client Identities in STRUST

Create a new entry.

Create new SSL client identity

Import the Certificate — Newer ECC / S/4 Releases

  1. In STRUST, enter edit mode.
  2. Go to PSE > Import and import the .p12 file.
    Note: if importing the .p12 file is not possible, use the command line to convert it to a .pse file first.
  3. Go to PSE > Save as.
  4. Select SSL Client and the client identity created earlier.
Save PSE as SSL Client identity

Import the Certificate — Older Releases (No P12 Support)

  1. Copy the P12 key to: <drive>:\usr\exe
  2. Open a command window in the executables directory.
  3. Run sapgenpse import_p12:
    sapgenpse import_p12 -p <drive>:\usr\<SSF_Profile> <key_name>.p12
    Example:
    sapgenpse import_p12 -p D:\usr\SAP\JWT_S2100.pse project-messaging-339506-323631149f29.p12
  4. In STRUST, go to PSE > Import and import the generated .pse file.
Import PSE file in STRUST
  1. Go to PSE > Save as, select SSL Client and the client identity, then confirm and save.

Update OAuth Destination with Certificate

On the Logon & Security tab of the OAuth token RFC destination, specify the SSL certificate.

RFC destination with SSL certificate for OAuth

Create Validation Service Instance

In transaction SPRO or /ASADEV/ACI_SETTINGS, navigate to ASAPIO Integration Add-on – Connection and Replication Object Customizing. Add a new entry specifying the instance name and the RFC destination for the validation endpoint.

Validation service instance configuration

Configure Default Values

Add the following required default values to the instance:

Default AttributeValue
ACI_CLIENT_ID<client id>
ACI_TOKEN_DESTINATION<token rfc destination>
AUTH_TYPECERTIFICATE or OAUTH
Validation instance default values

Configure Client Secret (OAuth Only)

Required only for OAuth 2.0 with ClientID/ClientSecret — not required for certificate-based authentication.

In transaction SPRO or /ASADEV/SCI_TPW, navigate to ASAPIO Integration Add-on – Set the cloud connection password. Select the created cloud instance, enter the client secret in the Cloud Shared Secret field, and execute.

Configure OAuth client secret

Set Up Instance for AEM Service

This is performed after the Validation service configuration.

Create RFC Destination (SM59)

In transaction SM59, create a type G RFC destination for the AEM messaging endpoint. Obtain the target host and credentials from the Advanced Event Mesh Cluster Manager under Service Details > Connect tab.

RFC destination for AEM broker endpoint
AEM broker authentication details from Cluster Manager
RFC security settings for AEM broker

Create AEM Service Instance

In transaction SPRO or /ASADEV/ACI_SETTINGS, navigate to ASAPIO Cloud Integrator – Connection and Replication Object Customizing. Add a new entry with:

AEM service instance configuration

Configure Default Values

In the instance, navigate to Default Values and add:

Default AttributeValue
AUTH_INSTANCE<validation instance>
AEM instance default values

Setting up the outbound interfaces is described in Outbound Messaging.

Set Up Dynamic Topics

Dynamic topics let you generate topic names using payload values as fixed or variable segments.

Field Mapping Configuration

In the instance, navigate to the Field Mapping section and add a new entry specifying:

Dynamic topics field mapping configuration

Conversion Methods (from Release 2504 / 9.32504)

You can specify a conversion class/method to transform the value of a topic level — for example, to translate SAP-specific values to more commonly used terms, or to derive a new value such as a region from the data.

Dynamic topic conversion method configuration

Monitor Display

Dynamic and static URL segments are highlighted in the monitor view.

Dynamic topics highlighted in the monitor

Demo

The following demo shows SAP sales orders with inbound and outbound messaging, including dynamic topics features.

SAP AEM demo video thumbnail
SAP Advanced Event Mesh integration architecture diagram