Use an OData Source in the App Designer

Once you have created and saved an OData Source, you can reference it in any app by attaching an OData model to the app’s resources and binding UI controls to entity sets or entity types.

Prerequisites

Procedure

Attach the OData model

  1. Create a new app in the App Designer.

    odata source app designer new
  2. Since there are no settings to be changed in Application Setting, go to Designer.

    odata source app designer goto
  3. In the object search field of the Component library, type odata.

    Result: The model objects ODataModelV2 and ODataModelV4 appear.

  4. Drag the appropriate model — ODataModelV2 or ODataModelV4 — into the Application tree.

    odata source app designer object search
  5. Select the new model entry.

    odata source app designer odata destination

    In the Properties pane:

    1. Give the model a descriptive name.

    2. In the OData Destination drop-down, select your OData Source.

Bind a UI control to an entity set

  1. Drag and drop the UI elements App, Page, and Table from the Component library into the Application tree, each as subitems.

  2. Open the binding dialog for the element.

    odata source app designer open binding
  3. Expand the entity set tree for your OData Source and select the target entity set, for example Customers.

    odata source app designer binding dialog
  4. To add bound fields automatically, right-click the element (for example, the Table object) and choose:

    • Wizard → Insert Fields – Display for read-only fields, or

    • Wizard → Insert Fields – Edit for editable fields.

      odata source app designer insert fields
  5. In the field selection dialog, choose the fields to include and adjust column header labels as required.

    odata source app designer wizard

    Selected OK, bind selected fields.

Set the initial load behavior

On the bound element, locate the setInitialLoad attribute and set it to Online if you want the OData service to be called immediately when the app starts.

odata source app designer bind element

Activate and run

  1. Select Activate to publish the app.

    odata source app designer activate app
  2. Select Start (or open the app URL) to run it and verify the data loads as expected.

    odata source app designer table data

Binding approach: OData model vs intermediate JSON model

When binding a UI control to OData data, there are two approaches.

Direct OData binding: the UI control talks directly to the OData model. OData read, sort, filter, and navigation operations work natively without additional JavaScript. This is the simpler approach for online scenarios.

Intermediate JSON model: the OData read operation pulls data into a local JSON model, which is then bound to the control. This enables offline scenarios because the JSON model can be cached locally. However, write operations (create, update, delete), sorting, and filtering against the OData service require manual JavaScript implementation.

In Neptune DXP - SAP Edition, OData handling was originally designed around JSON models. Direct OData binding is fully supported for read scenarios but requires a solid understanding of OData mechanics for more advanced patterns involving CRUD operations.