OL0: Setup OData Services

Operational Data Provisioning (ODP) Services Lab Setup

In order to excute the ODP lab, the following ODP Services and Entities have to be setup in your default client (e.g. SAP CAL: Client 001):

Object ODate Service Entity Set
Business Partner ZPARTNERS_SRV EntityOfSNWD_BPA
Product ZPRODUCT_SRV EntityOfSEPM_IPRODUCT
Sales Order Header ZSALES_SRV EntityOfSEPM_ISO
Sales Order Item ZSALES_SRV EntityOfSEPM_ISOI

Creating SAP Data Source

  1. Create a new Data Source using Transaction RSO2. Provide a data source name SNWD_BPA and click create.

Node

Fill the data source information

  • Applic.Component: Select NEW_HIER_ROOT
  • Short description: “Desired name”
  • Medium description: “Desired name”
  • Long description: “Desired name”
  • Input the table: SNWD_BPA (Partners)

Node

  1. Before saving the data source -> Double click the view table -> Validate the table structure -> Validate the number of entries in the table

Node

  1. Go back to the data source page -> Click save -> Click Local Object -> Save

Node

Node

  1. In the next step -> Click save from data source page -> Click Save to save the data source.

Node

Node

Node

  1. Enable Change Data Capture. From your data source name SNWD_BPA -> click Generic Delta -> select Field CHANGED_AT -> select Time Stamp (UTC) -> click save -> click save ->click save to complete the update.

Node

  1. Create OData Service using Transaction SEGW. Click create->Update “desired name for project” -> Update “desired name for description” -> click Local object

Node

OData is a Web protocol based on REST, for querying and updating data, applying and building on Web technologies such as HTTP, Atom Publishing Protocol (AtomPub), and RSS (Really Simple Syndication) to provide access to information from a variety of applications. It is easy to understand and extensible, and provides consumers with a predictable interface for querying a variety of data sources. Refer SAP documentation to understand OData with SAP.

  1. Create data model using SAP’s ODP Extraction redefine process. Right Click the OData service -> select the Redefine ODP Extraction -> Update “desired name for description” -> click Local object

Node

ODP Extraction is the framework that will be used in the data lake labs to pull the data.

  1. Select the ODP context as Data Source/Extractor -> select ODP name (Data Source) as SNWD_BPA (Created Earlier) -> Click Add to ODP.

Node

  1. Click Next -> In the next wizard screen -> update the description with desired name -> click Local Object for the Wizard to create ABAP classes to pull the data.

Node

  1. In the next wizard screen -> Select all the data model to support Delta updates only for the Delta Extraction -> Click finish

Node

  1. From your SAP Gateway service screen -> click runtime feature to create runtime objects - use local object once again

Node

  1. From your SAP Gateway service screen -> click GW_HUB from the Service Maintenance Section -> Click Register -> Click Local Object -> Click green ok option to register

Node

Node

  1. From your SAP Gateway service screen -> click GW_HUB from the Service Maintenance Section -> Click SAP Gateway Client -> Yes to Pop-up

Node

  1. From SAP Gateway Client -> Click Execute -> Check the 200 status code -> Copy the ODP Service name which ends with ‘_SRV’ and the entity set collection.

Node

ODP Service name: ZPARTNERS_SRV
Entity Set: EntityOfSNWD_BPA

Create the following ODP Services and EntitySets

Now, using the instructions above create an Extractor (rso2) and OData service (segw) for

Object Data Source (rso2) Delta Property OData service (segw)
Business Partner (already done) SNWD_BPA CHANGED_AT, Time Stamp (UTC) ZPARTNERS_SRV
Product SEPM_IPRODUCT LASTCHANGEDDATETIME, Time Stamp (UTC) ZPRODUCT_SRV
Sales Order Header SEPM_ISO LASTCHANGEDDATETIME, Time Stamp (UTC) ZSALES_SRV
Sales Order Item SEPM_ISOI n/a ZSALES_SRV

You can use the same OData service ZSALES_SRV for Sales Order Header and Item tables as shown above!

Below screenshots show the desired configuration.

Data Source View (TCODE rso2):

Node

Gateway Service Builder View (TCODE segw):

Node

OData Service View (Note: Entity Set naming might be different, depending on your rso2 data source name):

Object ODate Service Entity Set
Business Partner ZPARTNERS_SRV EntityOfSNWD_BPA
Product ZPRODUCT_SRV EntityOfSEPM_IPRODUCT
Sales Order Header ZSALES_SRV EntityOfSEPM_ISO
Sales Order Item ZSALES_SRV EntityOfSEPM_ISOI