Show TOC

Data Model Generator Support for Data SourcesLocate this document in the navigation structure

This section provides a set of guidelines to help you identify the SAP functions, and transactions that are supported in the data source types of the Data Model Generator tool.

Before you create a Data Model using a data source, you must make sure that the SAP functions you choose in your data source are supported by the Data Model Generator tool.

You do so to enable the SAP Gateway service generated from your Data Model to be Open Data protocol (OData) compliant.

Although, the services created using the Data Model generator are OData compliant, they are not fully compliant.

Due to technical limitations, the following capabilities described by OData are not supported:

  • You cannot map different data sources to different nodes in a model, as operations in all data source providers are defined on the model level.

  • All data source providers fully support CRUD, and Query operations. However Screen Scraping does not support CUD operations on table entries. For this reason, you can only read the content of table controls but you cannot modify them.

  • The operations are supported in their simple form. Mass processing using $batch and deep inserts are not supported.

  • Function imports are not supported.

  • Create and Query operations can be defined only in the root node.

  • Support for $filter, $top, $skip, in BOR and RFC data sources depend on the availability of a corresponding MAX_HITS, or MAX_ROW parameter in the data source.

    Not all the query options are supported.

General Guidelines

The following guidelines apply to all data sources:

  • Each model must include a Query operation to retrieve instances of the model.

    The data source must have a Query operation that can be mapped and provided in an instance of the model, for example, most BAPIs for the BOR data source have a GetList method.

    The output of the Query operation must include a Property that has been set as key in the model.

  • Each model must include a Read operation to retrieve details for an instance of the model.

    The data source must have a Read operation which can be mapped and provided in an instance of the model, for example, most BAPIs for the BOR data source have a Get_Detail method.

    The input data for the Read operation must include a Property that has been set as key in the model.

BOR

The Data Model Generator supports the operations mentioned below for BOR data sources.

  • Query

    You base the Query operation for the Data Model on the GetList method (in most cases) of the selected BOR or RFC object.

    Guidelines for input parameters

    • Input parameters must be simple fields, or a structure, or ranges tables.

      Note

      Mandatory tables are not allowed.

    • If the input parameter of the BAPI mapped to the Data Model is a simple field, or a structure, the service generated will support filters, only the equal to (=) filtering capability.

    • If the parameter has ranges, then it will support all the filtering capabilities including greater or lesser than (>, <), wild card (*), equal to (=).

    Guidelines for output parameters

    • The output parameter of the BAPI must be a table which contains the Property assigned as key.

    • The fields in the table must be flattened using the Change Mapping Route screen and mapped directly under the Data Object root node.

    • The output table must contain the input fields.

      Unless the output table is set as a constant.

    • Only one table can be mapped as an output table.

    • Nested tables are not allowed.

  • Read Operation (GET_DETAIL/GET_PROPERTIES)

    You base the Read operation for the Data Model on the GET_DETAIL/GET_PROPERTIES methods (in most cases) of the selected BOR or RFC object.

    Guidelines for input parameters

    • Must consist of importing parameters for the Property assigned as key of the business object; additional parameters are optional as they can only be set as constant values in the mapping, or use the default values of the parameters.

    • The Properties assigned as key should be consistent, at least in terms of their type, with those of the Query operation (BAPI) output table mentioned above.

    Guidelines for output parameters

    • Must include all the fields and properties that you want to make available in the model.

      Note

      Supports only one Read operation for each Data Model in the Data Model Generator tool.

  • Create Operation

    Use the Create operation of the selected data object for the Data Model.

    Guidelines for input parameters

    • Input parameters must be simple fields, or a structure.

      If there is a table as an input parameter, it must be optional, since tables are not supported in this operation and cannot be mapped to the model.

    • Must include all the fields and properties that you want to make available in the model.

      Note

      Only one Create operation is supported in a Data Model by the Data Model Generator tool.

    The Property that is assigned as key is required, and must be either an input parameter or an output parameter.

  • Update Operation (CHANGE)

    Use the Update operation of the selected business object (BO) for the Data Model.

    Guidelines for input parameters

    • The key fields should be consistent, at least in terms of their type and length, with those of the query BAPI output table mentioned above.

    • Must include all the fields and properties that can be updated in the model.

      Note

      Supports only one update operation in a Data Model.

    Guidelines for output parameters

    Business object data output parameters are not forbidden, but they cannot be mapped either.

    Avoid nested tables.

  • Delete Operation (DELETE or CANCEL)

    Use the Delete operation of the selected object for the Data Model.

    Guidelines for input parameters

    Must consist of only the key; any additional parameter must be optional, unless it will get constant values or default values.

    Guidelines for output parameters

    Business object data output parameters are not forbidden, but they cannot be mapped either.

