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:
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
- Make sure you have the Integration Suite Provisioner role.
- Navigate to "Manage Capabilities" → "Add Capabilities" in your Integration Suite home.
- Enable API Management (if not already enabled) through the "Manage APIs" section.
- Enable API Business Hub Enterprise and Graph (API Business Hub Enterprise is mandatory for Graph).
- If Graph is not visible, refer to SAP Note 3338820, as it may not be supported in your region.
- Select "Enable API Business Hub Enterprise" and "Graph" to complete the setup.
Note: Graph requires SAP API Management to be activated.
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.
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.
Enable SAP Graph Entitlement on BTP Subaccount
In below screenshot Graph entitlement is enabled
To enable SAP Graph (Business Data Graphs - BDGs) in your BTP Subaccount, follow these steps:
- Navigate to your BTP Subaccount.
- Go to Entitlements → Configure Entitlements.
- Click "Add Service Plans".
- Select SAP Graph and choose the api service plan.
- Save your changes to apply the entitlement.
Creating a Service Instance for SAP Graph
- Go to your BTP Subaccount.
- Navigate to Services → Instances and Subscriptions.
- Click "Create" and select SAP Graph as the service.
- Choose the api plan.
- Provide a name for your service instance.
- Click "Create" to finalize the setup.
Creating a Service Key for SAP Graph
- Go to your BTP Subaccount.
- Navigate to Services → Instances and Subscriptions.
- Find the SAP Graph service instance you created in the previous step.
- Click on the instance and select "Create Service Key".
- Provide a name for the service key and click "Create".
- Once generated, copy and save the Service Key, as it will be required for exploring Business Data Graphs (BDGs) using Postman.
The Graph instance is created and Binded with its Service Key:
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.
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:
- Making an OData GET request to the Sales Order API to retrieve Sales Order details.
- Making another OData GET request to the Business Partner API to fetch the corresponding SoldToParty details.
- 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
- Navigate to BTP Cockpit
- Go to your BTP Subaccount where Integration Suite / Graph is running.
- Open the Destinations section.
- Create a Destination for Sales Orders API
- Create a Destination for Business Partner API
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.
Once destination as source are added, click next, review the configurations, below screen will appear in a while after processing
Click on Activate.
Test Your Graph on Graph Navigator
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
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.
List all Entities in a namespace in a BDG
Entities of a Graph can be displayed using below
Get Metadata of a Service (Namespace)
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 )
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.