Skip to Content
Oct 19, 2020 at 05:12 PM

SAP Gateway Utility for Device discovery



I have to implement some logic on the /iwbep/if_mgw_appl_srv_runtime~get_stream of my OData service to control the Content-Disposition that I send back to the SAPUI5 app.

  • Application is executed in Desktop
  • >>> Content-Disposition should be set to inline
  • Application is executed in Mobile device
  • >>> Content-Disposition should be set to attachment

Is there any utility class in Gateway that we can use that exposes what device running the application?

Something like, IS_MOBILE(), IS_TABLET and IS_DESKTOP?

Maybe Andre Fischer knows something?

I am questioning this because I have stumbled with /IWBEP/CL_DIAGNOSTICS_FACADE class the other day, which has the method IS_GATEWAY_SERVICE(), that already helped me a lot in some BAdI implementations.

Thank you for any help