Show TOC

Manually Add Your Model to a Consumption ModelLocate this document in the navigation structure

Concept

You manually create a Consumption Model in the ABAP Workbench after you have generated your model.

Use the Object Navigator button at the top of the Data Model generator screen or use transaction SE80 in the ABAP Workbench to create the Consumption Model, and then add your Data Model to it.

To create a Consumption Model:

  1. Right-click Related SAP GW Consumption Models, and select Add Consumpt. Model under the Data Model name, for example. ZJWTEST_0001_PS, .

  2. Enter a name for the Consumption Model and press Enter.

    A popup displays, informing you that the Consumption Model does not exist and asking if you wish to create it.

  3. Select Yes and the Create Consumption Model popup displays.

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

    The OData Channel box is checked by default.

    Note

    The external name must not contain any underscore characters “_”.

    You cannot change the Consumption Model Description once you have created it; this field is read-only in the Property editor.

  4. Select the green check mark to continue.

    The Create Object Directory Entry popup displays.

  5. Select Local Object or a package and the Save icon, and the Consumption Model is created.

    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. Each Consumption Model has a unique URL, which displays in the URL field so that you can view the Consumption Model in your browser.

  6. Select XML or Metadata at the end of the URL field to see different views of the service.

You can also create a Consumption Model and assign it to a particular Data Model from the Data Model in the SE80 tree view.

The next step is to manually assign the system alias defined in the Data Model to the service document. For more information, see Configuring the System Alias for your Service.

More Information

You can use SAP Gateway Generators Cookbook to quickly create a Data Model and test the generated SAP Gateway service.