Integration Blog Posts
cancel
Showing results for 
Search instead for 
Did you mean: 
azhariqbal
Discoverer
587

Graph is a new and innovative feature of API Management, part of the SAP Integration Suite. Expanding on traditional API Management, Graph allows you to present all your business data as a semantically connected data graph, accessible through a single, unified, and powerful API.

SAP Graph is generally available as a core capability within SAP Integration Suite includes the following new features:

  • A configuration UI for creating business data graphs – an extension of the new Integration Suite configuration UI.
  • The ability to extend the built-in Graph data model.
  • Graph Navigator (Enterprise Edition) – a tool for exploring and testing queries on your configured business data graphs.
  • GraphQL support (in addition to OData v4).

Graph Capability in Integration Suite:

azharsd_0-1767780018922.png

Graph can be used in any SAP Integration Suite plan where API Management is available (including SAP BTP trial accounts), but not necessarily in every region where API Management is available. For more details about the regional availability of Graph, be sure to check out SAP Note 3338820.

Enabling Graph on your Integration Suite

Ensuring the Required Roles and Enabling Graph

  1. Make sure you have the Integration Suite Provisioner role.
  2. Navigate to "Manage Capabilities" → "Add Capabilities" in your Integration Suite home.
  3. Enable API Management (if not already enabled) through the "Manage APIs" section.
  4. Enable API Business Hub Enterprise and Graph (API Business Hub Enterprise is mandatory for Graph).
  5. If Graph is not visible, refer to SAP Note 3338820, as it may not be supported in your region.
  6. Select "Enable API Business Hub Enterprise" and "Graph" to complete the setup.

Note: Graph requires SAP API Management to be activated.

azharsd_1-1767780018932.png

Assigning Roles for Graph

Once Graph is enabled, you will see two additional Role Collections in the SAP BTP Cockpit:

  • Graph.KeyUser – A role for Graph Developers to define Business Data Graphs (BDGs).
  • GraphNavigator.Viewer – A role for viewing graphs in Graph Navigator.

To proceed, go to your SAP BTP Cockpit and assign these Role Collections to your user.

azharsd_2-1767780018937.png

Note the term: Business Data Graphs. SAP refers to Graphs as BDGs or Business Data Graphs in their documentation.

That's it, you are all set for Configuring BDGs or Business Data Graphs! Logout and Log back on Integration Suite and you will now see Graphs Enabled in Integration Suite under Design Tab.

azharsd_3-1767780018939.png

 

Enable SAP Graph Entitlement on BTP Subaccount

In below screenshot Graph entitlement is enabled

azharsd_4-1767780018945.png

To enable SAP Graph (Business Data Graphs - BDGs) in your BTP Subaccount, follow these steps:

  1. Navigate to your BTP Subaccount.
  2. Go to EntitlementsConfigure Entitlements.
  3. Click "Add Service Plans".
  4. Select SAP Graph and choose the api service plan.
  5. Save your changes to apply the entitlement.

azharsd_5-1767780018955.png

Creating a Service Instance for SAP Graph

  1. Go to your BTP Subaccount.
  2. Navigate to ServicesInstances and Subscriptions.
  3. Click "Create" and select SAP Graph as the service.
  4. Choose the api plan.
  5. Provide a name for your service instance.
  6. Click "Create" to finalize the setup.

azharsd_6-1767780018966.png

azharsd_7-1767780018968.png

Creating a Service Key for SAP Graph

  1. Go to your BTP Subaccount.
  2. Navigate to ServicesInstances and Subscriptions.
  3. Find the SAP Graph service instance you created in the previous step.
  4. Click on the instance and select "Create Service Key".
  5. Provide a name for the service key and click "Create".
  6. Once generated, copy and save the Service Key, as it will be required for exploring Business Data Graphs (BDGs) using Postman.

azharsd_8-1767780018971.png

The Graph instance is created and Binded with its Service Key:

azharsd_9-1767780018974.png

Once your Service Key is created, make sure to note the following details:

  •  clientid – Required for authentication.
  •  clientsecret – Used for authentication along with the client ID.
  •  url – This is the Token URL used to obtain authentication tokens.
  • uri – Contains the hostname, which includes the GraphQL Endpoint hostname for accessing Business Data Graphs (BDGs).

You'll need these details when exploring BDGs using Postman or any API client.

azharsd_10-1767780018981.png

 Graph Creation

Fetch Sales Order Details with Customer Details

Imagine a S/4Hana System, where you have a BusinessPartner API and SalesOrder API exposed. This could be a S/4Hana On-Premises System or a S/4Hana Public Cloud Edition System. These are classic ODATA APIs from SAP – Business Partner ODATA API and Sales Order ODATA API.

