Show TOC

/IWBEP/IF_MGW_REQ_ENTITYLocate this document in the navigation structure

This interface is developed to provide all request information relevant for entity READ operation. All artifacts are returned in a technical format meaning with their technical naming.

Methods

Method GET_ENTITY_TYPE_NAME

This method is used to return the technical name of the target entity type

Parameter

Description

RV_ENTITY_TYPE

This parameter of the type /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_E_TECHNICAL_NAME is used to return the technical name of the target entity type.

Method GET_ENTITY_SET_NAME

This method is used to return the technical name of target the entity set.

Parameter

Description

RV_ENTITY_SET

This parameter of the type /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_E_TECHNICAL_NAME is used to return the technical name of the target entity set.

Method GET_IF_MODIFIED_SINCE
This method is used to get the IF_MODIFIED_SINCE request header attribute.
Table 1:
Parameter Description
RV_IF_MODIFIED_SINCE This parameter is of type TZNTSTMPS.

Method GET_SOURCE_ENTITY_TYPE_NAME

This method is used to return the technical name of the source entity type.

Parameter

Description

RV_ENTITY_TYPE

This parameter of the type /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_E_TECHNICAL_NAME is used to return the technical name of the target entity type.

Method GET_SOURCE_ENTITY_SET_NAME

This method is used to return the technical name of source entity set

Parameter

Description

RV_ENTITY_SET

This parameter of the type /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_E_TECHNICAL_NAME is used to return the technical name of the target entity set.

Method GET_SOURCE_KEYS

This method is to be used when the entity is called by a navigation: Source entity type and target entity type are different. The method returns a table of source entity keys. The returned key values are not converted even if they are defined in the Model Provider Class as convertible. Use method GET_CONVERTED_SOURCE_KEYS to get the key values converted automatically.

Parameter

Description

RV_SOURCE_KEYS

This parameter of the type /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_E_TECHNICAL_PAIR is used to return the table of the source entity keys.

Method GET_KEYS

This method is to be used when the entity is called directly: Source entity type and target entity type are the same. The method returns a table of keys for the requested entity. The returned key values are not converted even if they are defined in the Model Provider Class as convertible. Use method GET_CONVERTED_KEYS to get the key values converted automatically.

Parameter

Description

RV_KEYS

This parameter of the type /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_T_TECHNICAL_PAIR is used to return the table of the source entity keys.

Method GET_NAVIGATION_PATH

This method is used to return the navigation path using technical names.

Parameter

Description

RT_NAVIGATION_PATH

This parameter of the type /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_T_TECHNICAL_NAVI is used to return the navigation path using technical names.

Method GET_SELECT
Note This method is deprecated. Use method GET_SELECT_WITH_MANDTRY_FIELDS instead.

Select the system query option ($select) to select only a subset of properties which should be returned by the server. The $select can be considered by the application for performance reasons and improvements. The SAP Gateway runtime takes care of applying the $select properly irrespective of whether $select is taken into account from the application or not. So, for the consumer it is always the same behavior. It is only possible to specify a $select query for simple properties or for complex properties of the entity type itself. Note that it is not possible to select properties of complex properties.

Method GET_SELECT_WITH_MANDTRY_FIELDS

Select the system query option ($select) to select only a subset of properties which should be returned by the server. The $select can be considered by the application for performance reasons and improvements. The SAP Gateway runtime takes care of applying the $select properly irrespective of whether $select is taken into account from the application or not. So, for the consumer it is always the same behavior. The SAP Gateway runtime always adds the mandatory fields of the entity type (keys, etag, mime type mapping) to the select table, irrespective of whether the key fields are already part of the original OData request or not. Therefore it is ensured that the result of this method can under certain circumstances, for example, be directly applied to an SQL statement without any enrichment from the application developer. It is only possible to specify a $select query for simple properties or for complex properties of the entity type itself according to the OData specification. Note that it is not possible to select properties of complex properties.

In case of $expand the result also contains the selected properties of all included expands. The selected properties of all included expands are necessary for service providers that implement their own expand instead of framework expand to improve performance.

If you only want to have the selected properties including the mandatory fields you use method GET_SELECT_ENTITY_PROPERTIES.

If $select is not used the returned table RT_SELECT will be empty, and this means all entity properties are required.

When implementing your own expand (method GET_EXPANDED_ENTITY or GET_EXPANDED_ENTITYSET) you can use parameter IO_EXPAND to get the complete expand tree and all necessary information to process the whole expand completely or just partly to improve performance. See also IF_MGW_ODATA_EXPAND .

Method GET_CONVERTED_SOURCE_KEYS

This method is to be used when the entity is called by a navigation: Source entity type and target entity type are different. ES_KEY_VALUES must be a structure which contains all defined keys including the reference fields for currency or quantity if necessary (that is, key value is an amount). Data of type “Entity Return Structure” can be used because it already contains all keys and reference fields. When convertible field is used as key and the reference field for currency or quantity is needed, the reference field must also be defined as key. Otherwise, the returned key value cannot be converted and remains unchanged.

If a key field is missing in structure ES_KEY_VALUES the key value will not be provided to the provider application. If one or more keys are defined in the Model Provider Class as not convertible the returned key values are not converted. Therefore, this method can be used in general instead of GET_SOURCE_KEYS.

Method GET_CONVERTED_KEYS

This method is to be used when the entity is called directly: Source entity type and target entity type are the same. ES_KEY_VALUES must be a structure which contains all defined keys including the reference fields for currency or quantity if necessary (that is, key value is an amount). Data of type “Entity Return Structure” can be used because it already contains all keys and reference fields. When convertible field is used as key and the reference field for currency or quantity is needed, the reference field must also be defined as key. Otherwise, the returned key value cannot be converted and remains unchanged.

If a key field is missing in structure ES_KEY_VALUES the key value will not be provided to the provider application. If one or more keys are defined in the Model Provider Class as not convertible the returned key values are not converted. Therefore, this method can be used in general instead of GET_KEYS.

Method GET_SELECT_ENTITY_PROPERTIES

Contrary to GET_SELECT_WITH_MANDTRY_FIELDS, this method only returns the selected properties including the mandatory fields of the current entity.