Cache Cleanup in Odata Provisioning (Sap Cloud Platform)
The purpose of this blog post is, in a simple way, to show how to resolve the error from metadata cache of an OData published in OData Provisioning.
Somes times we need to expose data from Sap to be consumed for another applications. A simple way to do this is to expose Odata via Odata Provisionig service in HCP.
This blog post is not about the Odata Provisioning configuration. For it, please go to this blog post:
We have some caches to improve the performance of Odata services. Basically we have cahe on the Gateway System side and HCP side.
When an odata service published in OData Provisioning is updated in Sap Gateway System, we sometimes come across the error message related to the cache:
IWBEP / CM_MGW_RT / 003
The metadata cache on the hub system for the current model is out of date
This means the cache of metadata stored on HCP side is older then the stored on the Gateway System side.
When we search on the web about this error, almost all useful links points to Clear Metadata cache in Sap Gateway System. When in fact the error must be resolved in SCP side. Like the links below:
How to fix this:
Its simple. The metadata cache must be clear on ODP Administration tool.
1. Access OData Provisioning(ODP) Service in HANA Cloud Platform(HCP):
2. Access the Metadata menu on the left panel:
3. Clearing the metadata cache:
3.2 Now, just select the published service and click in “Clear”. Or click in “Clear All” to clear metadata cache of all published services.
Simple! Now, we can call the OData service again without problem.