Note: In my case I’m using SAP Business Accelerator Hub – API HUB

Querying Sales Orders and Customer Details with SAP Graph

In a typical integration scenario, querying Sales Orders from SAP S/4HANA and fetching Customer Details (SoldToParty) involves:

  1. Making an OData GET request to the Sales Order API to retrieve Sales Order details.
  2. Making another OData GET request to the Business Partner API to fetch the corresponding SoldToParty details.
  3. Enriching the data using SAP Cloud Integration to combine the two datasets.

Since SAP provides this information through two separate APIs, this approach traditionally requires two API calls and additional processing to merge the data. However, with SAP Graph (BDGs - Business Data Graphs), you can simplify this by using a single GraphQL query to fetch Sales Orders and their associated Customer details in one call.

Simplifying Data Retrieval with SAP Graph

Traditionally, in SAP Cloud Integration, fetching Sales Order details along with SoldToParty (Customer Details) from S/4HANA Cloud requires:

  • Multiple OData API calls (one for Sales Orders, one for Business Partners).
  • Content Enrichers to merge and process the data.
  • Lookups to fetch related information across different API endpoints.

This is a common challenge when integrating SAP and non-SAP SaaS applications.

The Power of SAP Graph (BDGs - Business Data Graphs)

With SAP Graph on Integration Suite, you can retrieve all this data in one API call—with no custom development!

SAP Graph introduces the concept of Mirrored Entities, which allows you to:

  • Access data from multiple APIs as a single, unified data model.
  • Query related entities (e.g., Sales Orders and SoldToParty) in a single request.
  • Reduce integration complexity and eliminate the need for multiple lookups/enrichers.

What’s Next?

We’ll explore Mirrored Entities in SAP Graph and see how they can simplify fetching Sales Order details along with Customer details from an Business Accelerator Hub—all in one call.

Creating Destinations on SAP BTP

To integrate SAP Graph with your S/4HANA Cloud or On-Premise system, you need to create destinations on your BTP Subaccount.

Prerequisites

  • You have your OData API endpoint for Sales Orders and Business Partners.
  • A Technical Communication User is set up with the required roles and permissions to access these APIs.

Steps to Create Destinations in BTP

  1. Navigate to BTP Cockpit
    • Go to your BTP Subaccount where Integration Suite / Graph is running.
    • Open the Destinations section.
  2. Create a Destination for Sales Orders API

azharsd_11-1767780018983.png

  1. Create a Destination for Business Partner API

azharsd_12-1767780018985.png

Setting Up a Business Data Graph in Integration Suite

Next, we’ll create a Business Data Graph (BDG) in SAP Integration Suite. To get started, go to Integration Suite → Design → Graph.

azharsd_13-1767780018989.png

Once destination as source are added, click next, review the configurations, below screen will appear in a while after processing

azharsd_14-1767780018993.png

Click on Activate.

Test Your Graph on Graph Navigator

azharsd_15-1767780018999.png

 

azharsd_16-1767780019003.png

azharsd_17-1767780019007.png

 

Validating Graph OData API

As discussed earlier, all Business Data Graphs (BDGs) created in SAP Integration Suite are accessible via OData V4 APIs, as documented in SAP's official guides.

Now, we’ll use the Service Key generated in the previous step to obtain an OAuth token and authenticate our request to test the Graph OData API.

Note the URI in your Service Key has the format

https://<subdomain>.a.integration.cloud.sap/graph/api

List all BDGs

azharsd_18-1767780019015.png

 List all Services of a BDG (namespace)

List all namespaces of a Specific BDG. Namespaces can be sap.s4, sap.graph, sap.hcm and so on.

azharsd_19-1767780019022.png

List all Entities in a namespace in a BDG

Entities of a Graph can be displayed using below

azharsd_20-1767780019028.png

Get Metadata of a Service (Namespace)

azharsd_21-1767780019036.png

Test our Service to get Sales Order Details with SoldToParty

In our example this will be in below format

  • Use _SoldToParty for expanding SoldToParty ( note the “underscore”). Thats the standard Graph Notation when you have automatic associations built ( from Sales Order to Business Partner API in our case )

azharsd_22-1767780019040.png

That's it! We have successfully invoked your Graph OData V4 API and retrieved Sales Order data enriched with Business Partner details.

What would typically require a two-step process using a Content Enricher in Cloud Integration is now streamlined into a single API call—thanks to Graph on Integration Suite.

 SAP Graph has the below GraphQL endpoint :

https://<subdomain>.a.integration.cloud.sap/graph/api/<bdg>/graphql

 azharsd_23-1767780019044.png