The advanced interface /IWBEP/IF_V4_DP_ADVANCED contains methods for all OData operations supported by SAP Gateway Foundation. The framework offers generic implementations for all methods that delegate to corresponding methods of the other three interfaces. Overwrite these methods to obtain comprehensive information for complex use cases.
There are exceptions for the generic implementations in regards to create, update and delete requests. The application itself needs to take care of the navigation within create, update and delete requests by implementing the advanced methods, otherwise the SAP Gateway Foundation framework will raise an exception.
Parameter |
Description |
---|---|
IO_REQUEST |
This import parameter contains the information that is needed to create the requested entity. This information is identical to the information in the original OData request. It is not yet manipulated. |
IO_RESPONSE |
This parameter must be used by your data provider to return the data of the requested entity and/or additional information to the framework. |
Precondition
This method is called by the framework using class /IWBEP/CL_V4_ABS_DATA_PROVIDER to process an OData request. This method can only be called while creating an entity.
Example: POST “…/iwbep/tea_busi/0001/TEAMS('TEAM_31')”
Result
If your data provider is able to successfully create the requested entity it must return it by calling method SET_BUSI_DATA of the import parameter IO_RESPONSE. If your data provider has not created the requested entity it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Exceptions
If your data provider is not able to create the requested entity or encounters any other problem that prevents it from a successful execution it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Parameter |
Description |
---|---|
IO_REQUEST |
This import parameter contains the information that is needed to create the requested entity. This information is identical to the information in the original OData request. It is not yet manipulated. |
IO_RESPONSE |
This parameter must be used by your data provider to return the data of the requested entity and/or additional information to the framework. |
Precondition
This method is called by the framework using class /IWBEP/CL_V4_ABS_DATA_PROVIDER to process an OData request. This method can only be called while deleting an entity.
Example: DELETE “…/iwbep/tea_busi/0001/TEAMS('TEAM_01')”
Result
A successful delete request will end with an HTTP return code 204 and an empty response body. Hence the only response handling needed from a data provider perspective is setting the done flag. If your data provider has not deleted the requested entity it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Exceptions
If your data provider is not able to delete the requested entity or encounters any other problem that prevents it from a successful execution it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Parameter |
Description |
---|---|
IO_REQUEST |
This import parameter contains the information that is needed to create the requested action. This information is identical to the information in the original OData request. It is not yet manipulated. |
IO_RESPONSE |
This parameter must be used by your data provider to return the data of the requested action and/or additional information to the framework. |
Precondition
Example of bound action:
POST “…/iwbep/tea_busi/0001/Departments(Sector='Consulting',ID='1')/com.sap.gateway.default.iwbep.tea_busi.v0001.AcChangeManagerOfDepartment"
POST “…/iwbep/tea_busi/0001/ChangeTeamBudgetByID"
Result
In some cases, depending on the definition of the action, a result needs to be provided to the import parameter IO_RESPONSE via method SET_BUSI_DATA. If your data provider does not find the requested action it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Exceptions
If your data provider is not able to successfully execute the requested operation it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Parameter |
Description |
---|---|
IO_REQUEST |
This import parameter contains the information that is needed to create the requested function. This information is identical to the information in the original OData request. It is not yet manipulated. |
IO_RESPONSE |
This parameter must be used by your data provider to return the data of the requested function and/or additional information to the framework. |
Precondition
This method is called by the framework using class /IWBEP/CL_V4_ABS_DATA_PROVIDER to process an OData request. This method is called only for function imports.
Example of function import: GET “…/iwbep/tea_busi/0001/GetEmployeeByID(EmployeeID='0001')”
Result
The data provider must return the business data to the import parameter IO_RESPONSE by calling method SET_BUSI_DATA. If your data provider does not find the requested function it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Parameter |
Description |
---|---|
IO_REQUEST |
This import parameter contains the information that is needed to create the requested entity. This information is identical to the information in the original OData request. It is not yet manipulated. |
IO_RESPONSE |
This parameter must be used by your data provider to return the data of the requested entity and/or additional information to the framework. |
Precondition
This method is called by the framework using class /IWBEP/CL_V4_ABS_DATA_PROVIDER to process an OData request. This method is called for patch and put HTTP methods.
Example of PUT update:
PUT “…/iwbep/tea_busi/0001/TEAMS('TEAM_01')”
The method is called once to update the team with the ID ‘TEAM_01’.
PATCH ”…/iwbep/tea_busi/0001/EMPLOYEES('1')”
The method is called once to update the employee with the ID ‘1’.
Result
If your data provider successfully updates the requested entity it must return the business data by calling method SET_BUSI_DATA of the import parameter IO_RESPONSE. If your data provider does not find the requested entity or has other issues while processing the update it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Parameter |
Description |
---|---|
IO_REQUEST |
This import parameter contains the information that is needed to create the requested entity. This information is identical to the information in the original OData request. It is not yet manipulated. |
IO_RESPONSE |
This parameter must be used by your data provider to return the data of the requested entity and/or additional information to the framework. |
Precondition
This method is called by the framework using class /IWBEP/CL_V4_ABS_DATA_PROVIDER to process an OData request. This method is called for return a single entity.
Example: GET “…/iwbep/tea_busi/0001/TEAMS('TEAM_01')”
The method is called once to retrieve the team with the ID ‘TEAM_01’.
Result
If your data provider finds the requested entity it must return it by calling method SET_BUSI_DATA of the import parameter IO_RESPONSE. If for a conditional GET request (for example. a request with “if modified since”) the entity has not changed, it is sufficient if your data provider simply calls method SET_NOT_MODIFIED of the import parameter IO_RESPONSE. Otherwise it depends on your eTag handling.If your data provider does not find the requested entity it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.
Parameter |
Description |
---|---|
IO_REQUEST |
This import parameter contains the information that is needed to determine the requested entities such as filter, expand or select tree. This information is identical to the information in the original OData request. It is not yet manipulated. |
IO_RESPONSE |
This parameter must be used by your data provider to return the data of the requested entities and/or additional information to the framework. |
Precondition
This method is called by the framework using class /IWBEP/CL_V4_ABS_DATA_PROVIDER to process an OData request. This method is called to return a collection of entities.
Example: GET “…/iwbep/tea_busi/0001/TEAMS"
The method is called once to retrieve all teams provided by the application.
Result
If your data provider finds the requested entities it must return the data by calling method SET_BUSI_DATA of the import parameter IO_RESPONSE. In addition the count of the entity collection needs to be set if requested.If your data provider does not find the requested entity it must throw an exception inheriting from exception /IWBEP/CX_GATEWAY.