OData Service Generation and Registration
April 15, 2019

  1. Design / Prototype
  2. Create Dictionary Objects
  3. Create Interface View (CDS)
  4. Business Object Generation (CDS – Object Model Annotations )
  5. Generated Business Object
  6. BOPF – Development
  7. Test BOPF Object using BOBT
  8. Access Control (CDS)
  9. Consumption View (CDS)
  10. OData Service Generation and Registration
  11. Test OData Service using SAP Gateway Client
  12. UI development

OData is an open protocol to allow the creation and consumption of queryable and interoperable RESTful APIs in a simple and standardway.
(Source)
Understand OData in 6 Simple Step
OData – Everything that you need to know

Note: In this scenario, we are not using OData annotation @OData.publish: true because data and model provider class are not generated, directly service is generated which can be registered on the gateway.

Step 1: Go to transaction SEGW (SAP gateway Service Builder) and click on Create. Enter the Project name and description. Select project type as Service with SAP Annotation and Standard strategy. Save to your package or local object.

Generated SAP Service Builder Project

Step 2: Right click on Data Model and select Reference=>Data Source

Step 3: Enter the CDS View name and click on Next and select the relevant node then click on Finish.

Generated SADL Exposure artifacts Entity Types, Complex Types, Associations, Entity Sets, Association Sets, Function Imports

Step 4: Click on Generate Icon and generate artifacts.

  • Data provider class
  • Model Provider class
  • Model Name
  • Service name

Step 5: Register your service for available gateway in the system. Expand Service maintenance and select a gateway and register.

<< Top