OData Channel implementations retrieve the data from an SAP Business Suite system, that is, a backend system. For this you first have to define a service in the backend system. Models and services have to be registered.
You can maintain these settings in IMG activities in the SAP Business Suite system. In transaction SPRO open the SAP Reference IMG and navigate to and Maintain Services.
In these activities you can create you own service by specifying the model name and the model provider class (MPC). In the second activity you specify the service name and the corresponding data provider class (DPC), and then you can assign the model. For more information, see the documentation of the IMG activities.
In transaction SPRO open the SAP Reference IMG and navigate to .
You can register for a service that it extends an existing service. OData requests for the original, extended service will then be processed by the new, extending service. So while the endpoint (URL) remains the same the original service is replaced with another service extending it.
When changing a service an additional section Extension for Service is available with the fields Technical Service Name and Service Version.
Service B extends service A.
Service A has been activated on the SAP Gateway hub as OData service ZA.
A client calls the OData service ZA.
The runtime checks if for the requested service (A) extensions exist and again if for the extensions additional extensions etc. exist.
If no extensions exist, the request would be delegated to Service A.
If extensions exist, the runtime determines the requested extension, in this case Service B.
The request is delegated to service B.
It is possible to register more than one service to extend the same service.
If more than one service extends a service the following algorithm is used to identify the “right” extending service:
First the runtime checks if there are extensions that have not been provided by SAP (flag IS_SAP_SERVICE).
If yes, the runtime considers only those. That is, the customer or partner extensions win over SAP extensions.
Else, the runtime considers all extensions, namely all SAP-delivered extensions.
Among the found extensions pick the one with the newest CREATED timestamp. In other words, the newest extension wins.
The runtime also provides a BAdI to overwrite the default runtime determination process. This overwriting is possible via enhancement spot /IWBEP/ES_MGW_MED_SER_EXT.
The algorithm described above is the default implementation of the BADI (class /IWBEP/CL_MGW_MED_SER_EXT_BADI).