Show TOC

Creating a Consumption ModelLocate this document in the navigation structure


A consumption model represents an OData service by bundling a set of SAP Gateway data models for a specific consumption use case. Each data model is represented by one or more corresponding entity types or collections in the resulting service.

You create a consumption model using in the ABAP Workbench design time in transaction SE80 and subsequently add data models to it. You can also create a consumption model and assign it to a particular data model in the tree view.


The consumption model and the data models within it must be created on the same channel, that is, you cannot add a data model that was created on the OData Channel to a consumption model that was created on the Generic Channel, and vice versa.

Futhermore, you cannot include data models that were created on both channels in the same consumption model.

  1. Either:

    • Start transaction SE80.

    • Select SAP GW Consumption Model from the dropdown list.

  2. Or, with a data model displaying in the SE80 tree view:

    • Right-click Related SAP GW Consumption Models.

    • Select Add Consumpt. Model.

  3. Enter a name for the consumption model and press Enter.

    A dialog box displays, informing you that the consumption model does not exist and asking if you wish to create it.

  4. Select Yes and the Create Consumption Model dialog box displays.

    The name you entered is displayed as the Service Technical Name, the version is 0001 (read-only), and you must enter a description (mandatory).


    You cannot change the consumption model Description after you have created it since this field is read-only in the Properties Editor.

  5. The OData Channel checkbox is selected by default. Deselect this checkbox if you want to create the consumption model on the Generic Channel. While you can choose to use the Generic Channel, you are strongly recommended to use the OData Channel.

  6. Select the green checkmark to continue.

    The Create Object Directory Entry dialog box displays.

  7. Select Local Object or a package and the Save icon, and the consumption model is created.

  8. Right-click the consumption model in the tree and select Add SAP GW Data Model to add one or more data models to the consumption model.

    If you created the consumption model directly from data model, the consumption model is assigned to that particular data model and displays under Related SAP GW Consumption Models in the tree view.

  9. You can add further data models by navigating to the consumption model itself, right-clicking it and selecting Add SAP GW Data Model. You cannot add data models from the Related SAP GW Consumption Models folder.

  10. Each consumption model has a unique URL, which displays in the URL field so that you can view the consumption model in your browser. Select the XML and Metadata buttons at the end of the URL field to see the different views of the service. See also Consumption Model URL and Checking the Service.

Editing a Consumption Model

You can edit an existing consumption model (add or delete data models, and edit data models within the consumption model). You can also reassign the consumption model to a different package.

To find and modify a consumption model, proceed as follows:

  1. Start ABAP Workbench in transaction SE80.

  2. Select SAP GW Consumption Model from the dropdown list.

  3. Use the search icon (binoculars) next to the field on the left-hand side of the screen where the name normally displays to find the consumption model you want to modify. Expand the tree view to display the models.

  4. To add one or more data models to the consumption model, right-click the consumption model name and select Add SAP GW Data Model.

  5. To delete a data model from the consumption model, right-click the data model and select Delete SAP GW Data Model.

  6. To reassign the consumption model to a different package, right-click the consumption model name, select Reassign package, and enter the new package details in the reassignment dialog box.

  7. To edit a data model within the consumption model, double-click it. The Properties Editor and the Annotation Editor are displayed on separate tab pages and you can make changes as required.