Show TOC

Creating OData Channel ContentLocate this document in the navigation structure

Use
This guide explains how to get started with OData Channel quickly on the basis of an SFLIGHT example. The tasks which need to be done first to get an OData Channel application up-and-running are described. The basic steps focus on two classes:
  • Runtime /IWBEP/CL_MGW_RT_SFLIGHT (delegates the runtime methods to inner classes)
  • Metadata /IWBEP/CL_MGW_MED_SFLIGHT
Scenario
The SAP Gateway application in this guide is based on the SFLIGHT demo scenario and gives you a step-by-step guidance to create a simple OData application which returns a list of flights and carriers from the backend. The main points are as follows:
  • Flight and carrier entities are used
  • The flight entity is enriched with complex type for flight details
  • Association are used to connect flight and carrier
    • The navigation property is used to navigate from a flight to its carrier
    • The navigation property is used to navigate from a carrier to its flights
  • Function imports are used to retrieve all flights from a specific city
Proceed with the following documents for the procedure:
  1. SAP Business Suite Backend System
    1. Create the Metadata Provider Class (MPC)
    2. Create the Data Provider Class (DPC) for the Runtime
    3. Register the Model / Service
  2. SAP Gateway Hub System
    1. Activate the Service
    2. Delete the Service
Note Note that you can also carry out all steps outlined above in your SAP NetWeaver system where component SAP_GWFND is available.
Example
A more sophisticated SFLIGHT demo scenario is part of the SAP Gateway standard shipment in package /IWBEP/MGW_SAMPLE_SFLIGHT in your backend system. All CRUD methods are supported. You can find the implementation in the following classes:
  • /IWBEP/CL_MGW_MED_SFLIGHT for the metadata.

  • /IWBEP/CL_MGW_RT_SFLIGHT for the runtime. This class delegates the runtime methods to inner classes.

For the enhanced SFLIGHT model the technical service name is /IWBEP/RMTSAMPLEFLIGHT_2 and the external service name is RMTSAMPLEFLIGHT_2.

You can find general information on the SFLIGHT model in Flight Model.