Show TOC

/IWBEP/IF_MGW_APPL_SRV_RUNTIMELocate this document in the navigation structure

Use

This is the central interface implemented by every data provider class (DPC).

Client Cache Control - Metadata Invalidation

The HTTP response header max-age=0 is sent with the metadata to support conditional metadata requests in the browser Chrome.

Methods

Method CREATE_ENTITY

This method is used for the create operation for an entity.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string.

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type string.

IO_DATA_PROVIDER

The interface to deserialize the payload into the application specific structure.

Type /IWBEP/IF_MGW_ENTRY_PROVIDER

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY_C contains all request information and represents the requested entities in a technical format meaning with their technical naming.

ER_ENTITY

The returned reference to the application specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

Method CREATE_DEEP_ENTITY

This method is used for the create operation for an entity - deep insert.

This is then the operation to create an entity with deep data in an inlined format. Every deep insert request has to be handled by the implementation which has to decide whether it can fulfill the current deep insert request or not by a given expand expression.

The method signature is similar to the CREATE_ENTITY method except that it has an additional parameter IO_EXPAND. The SAP NetWeaver Gateway framework resolves the inlined data and translates it to an expand expression which is passed to the method via IO_EXPAND. It can be used to validate whether the current request including the inlined data matches a given expand expression or to retrieve purely the expand string. If the expand expression matches the data can be accessed via IO_DATA_PROVIDER similar to CREATE_ENTITY. The ES_DATA parameter expects a nested structure which contains the components for the inlined data. The structure components need to be named like the ABAP names of the navigation properties defined in the metadata.

The final response which is sent back to the consumer contains the newly created entry including the deep data if it is part of the return structure. This behavior is supported from SP05 onwards. If the return structure just contains the data in a flat form without the nested data the behavior does not change and the response does not contain any inlined data.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string.

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type string.

IO_DATA_PROVIDER

The interface to deserialize the payload into the application specific structure.

Type /IWBEP/IF_MGW_ENTRY_PROVIDER

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_EXPAND

Represents the resolved expand expression for the inlines of the entry which is to be created.

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY_C contains all request information and represents the requested entities in a technical format meaning with their technical naming.

ER_DEEP_ENTITY

The returned reference to the application specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

Method DELETE_ENTITY

This method can be used for a delete operation for an entity.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested.

Type string

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type string

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY_D contains all request information and represents the requested entities in a technical format meaning with their technical naming.

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

Method EXECUTE_ACTION

This is the method for the execution of an action with no direct relation to an entity type. It has service semantics.

Parameter

Description

IV_ACTION_NAME

Name of the action.

Type string

IT_PARAMETER

Parameter.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_FUNC_IMPORT contains all request information and represents the requested entities in a technical format meaning with their technical naming.

ER_ENTITY

The returned reference to the application specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

Method GET_ENTITY

This is the method for the read operation for an entity/entry.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path. F

Type string

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY contains all request information and represents the requested entities in a technical format meaning with their technical naming

ER_ENTITY

The returned reference to the application specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

ES_RESPONSE_CONTEXT

This parameter of type /IWBEP/IF_MGW_APPL_SRV_RUNTIME=>TY_S_MGW_RESPONSE_ENTITY_CNTXT is used to specify for example a last-modified time stamp or a max-age (for cache handling).