Screen Scraping

The Data Model Generator supports the operations mentioned below for Screen Scraping data sources.

  • Recording Types

    Operation types are listed as recording types in Screen Scraping. For each recording, you must specify the recording type you want to apply to the data entity to be recorded.

    Your Data Model can include the following recording types:

    • Read

    • Update

    • Delete

    • Create

    • Query

    Recordings that include the Create, Delete, and Update operations are discarded if they contain tables.

    Screen Scraping displays the screens that contain only import fields for the Update, Create, and Delete operations, however, it displays all the screens and their fields regardless of the attribute of the field for the Read operation; for mapping into your Data Model.

    For more information, see Overview of Screen Scraping Recordings.

RFC

The Data Model Generator supports the operations mentioned below for RFC data sources.

  • RFC (Query )

    Use the Query operation to retrieve entities list.

    Guidelines for input parameters

    • Input parameters must be simple fields, or a structured field, or ranges tables.

      Note

      Tables are not allowed.

    • If the input parameter is a simple or a structured field it supports only the equal to (=) filtering capability.

    • If the parameter has ranges, then it will support all the filtering capabilities, including greater or lesser than (>, <), wild card (*), equal to (=), and many more.

    Guidelines for output parameters

    • The output parameter must be a table.

      The fields in the table must be flattened and mapped to the root DATA object.

    • The output table must contain the input fields.

    • Only one table can be mapped as an output table.

    • Nested tables are not allowed.

  • RFC (Read)

    Use the Read operation to read entities details.

    Guidelines for input parameters

    • Must consist of importing parameters for the Properties assigned as key of the business object.

      Additional parameters are optional as they can only be set as constant values in the mapping, or use the default values of the parameters.

    • The Properties assigned as key should be consistent, at least in terms of their type, with those of the output table of the Query operation mentioned above.

    Guidelines for output parameters

    • Must include all the data entities you want to make available in the model.

    • Nested tables are not allowed.

      Note

      Supports only one Read operation for each Data Model in the Data Model Generator tool.

    • The read output parameters must also contain the query output parameters, and must be OData compliant.

    • Nested tables are not allowed.

  • RFC Create

    Use the Create operation to create entities details.

    Guidelines for input parameters

    • Input parameters must be simple fields, or a structure.

      If there is a table as an input parameter, it must be optional, since tables are not supported in this operation and cannot be mapped to the model.

    • Must include all the required parameters to create the model.

      All the required parameters should be flattened and available in the Data Object root.

      Note

      Only one create operation is supported in a Data Model by the Data Model Generator tool.

    The Property assigned as key must be an output parameter.

  • RFC Update (CHANGE)

    Use the Update operation to update entities details.

    Guidelines for input parameters

    • Must consist of the key field, same as read. The key fields should be consistent, at least in terms of their type with those of the query RFC output table mentioned above.

    • Must include all the entities that you want to make available in your Data Model.

      Note

      Supports only one Update operation in a Data Model.

    • Must consist of all data entities that must be updated.

    • Avoid nested tables. (BAPI programming guidelines).

    Guidelines for output parameters

    Business object data output parameters are not forbidden, but they cannot be mapped either.

  • RFC Delete (CANCEL)

    Use the Delete operation to delete entities details.

    Guidelines for input parameters

    Must consist of only the Properties assigned as key; any additional parameter must be optional, unless it will get constant values or default values.

    Guidelines for output parameters

    Business object data output parameters are not forbidden, but they cannot be mapped either.