Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
HamidrezaLaleh
Advisor
Advisor

In this part we address you, a person with an IT administrative role and responsibilities for enterprise data. Please refer to Part 1 for an introduction to Graph, and to the Information Map for an overview of the entire tutorial series.

As always, you can find all the details for what we are going to discuss here in the Graph documentation on the SAP Help Portal.

The SAP Business Technology Platform (SAP BTP)

Enterprises and other companies deploy a variety of business software solutions to manage their major business processes. We refer to these software systems as data sources, and to the collection of data sources as the landscape. As we shall see, the business data graph is a connected graph of the business data in your landscape.

Enabling access to a landscape involves a great many concerns, related to connectivity, user management, trust, and other security topics. Establishing these aspects is exactly the role of SAP’s Business Technology Platform (SAP BTP), available on multiple cloud infrastructure providers. As an owner of data sources, you use the SAP BTP cockpit as the central point of entry, where you can access your accounts manage all activities associated with them.

Graph is a powerful addition to the API Management capability in SAP 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.  

Configuring Graph

If you are not familiar with the SAP BTP cockpit, there are many blogs, videos and tutorials (like this one) to make you feel at home. Here we will assume some familiarity with the SAP BTP Cockpit to apply the following process:

  1. Create a subaccount, which represents your landscape
  2. Create the SAP Integration Suite service
  3. Add Graph to SAP Integration Suite
  4. Assign yourself Graph roles in SAP BTP         
  5. Set up destinations to the data sources of your landscape
  6. Generate credentials, by creating a service binding

Step 1: Create a subaccount

Use the SAP BTP cockpit to login to your “global” account. Create a subaccount:

HamidrezaLaleh_0-1708674971710.png

 

  • Enter the subaccount display name, for instance Graph Sandbox (this will also fill the subdomain field with a unique string)
  • Set Region, for example to Europe (Frankfurt) under Amazon Web Services (CF-EU10).

Click Create; wait until the subaccount is created.

Next, enter the subaccount by clicking on its tile, select Entitlements from the left-side menu, click Configure Entitlements and then Add Service Plans, search for SAP Integration Suite, check the plan you wish to use, and confirm by clicking the Add 1 Service Plan button. Don’t forget to click Save.

Note: The SAP Integration Suite trial plan is automatically entitled for the default SAP BTP Trial subaccount, and Graph can also be seamlessly deployed there.

Step 2: Create the SAP Integration Suite service

In the SAP BTP cockpit, select Instances and Subscriptions from the left-side menu, click Create and then configure the SAP Integration Suite service with your desired plan.

Then select Security > Users from the left-side menu and assign your user the Integration_Provisioner role collection. You can do this by clicking the user name, and then selecting ‘’ under the Role Collections table. Find the Integration_Provisioner role collection and assign it.

HamidrezaLaleh_1-1708674971717.png

 

Step 3: Add Graph to SAP Integration Suite

At this point, you should have an SAP Integration Suite application that you can access and add capabilities to. Go to Instances and Subscriptions in the left-side menu, and open the SAP Integration Suite application.

HamidrezaLaleh_2-1708674971723.png

 

Select Add Capabilities to open a menu where you can select Manage APIs.

HamidrezaLaleh_3-1708674971728.png

 

By clicking Next, you are taken to the API Management setup step where you must enable both API Business Hub Enterprise and Graph.

HamidrezaLaleh_4-1708674971731.png

 

Finally, select Activate and wait for the newly configured capability to show ‘Active’ for all selected features.

Step 4: Assign yourself Graph roles in SAP BTP         

Graph has two dedicated SAP BTP role collections: Graph.KeyUser and GraphNavigator.Viewer. The role collection GraphNavigator.Viewer provides access to explore the entities and try out OData queries on the real data reflected in the business data graphs in the SAP BTP subaccount in the Graph Navigator tool in SAP API Business Hub Enterprise. This role collection is relevant for developer persona.

The role collection Graph.KeyUser is required to configure business data graphs in the SAP Integration Suite application. The Graph.KeyUser role collection also includes navigator viewer role to access Graph navigator.

Select Security > Users from the left-side menu and assign your user the Graph.KeyUser role collection. You can do this by clicking the username, and then selecting ‘…’ under the Role Collections table. Find the role collection and assign it.

At this point, you should be able to navigate to the Graph user interface in the SAP Integration Suite application. You can open the Graph user interface from the SAP Integration Suite application left-side menu under Design Artifacts. We will come back to the Graph user interface in the next part of the blog tutorial series. The rest of the blog focuses on the remaining setup in the SAP BTP cockpit.

Step 5: Create destinations

In this tutorial, we will use the SAP Business Accelerator Hub sandbox systems as data sources. Note that creating destinations to other data sources is often more complex, due to trust establishment. Refer to the Graph documentation for more information.

Within the same subaccount, select Connectivity / Destinations from the left-side menu and click New Destination, as follows:

HamidrezaLaleh_5-1708674971733.png

 

Fill in the form as follows to create a destination to the SAP CX Sales Cloud sandbox system:

HamidrezaLaleh_6-1708674971736.png

 

Use cxsalescloud as the name and https://sandbox.api.sap.com/sap/c4c/odata/v1/c4codataapi/ as the URL.

Since the sandbox APIs require an API key in HTTP headers, we will add this header. Click New Property, then enter URL.headers.apiKey as property name and enter your unique API key from the SAP Business Accelerator Hub as the value. Then Save.

You can easily repeat this process to create additional destinations, by cloning this destination, and changing the Name and URL fields. Go ahead, and add another destination named s4_product, with the following URL: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_PRODUCT_SRV

Here are additional useful API services to consider:

 

 

Step 6: Create a Graph service instance

To consume your Business Data Graph OData endpoint, you need to have service credentials to get a valid token. To do so within the same subaccount, select Services / Instances and Subscriptions from the left-side menu, and then click Create in the top-right corner.

In the wizard:

  1. Select SAP Graph from the drop-down service menu.
  2. Select the api service plan.
  3. Leave Other as runtime environment.
  4. Enter an instance name, e.g., sapgraph1. Choose Create.
  5. Click the three dots to the right of the created instance and select Create Service Binding 

HamidrezaLaleh_7-1708674971736.png

     6. Download and save the created credentials as a text file:

HamidrezaLaleh_8-1708674971736.png

 

In summary

The steps above complete the configuration of the landscape and the preparations for creating a business data graph for your developers. The final step is to create the business data graph itself – this will be the topic of the next part of this tutorial series.

________________________________________________________________
Hamid Reza Laleh, Product Owner – Graph
Visit Graph on the SAP Community