cancel
Showing results for 
Search instead for 
Did you mean: 

Deactivate Metadata Cache for single OData Service

marius_heussner
Explorer
0 Kudos

Hi,

is it possible to deactive metadata caching for a single OData service in SAP?

I just found how to deactive metadata caching globally for all services via TCode /IWFND/MED_ACTIVATE but my requirement is to deactivate caching only for one single OData service.

I am very grateful for further ideas.

Marius

Accepted Solutions (1)

Accepted Solutions (1)

ivo_skolek
Explorer
0 Kudos

Hi Marius, I achieved this by re-implementing GET_LAST_MODIFIED method in my *MPC_EXT class. It is following approach described in here: SAP help - metadata cache

I just put there a code like this and that achieves that the metadata is never cached: GET TIME STAMP FIELD rv_last_modified.

marius_heussner
Explorer
0 Kudos

Hi Ivo,

do you know how to do this for a OData service that was generated by SAP RAP or CDS Annotation @OData.publish: true? Because in that case the *MPC_EXT class is not generated.

For my special case, I build the service by using SAP RAP. Then I removed all my service definitions I had before and build a new SEGW project where I referenced to my root CDS. Then the *DPC_EXT and *MPC_EXT are generated and I could deactivate metadata caching using the GET_LAST_MODIFIED method.

But it feels very wrong deleting all my service definitions and going back to a SEGW project and mix it with a SAP RAP project.

Best regards

Marius

Answers (0)