Create the integration flow

Create the integration flow

In this lesson, the integration flow as advised by the Integration Assessment request will be implemented using the Cloud Integration capability. This integration flow will then be exposed as a REST API via the API Management capability so that it can be used by any developer or integration expert.

The integration flow in this example is designed to retrieve and consolidate maintenance orders associated with products that have been purchased. The overall objective is to enable a unified view of maintenance obligations linked to each product, regardless of the system in which they were generated or processed.

  • Source System - SAP S/4HANA Cloud Public Edition

    • Product purchase orders are initially processed within SAP S/4HANA Cloud Public Edition.
    • These orders contain key details such as product IDs, customer information and order references.
    • Once a product is purchased, it may be eligible for associated maintenance services.
  • Maintenance Data - PostgreSQL Application Database

    • Maintenance orders, which are triggered based on the purchased products, are stored in a separate PostgreSQL-based application database
    • Each maintenance order includes information such as maintenance type, schedule, product ID and customer reference.
  • Integration Flow Execution

    • The integration flow, developed using SAP Integration Suite, connects to both the SAP S/4HANA Cloud system and the non-SAP PostgreSQL database
    • It extracts purchase order data from S/4HANA Cloud and queries the PostgreSQL database to fetch the related maintenance orders.
    • Using product identifiers and order references as correlation keys, the flow matches maintenance orders with their respective purchase records.
  • Consolidation and Output

    • The combined data is then transformed into a unified structure, suitable for reporting, monitoring, or downstream processing.
    • Optionally, this consolidated data can be sent to a target system such as SAP Analytics Cloud, a data warehouse, or another backend for further use.

Note

The artifacts created in the exercises will be suffixed with your Basic Trial user ID. This is only required as the artifacts are being created in the

Chap_1_

Try it out!

  1. Access the Lobby service and expand the Design section in the left-hand menu.

    Chap_1
  2. Select Integrations and APIs below Design to see the current list of available integration packages.

    Chap_1

Create the Integration Package

When you log into Cloud Integration, you can discover and download predefined integration packages. These packages contain artifacts like integration flows that implement specific use cases.

This content is delivered and supported by SAP (or partners) and can be used to quickly implement specific integration projects. Feel free to browse for existing integration packages. However, in this exercise, we will create an integration package and integration flow from scratch.

Continue by creating a custom Integration package called orders_

  1. In the Integration and APIs design screen, select Create to begin creating an integration package.

    Chap_1
  2. Provide the following details:

    • Name: orders_{placeholder|userid}
    • Technical Name: will be auto-filled with orders{placeholder|userid}
    • Short description: This package contains artifacts to process orders
  3. Select Save once finished.

    Chap_1

Within an integration package, it’s possible to add several artifacts such as REST APIs, OData APIs, integration flows, mappings, and more. In this exercise, we will create an integration flow.

Note

In the Cloud Integration service, within your package, make sure that you are in

Copy Integration Flow from pre-built template

Use the Maintenance_Sales_Order_read_template_complete template that provides a partially pre-configured integration flow, including components such as the Sender, Receiver, JDBC, Groovy Script and the Start and End steps.

This approach is intended to save time during initial development. If you’d like to explore and complete the full configuration in more detail, proceed to the next (optional) lesson.

  1. Select Integration and APIs to choose the template package.

    Chap_1
  2. Choose the Basic_Trial_SAP_Integration_Suite_Templates package from the list.

    Chap_1
  3. Select the Artifacts tab.

    Chap_1
  4. Select the Maintenance_Sales_Order_read_template_complete Integration Flow, choose the Actions icon, and select Copy.

    Chap_1
  5. In the dialogue box that pops up, rename the Integration Flow with the following name _MSO_iFlow_1

    Chap_1
  6. Choose Select to open the list of packages available.

    Chap_1
  7. Find and select the package orders_ as target.

    Chap_1
  8. Finally, select Copy to copy the _MSO_iFlow_1 integration flow to your orders_ package.

    Chap_1
  9. Navigate to your orders_ package when prompted

    Chap_1

Configure the Integration Flow

The following steps will perform the minimal configuration which is required to use the Maintenance_Sales_Order_read_template_complete template.

  1. Open the newly copied Integration Flow found in Artifacts

    Chap_1
  2. Select the Edit button to start making changes to the Integration Flow.

    Chap_1
  1. Select the HTTPS connector in the Integration Flow and change the value of the Address field to the following:

    Code Snippet
    1
    /{placeholder|userid}_MSO_iFlow_1

    This ensures a unique custom endpoint will be used. This is the only configuration change required.

    Chap_1

Note

In case the configuration screen is not visible after selecting the HTTPS connector, it will need to be dragged up from the bottom of the screen.
  1. Save the integration flow.

Deploy Integration Flow

Once the integration flow has been successfully saved, a corresponding status message is displayed. The following steps will show how to deploy the newly created integration flow.

  1. Select Deploy in the top right to deploy the iFlow.

    Chap_1

    Note

    The Deployment Status is currently
  2. Confirm the transaction handling configuration when prompted

    Chap_1

    Chap_1

    Chap_1

    Note

    Runtime Status should now be
  3. Monitor the deployment status. Choose Monitor in the menu on the left, select Integrations and APIs, then select the All tile under Manage Integration Content.

    Chap_1
  4. Select the _MSO_iFlow_1 iFlow (might need to find it with the search bar) and then press the refresh button until the iFlow url endpoint appears.

    Chap_1

    Chap_1

Test the Integration Flow

Now that you have finished the configuration of the integration flow, let’s test it.

  1. Launch the following SAP Integration Flow Test web application.

  2. Copy the URL of your deployed integration flow from the previous step, and paste it into the field where it says Enter Endpoint URL.

  3. Press Submit and observe the response.

Chap_1
  1. The response should now display a JSON collection of product data from the S4/HANA system, along with any associated maintenance contracts from the PostgreSQL DB:

Chap_1

Congratulations! You are now ready for the next lesson!