Since RAP does not have a Initial Load Feature, a simple Cloud Integration Flow is able to fetch the current Data of a System via Odata and pass it to AEM using the AEM Adapter.
Prerequisite is of course that the API is activated on the S/4HANA System.
This is how the Iflow looks like:
Since an Init Load only needs to run once, we set the Timer like this:
We are calling the Local Integration Flow in a Loop (explained [here](https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-cloud-integration-loo... it might be possible that there is so much data in the system that one call would return a too large Payload. Using the EDMX File from the SAP Accelerator Hub (https://api.sap.com/api/API_BUSINESS_PARTNER/resource/Business_Partner) the required fields can be selected in a wizard. Additionally we specify how many Records we want:
Query Options:
$select=BusinessPartner,BusinessPartnerGrouping,FirstName,LastName,to_BusinessPartnerAddress/AddressID,to_BusinessPartnerAddress/ValidityStartDate,to_BusinessPartnerAddress/ValidityEndDate,to_BusinessPartnerAddress/StreetName,to_BusinessPartnerAddress/CityName,to_BusinessPartnerAddress/HouseNumber,to_BusinessPartnerAddress/PostalCode,to_BusinessPartnerAddress/Country&$expand=to_BusinessPartnerAddress
In the next Step we have a Splitter to create individual Events:
Then we set the Grouping as Property, because we want to set the Topic dynamically
Odata V2 also supports JSON, the Odata V2 Adapter does not. Alternatively you can use the HTTP adapter and build the query yourself. With XML as returned Payload we need a converter:
Last Step: Set up the AEM Adapter. Important here is to use the Grouping Property for the dynamic Topic:
Test: For Testing I have added a Consumer Iflow subscribing to Topic sap/businessPartner/> (for all Groupings)
One Example Message:
Headers
Payload
If I change the BP manually, it should appear as well:
Changed the Address
--> Result in AEM (This Changed Event is triggered by AIFAEM)
(on the left we see the Payload from the Init Load Iflow, only the order is different, which should be fine. It might be possible that the Odata Pull returns a different Payload than the Event pushed by the ERP. In this case you either need to add a Mapping on Integration Suite or design your Custom Event so it fits to the Odata Payload from the beginning.
Advantages:
- Clean Approach without any changes in the backend except activation of the Odata API
- Does not matter what Even Enablement is used on S/4HANA. Any Migration between Event Enablement Options does not affect this
Disadvantages:
- Payload has to be aligned with Event when the corresponding Object is changed (if the Init Load goes into the same Topic)
API has to be available, activated and one Iflow for it designed specifically.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 46 | |
| 45 | |
| 39 | |
| 38 | |
| 30 | |
| 28 | |
| 27 | |
| 24 | |
| 24 | |
| 23 |