Cache control on the client can be achieved by setting export parameter ES_RESPONSE_CONTEXT-MAX_AGE and export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT. If export parameter ES_RESPONSE_CONTEXT-MAX_AGE is set to a value, then SAP Gateway will generate the HTTP response header cache-control with a max-age directive, for example, cache-control: max-age=3600.
Note If export parameter ES_RESPONSE_CONTEXT-MAX_AGE is set to a value, you must also set the export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT to '-' (meaning 'can be cached’).

On the other hand, if export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT is set to 'X', then SAP Gateway will generate the following HTTP response header: cache-control: no-store, no-cache. The same is the case if export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT is left as undefined (that is, set to ' '). An HTTP 304 response (not modified) can be achieved by setting export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED and export parameter ES_RESPONSE_CONTEXT-IS_NOT_MODIFIED.

The export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED should be filled with a time stamp that indicates when the last change of the related business data occurred. If the ES_RESPONSE_CONTEXT-LAST_MODIFIED is filled with a time stamp, then SAP Gateway will generate the HTTP response header last-modified with the related date, for example, last-modified: Tue, 27 Nov 2012 09:41:40 GMT. If the export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED contains a time stamp that is older than the HTTP request header if-modified-since then an HTTP 304 response (‘not modified’) will be sent by SAP Gateway (and in this case an HTTP response header last-modified will not be set). The export parameter ES_RESPONSE_CONTEXT-IS_NOT_MODIFIED may be set to 'X' only in case LAST_MODIFIED of the application data is older than the time stamp in HTTP request header if-modified-since. In such cases, the related application data is up-to-date and does not need to be sent at all. SAP Gateway will then generate an HTTP 304 response (‘not modified’).

Method GET_STREAM

This method can be used for the read operation for a media resource (binary) of a media link entry.

This is then used for the read operation for a media resource of a media link entry which retrieves a binary file which is associated to an entry. The request parameters are similar to a GET_ENTITY request. A media resource of a media link entry is requested via the URI in the <atom:content> src attribute. The URI can either be a link to an external resource or to an internal resource which is handled by the application via GET_STREAM.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY contains all request information and represents the requested entities in a technical format meaning with their technical naming.

ER_STREAM

The returned reference to the media resource structure which contains the binary data and the MIME type of a media resource. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

ES_RESPONSE_CONTEXT

This parameter of type /IWBEP/IF_MGW_APPL_SRV_RUNTIME=>TY_S_MGW_RESPONSE_ENTITY_CNTXT is used to specify for example a last-modified time stamp or a max-age (for cache handling).

Cache control on the client can be achieved by setting export parameter ES_RESPONSE_CONTEXT-MAX_AGE and export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT. If export parameter ES_RESPONSE_CONTEXT-MAX_AGE is set to a value, then SAP Gateway will generate the HTTP response header cache-control with a max-age directive, for example, cache-control: max-age=3600.
Note If export parameter ES_RESPONSE_CONTEXT-MAX_AGE is set to a value, you must also set the export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT to '-' (meaning 'can be cached’).

On the other hand, if export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT is set to 'X', then SAP Gateway will generate the following HTTP response header: cache-control: no-store, no-cache. The same is the case if export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT is left as undefined (that is, set to ' '). An HTTP 304 response (not modified) can be achieved by setting export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED and export parameter ES_RESPONSE_CONTEXT-IS_NOT_MODIFIED.

The export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED should be filled with a time stamp that indicates when the last change of the related business data occurred. If the ES_RESPONSE_CONTEXT-LAST_MODIFIED is filled with a time stamp, then SAP Gateway will generate the HTTP response header last-modified with the related date, for example, last-modified: Tue, 27 Nov 2012 09:41:40 GMT. If the export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED contains a time stamp that is older than the HTTP request header if-modified-since then an HTTP 304 response (‘not modified’) will be sent by SAP Gateway (and in this case an HTTP response header last-modified will not be set). The export parameter ES_RESPONSE_CONTEXT-IS_NOT_MODIFIED may be set to 'X' only in case LAST_MODIFIED of the application data is older than the time stamp in HTTP request header if-modified-since. In such cases, the related application data is up-to-date and does not need to be sent at all. SAP Gateway will then generate an HTTP 304 response (‘not modified’).

Method GET_EXPANDED_ENTITY

This method can be used for a read operation for an expanded entity / entry.

The read operation is similar to GET_ENTITY which has an additional expand reference to retrieve data in an inlined/deep format.

Note

Note that the SAP NetWeaver Gateway framework can completely handle expand requests in a generic way. In case of performance-critical scenarios or if you experience a bad response time it is highly recommended to handle complex full/subsets of the expand request by specific application implementations. Therefore it is required to redefine GET_EXPANDED_ENTITY. If you redefine GET_EXPANDED_ENTITY and the given expand expression cannot be handled by the application logic it is required to delegate to the super method or to the implementation of the super class.

The expand query option is passed via the object reference IO_EXPAND. It can be used to validate whether the current expand expression matches a given expand expression. If the expand expression matches the data reference, then ER_ENTITY can directly be filled by the implementation with data in a deep format. All navigation properties of an entity type including. its sub paths are valid expand expressions to check and to handle by the application. All expand paths (separated by comma) which are handled by the implementation have to be passed back to the framework via the parameter ET_EXPANDED_TECH_CLAUSES.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY contains all request information and represents the requested entities in a technical format meaning with their technical naming.

IO_EXPAND

Represents the expand expression for the navigation properties of the nested entry/feed which need to be inlined.

ER_ENTITY

The returned reference to the application specific structure which contains the data. In comparison to the GET_ENTITY method the ER_ENTITY reference is already pre-filled with a data reference of a deep structure component of the final expanded result structure. The er_entity can then be filled by the application specific implementation. If the given data reference is not used you can use your own reference and finally use convenience method /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF.

ES_RESPONSE_CONTEXT

This parameter of type /IWBEP/IF_MGW_APPL_SRV_RUNTIME=>TY_S_MGW_RESPONSE_ENTITY_CNTXT is used to specify for example a last-modified time stamp or a max-age (for cache handling).

ET_EXPANDED_CLAUSES

This parameter is obsolete, use ET_EXPANDED_TECH_CLAUSES instead.

ET_EXPANDED_TECH_CLAUSES

This parameter is filled by the application and contains all expanded paths which have been handled by the application itself. This list of expand clauses is based on the technical (internal) navigation property names, not the external names

Cache control on the client can be achieved by setting export parameter ES_RESPONSE_CONTEXT-MAX_AGE and export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT. If export parameter ES_RESPONSE_CONTEXT-MAX_AGE is set to a value, then SAP Gateway will generate the HTTP response header cache-control with a max-age directive, for example, cache-control: max-age=3600.

Note If export parameter ES_RESPONSE_CONTEXT-MAX_AGE is set to a value, you must also set the export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT to '-' (meaning 'can be cached’).

On the other hand, if export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT is set to 'X', then SAP Gateway will generate the following HTTP response header: cache-control: no-store, no-cache. The same is the case if export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT is left as undefined (that is, set to ' '). An HTTP 304 response (not modified) can be achieved by setting export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED and export parameter ES_RESPONSE_CONTEXT-IS_NOT_MODIFIED.

The export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED should be filled with a time stamp that indicates when the last change of the related business data occurred. If the ES_RESPONSE_CONTEXT-LAST_MODIFIED is filled with a time stamp, then SAP Gateway will generate the HTTP response header last-modified with the related date, for example, last-modified: Tue, 27 Nov 2012 09:41:40 GMT. If the export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED contains a time stamp that is older than the HTTP request header if-modified-since then an HTTP 304 response (‘not modified’) will be sent by SAP Gateway (and in this case an HTTP response header last-modified will not be set). The export parameter ES_RESPONSE_CONTEXT-IS_NOT_MODIFIED may be set to 'X' only in case LAST_MODIFIED of the application data is older than the time stamp in HTTP request header if-modified-since. In such cases, the related application data is up-to-date and does not need to be sent at all. SAP Gateway will then generate an HTTP 304 response (‘not modified’).

Method GET_ENTITYSET

This method can be used for a read/query operation for an expanded set of entities / feeds. This method for a (query) operation returns a list of entities, aka a feed, and so allows to do filtering, sorting, free text search, etc.

Server side paging can be achieved by setting a skiptoken. The data provider can decide to limit the amount of data which is sent back to the client in order to ensure performance. The skiptoken is defined by the application to indicate the next bulk of data and is passed to the gateway runtime to render the next link in the OData feed. The client then calls the next link including the skiptoken to retrieve the next set of data. The skiptoken from the next link can be accessed by the data provider via the technical request context. (Custom) query options are copied to the next link except the skiptoken itself, skip and top. The top parameter for client side paging is calculated by the gateway runtime with the following logic:

  • $top in request minus number of entities in response

Delta handling can be achieved by setting a delta token. The data provider can pass back a delta token, for example, a timestamp after reading the feed data in order to indicate that it supports a delta mode. After issuing a delta token for the first time all delta requests are dispatched to GET_ENTITYSET_DELTA. The delta token is then injected as a delta link at the end of the feed. If the client wants to get only the changed data it requests the delta via the delta link. A delta request is then handled by GET_ENTITYSET_DELTA. The default implementation of GET_ENTITYSET_DELTA forwards the request to GET_ENTITYSET (compatibility reasons). The following rules apply to the delta token:

  • In case of service-side paging delta-link appears only in the last page - no next link anymore

  • The delta-set is retrieved by requesting the delta link

  • In case of server-side paging in combination with delta token the server can pass back a skiptoken on the first page of the delta

  • The delta token is then passed in the next link and indicates that it is currently a kind of delta processing

  • A response never contains a delta link and a next link

  • A data provider cannot pass back a deltatoken and a skiptoken at the same time

  • A next link can contain a deltatoken in analogy to $filter or custom query options in case of server-side paging

Parameter

 

Description

IV_ENTITY_NAME

 

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_SOURCE_NAME

 

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_FILTER_SELECT_OPTIONS

 

The filter parameters as an ABAP select options table for the filter parameter.

Type /IWBEP/T_MGW_SELECT_OPTION

IT_ORDER

 

The details with regards to sorting as query options.

Type /IWBEP/T_MGW_SORTING_ORDER

IS_PAGING

 

Paging information with the details of skip and top.

Type /IWBEP/S_MGW_PAGING

IV_SEARCH_STRING

 

If search is used then it contains the search string.

Type string

IT_KEY_TAB

 

Represents the keys or NavPropCollection of the first segment. .

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

 

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_TECH_REQUEST_CONTEXT

 

This parameter of type /IWBEP/IF_MGW_REQ_ENTITYSET contains all request information and represents the requested entities in a technical format meaning with their technical naming.

ER_ENTITY

 

The returned reference to the application specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

ER_ENTITY_SET

  The returned reference to the application specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

ES_RESPONSE_CONTEXT

 
This parameter of type /IWBEP/IF_MGW_APPL_SRV_RUNTIME=>TY_S_MGW_RESPONSE_CONTEXT is used to specify:
  • inlinecount (if requested via has inlinecount)
  • count (number of entries instead of the list if requested via count)
  • skiptoken (for server side paging)
  • deltatoken (for delta handling)
  • expand_skiptokens (for server side paging together with expand)
  • last_modified (for conditional reads)
  • max_age (for client cache control)
  • is_not_modified (for conditional reads) (See constants /IWBEP/IF_MGW_APPL_TYPES=>GCS_MODIFICATION_STATUS)
  • do_not_cache_on_client (for client cache control) (/IWBEP/IF_MGW_APPL_TYPES=>GCS_CACHE_ON_CLIENT)
  • do_cache_and_page_on_hub (to trigger caching on the hub in case softstate is enabled)
Cache control on the client can be achieved by setting export parameter ES_RESPONSE_CONTEXT-MAX_AGE and export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT. If export parameter ES_RESPONSE_CONTEXT-MAX_AGE is set to a value, then SAP Gateway will generate the HTTP response header cache-control with a max-age directive, for example, cache-control: max-age=3600.
Note If export parameter ES_RESPONSE_CONTEXT-MAX_AGE is set to a value, you must also set the export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT to '-' (meaning 'can be cached’).

On the other hand, if export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT is set to 'X', then SAP Gateway will generate the following HTTP response header: cache-control: no-store, no-cache. The same is the case if export parameter ES_RESPONSE_CONTEXT-DO_NOT_CACHE_ON_CLIENT is left as undefined (that is, set to ' '). An HTTP 304 response (not modified) can be achieved by setting export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED and export parameter ES_RESPONSE_CONTEXT-IS_NOT_MODIFIED. The export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED should be filled with a time stamp that indicates when the last change of the related business data occurred. If the ES_RESPONSE_CONTEXT-LAST_MODIFIED is filled with a time stamp, then SAP Gateway will generate the HTTP response header last-modified with the related date, for example, last-modified: Tue, 27 Nov 2012 09:41:40 GMT. If the export parameter ES_RESPONSE_CONTEXT-LAST_MODIFIED contains a time stamp that is older than the HTTP request header if-modified-since then an HTTP 304 response (‘not modified’) will be sent by SAP Gateway (and in this case an HTTP response header last-modified will not be set). The export parameter ES_RESPONSE_CONTEXT-IS_NOT_MODIFIED may be set to 'X' only in case LAST_MODIFIED of the application data is older than the time stamp in HTTP request header if-modified-since. In such cases, the related application data is up-to-date and does not need to be sent at all. SAP Gateway will then generate an HTTP 304 response (‘not modified’).

Method GET_ENTITYSET_DELTA
This method provides the read/query delta operation for a set of entities / feed including deleted entries. This method can be used to handle requests which contain a delta token. See also GET_ENTITYSET for server side paging and the initial delta handling. Based on the incoming delta token the server calculates the delta which needs to be sent back to the client. The modified data is passed back to the SAP Gateway runtime via ER_ENTITYSET. The deleted entries are passed back via the ER_DELETED_ENTITYSET data reference.
Note Tombstone support is only available for Atom (XML) but not for JSON. Expand is not supported in combination with tombstones.

The Atom "deleted-entry" element (also known as Tombstone) is specified in proposed standard RFC 6721. It is used to explicitely identify removed Atom entries in Atom feeds.

deletedEntry =
       element at:deleted-entry {
         atomCommonAttributes,
         attribute ref { atomUri },
         attribute when { atomDateConstruct },
         ( element at:by { atomPersonConstruct }?
         & element at:comment { atomTextConstruct }?
         & element atom:link { atomLink }*
         & element atom:source { atomSource }?
         & anyElement* )

The attribute ref is set to the same value as the atom:id element. Attribute when is set to the value of the property that is mapped to SyndicationUpdated or - if such a mapping does not exist - to the current timestamp (same as for atom:updated).

at:deleted-entry elements appear en bloc after all atom:entry elements in the Atom feed.

Table 1:
Parameter Description
IO_TECH_REQUEST_CONTEXT This parameter of type /IWBEP/IF_MGW_REQ_ENTITYSET contains all request information and represents the requested entities in a technical format, that is, with their technical naming.
ER_ENTITYSET The returned reference to the application-specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.
ER_DELETED_ENTITYSET The returned reference to the application-specific structure which contains the data of the deleted entries (tombstones). Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method. This table should be of the same type as the table for parameter ER_ENTITYSET.
ES_RESPONSE_CONTEXT This parameter of type /IWBEP/IF_MGW_APPL_SRV_RUNTIME=>TY_S_MGW_RESPONSE_CONTEXT is used to specify a skiptoken for example (for server-side paging), the inline count (if requested via has inline count), the count or a delta token.

Method GET_EXPANDED_ENTITYSET

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_FILTER_SELECT_OPTIONS

The filter parameters as an ABAP select options table for the filter parameter.

Type /IWBEP/T_MGW_SELECT_OPTION

IT_ORDER

The details with regards to sorting as query options.

Type /IWBEP/T_MGW_SORTING_ORDER

IS_PAGING

Paging information with the details of skip and top.

Type /IWBEP/S_MGW_PAGING

IV_SEARCH_STRING

If search is used then it contains the search string.

Type string

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITYSET contains all request information and represents the requested entities in a technical format meaning with their technical naming.

ER_ENTITYSET

The returned reference to the application specific table which contains the data. In difference to the GET_ENTITYSET method the ER_ENTITYSET reference is already pre-filled with a data reference of a deep structure component of the final expanded result feed. The ER_ENTITYSET can then be filled by the application specific implementation. If the given data reference is not used the reference needs to be filled, for example by using convenience method /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF. The data is then copied into the nested result.

ES_RESPONSE_CONTEXT

This parameter of type /IWBEP/IF_MGW_APPL_SRV_RUNTIME=>TY_S_MGW_RESPONSE_CONTEXT is used to specify the request attribute. For example, a skiptoken (for server side paging), the inline count (if requested via has inline count) or a delta token.

ET_EXPANDED_CLAUSES This parameter is obsolete, use ET_EXPANDED_TECH_CLAUSES instead.
ET_EXPANDED_TECH_CLAUSES This parameter is filled by the application and contains all expanded paths which have been handled by the application itself. This list of expand clauses is based on the technical (internal) navigation property names, not the external names

The (query) operation similar to GET_ENTITYSET which has an additional expand reference to retrieve data in an inlined/deep format. Note that the SAP Gateway framework can completely handle expand requests in a generic way. In case of performance-critical scenarios or if you experience a bad response time it is highly recommended to handle complex full/subsets of the expand request by specific implementations. Therefore it is required to redefine GET_EXPANDED_ENTITYSET. If you redefine GET_EXPANDED_ENTITYSET and the given expand expression cannot be handled by the application logic it is required to delegate to the super method or to the implementation of the super class. The expand query option is passed via the object reference IO_EXPAND. It can be used to validate whether the current expand expression matches a given expand expression. If the expand expression matches the data reference, then ER_ENTITY can directly be filled by the implementation with data in a deep format. All navigation properties of an entity type including. its sub paths are valid expand expressions to check and to handle by the application. All expand paths (separated by comma) which are handled by the implementation have to be passed back to the framework via the parameter ET_EXPANDED_TECH_CLAUSES.

Method UPDATE_ENTITY

This method updates an entity.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IO_DATA_PROVIDER

The interface to deserialize the payload into the application specific structure.

Type /IWBEP/IF_MGW_ENTRY_PROVIDER

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY_U contains all request information and represents the requested entities in a technical format meaning with their technical naming.

ER_ENTITY

The returned reference to the application specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

Method PATCH_ENTITY

A patch request is a partial update of an entity. All provided components in the request are patched.

The default implementation of PATCH_ENTITY performs a read before update without locking the corresponding business object. If this is required the default implementation can be used but the PATCH_ENTITY method needs to be overwritten, and after an enqueue the default implementation can be called. After that the business object has to be de-queued. All unpatched simple properties of the entity type are copied during the read before update. Complex properties are treated in the same way and are merged with the original values if not given in the request.

A sample implementation for the lock semantics is provided in the last section of the default implementation

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

IO_DATA_PROVIDER

The interface to deserialize the payload into the application specific structure.

Type /IWBEP/IF_MGW_ENTRY_PROVIDER

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY_U contains all request information and represents the requested entities in a technical format meaning with their technical naming. In addition to the information provided by the UPDATE_ENTITY it contains a nested components table with the patched properties in the PATCH request.

ER_ENTITY

The returned reference to the application specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

Method UPDATE_STREAM

This method updates a stream.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_ENTITY_SET_NAME

 

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

IS_MEDIA_RESOURCE

Content type and content value. For example, Content type = image/jpg and content value in binary format.

Type TY_S_MEDIA_RESOURCE

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH (table of navigation paths).

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY_U contains all request information and represents the requested entities in a technical format meaning with their technical naming.

Method CREATE_STREAM

This method creates a stream (media resource) and the corresponding entity (media link entry). Additional information can be provided in the Slug header. The choreography of a media link entry creation is to do a HTTP Post first which contains the binary data only. Note that it is not allowed to post the entry itself first and later put the associated media resource. Based on the Slug header you can pass additional information to the server which can be used for storing the binary (media resource) and to create the skeleton of the entity (media link entry) creation, for example. The newly created entity (media link entry) is sent back to the consumer in the HTTP response which can be updated with the proper data. The updated entry is sent to the SAP NetWeaver Gateway system in an HTTP Put to complete the process of media resource/media link entry creation.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_ENTITY_SET_NAME

 

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

IS_MEDIA_RESOURCE

Content type and content value. For example, Content type = image/jpg and content value in binary format.

Type TY_S_MEDIA_RESOURCE

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH (table of navigation paths).

IV_SLUG

Slug is a special HTTP header, see http://bitworking.org/projects/atom/rfc5023#rfc.section.9.7Information published on non-SAP site.

IO_TECH_REQUEST_CONTEXT

This parameter of type / IWBEP/IF_MGW_REQ_ENTITY_C contains all request information and represents the requested entities in a technical format meaning with their technical naming.

ER_ENTITY

The returned reference to the application-specific structure which contains the data. Use /IWBEP/CL_MGW_ABS_DATA~COPY_DATA_TO_REF as convenience method.

Method DELETE_STREAM

This method deletes a stream. The corresponding entity is not touched.

Parameter

Description

IV_ENTITY_NAME

Name of the entity type which is requested. If there is a navigation it means that it represents the end/target of the navigation path.

Type string

IV_ENTITY_SET_NAME

 

IV_SOURCE_NAME

Name of the entity type which is at the beginning of the navigation path, if there is a navigation.

IT_KEY_TAB

Represents the keys or NavPropCollection of the first segment.

Type /IWBEP/T_MGW_NAME_VALUE_PAIR

IT_NAVIGATION_PATH

The whole navigation path.

Type /IWBEP/T_MGW_NAVIGATION_PATH (table of navigation paths).

IO_TECH_REQUEST_CONTEXT

This parameter of type /IWBEP/IF_MGW_REQ_ENTITY_D contains all request information and represents the requested entities in a technical format meaning with their technical naming.

Method: CHANGESET_BEGIN
Table 2:
Parameter Description
IT_OPERATION_INFO Table containing the following information of all operations in the current changeset (/IWBEP/T_MGW_OPERATION_INFO).
  • ENTITY_NAME as STRING - Name of the entity type which is requested.
  • ENTITY_NAME as STRING - Name of the entity type which is requested.
  • ACTION_NAME as STRING - Name of the action if execution of an action with no direct relation to an entity type.
CV_DEFER_MODE Indicates that the data provider will process the current changeset in defer mode (later at calling of method CHANGESET_PROCESS).

All operations within a changeset must be treated as a Logical Unit of Work. This means all or nothing. Therefore, a provider must NOT issue COMMIT WORK or ROLLBACK WORK during a changeset processing. Otherwise, the framework will abandon the changeset processing. If the changeset contains only one operation, the check of commit or rollback is deactivated. At the beginning of a changeset processing, the provider will be called with this API. It can check the list of all involved entity types and actions containing in this changeset and accept the changeset handling or reject by raising a technical exception with exception code CHANGESET_NOT_SUPPORTED. The method has a default implementation which allows only one operation per changeset in order to guarantee the transactional consistency. If more than one operation is required in a changeset the implementation has to be overwritten by the application. The application then needs to ensure the transactional consistency e.g. not to have any commit or rollback in the chain of requests in a changeset.

Besides that the provider can start to collect the content of a changeset in the modifying method calls e.g. update_entity and finalize it in the changeset_end method call. From SAP Gateway 2.0 SP 07 onwards, the check of COMMIT WORK and ROLLBACK WORK is only active from CHANGESET_BEGIN until before CHANGESET_END is called. This means a provider can issue COMMIT WORK or ROLLBACK WORK from within the processing of CHANGESET_END. This is useful for providers which reuse other components including COMMIT WORK handling. It is also necessary for providers which have to do some post-processing works after COMMIT WORK is called. This check modification is also available for SAP Gateway 2.0 SP 06 via SAP Note 1824626 Information published on SAP site.
Note Do not issue COMMIT WORK or ROLLBACK WORK during changeset processing if the changeset contains more than one operation. COMMIT WORK or ROLLBACK WORK is only possible at CHANGESET_END. The framework checks COMMIT WORK calls during changeset processing and terminates batch processing with a short dump if errors arise. Consequently, you should also not call any coding that would trigger the same behavior.

From SAP Gateway 2.0 SP 09 onwards, a data provider can check the entire changeset operations in IT_OPERATION_INFO and return CV_DEFER_MODE = 'X' to indicate that it does not process the entire changeset operations immediately but only saves these operations until the method CHANGESET_PROCESS is called. A data provider can dynamically decide to process the current changeset in "defer mode" based on the entire operation info described in table IT_OPERATION_INFO.

In defer mode, when CREATE, UPDATE, DELETE or EXECUTE_ACTION is called the data provider has only to save all changeset operations in its internal tables without returning any data or ETag or headers to the framework.

Method CHANGESET_PROCESS

The data provider has to process all entire changeset operations and return the operation results including ETags, headers in the response table. Warning and info messages (SAP messages) for a specific operation must be set by using the message container instance stored in each operation entry of the request table. During the processing of CHANGESET_PROCESS, the data provider must not use the methods SET_ETAG or SET_HEADERS (technical exception with specific error text will be raised). It has to pass this information in the response table CT_CHANGESET_RESPONSE. In the system you can find sample coding in class /IWBEP/CL_MGW_RT_SFLIGHT, method CHANGESET_BEGIN and CHANGESET_PROCESS.

Table 3:
Parameter Description
IT_CHANGESET_REQUEST Request table containing all operation data of the current changeset (/IWBEP/IF_MGW_APPL_TYPES=>TY_T_CHANGESET_REQUEST).
CT_CHANGESET_RESPONSE Response table containing the results of all changeset operations /IWBEP/IF_MGW_APPL_TYPES=>TY_T_CHANGESET_RESPONSE).

Method CHANGESET_END

In case if the provider only updates all modifications of a changeset in internal tables, it can now update the database. A COMMIT WORK will be issued by the framework at the end of this API.

Method GET_IS_CONDITIONAL_IMPLEMENTED
This method can be implemented to indicate that conditional handling is implemented in the application. If the conditional handling is done for the given operation type and entity set name in the application the method must return ABAP_TRUE.
Table 4:
Parameter Description
IV_OPERATION_TYPE v Type /IWBEP/MGW_OPERATION_TYPE).
IV_ENTITY_SET_NAME String
RV_CONDITIONAL_ACTIVE ABAP_BOOL