cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Gateway Utility for Device discovery

sdfraga
Participant
0 Kudos

Hello,

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

Sérgio

Accepted Solutions (0)

Answers (2)

Answers (2)

sdfraga
Participant
0 Kudos

Hi jberthe ,

Thanks for your reply.

The solution is passing this info in the slug or even in a dedicated header parameter, that's clear. The UI must inform the back-end about the device since the UI has APIs for that.

I was just wondering if anyone knows about any utility class on the BE for that purpose.

Sérgio

Joseph_BERTHE
Active Contributor
0 Kudos

Hello,

I'm not sure there iis a method in the BE that tell you which device you are. But maybe you can pass parameter in the get URL to inform the backend. During the create stream you have the slug parameter, try using it. If not working, use any parameter in the URL and catch it through the request property in the BE.

regards,

Joseph