When building SAP Fiori-like custom applications customers may have the concern that confidential data may be cached by the browser and may thus potentially remain on the device.
To avoid this behavior the response of our SAP NetWeaver Gateway OData service has to contain the following values in the HTTP header:
cache-control no-cache, no-store
There is fortunately the option for the SAP NetWeaver Gateway developer to instruct the User Agent not to cache specific data if needed.
We will enhance the simple sample service showing product data that I have descirbed in the following whitepaper
How to Develop a Gateway Service using Code based Implementation
The only thing we have to do is to add the following coding into the GET_ENTITYSET method I have taken from the SAP Online Help.
data: ls_header type ihttpnvp.
ls_header-name = 'Cache-Control'.ls_header-value = 'no-cache, no-store'.set_header( ls_header ).ls_header-name = 'Pragma'.ls_header-value = 'no-cache'.set_header( ls_header ).
When running the following URI /sap/opu/odata/sap/ZPRODUCT_SRV/ProductSet in the SAP NetWeaver Gateway Client you will notice that the appropriate header values have been set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.