Skip to Content
avatar image
Former Member

Passing userid dynamically to oDataservice in dynamic tile in fiori


We have a dynamic tile in fiori launchpad , where we are using a service which takes userid as input,which shows count of materials based on userid.

My system arch is like we have HANA as backend and xsodata is created out of it and registered in gateway system, which is then consumed by fiori. The connection setting between gateway and HANA is using service username and password and users are not maintained in HANA.

Now the issue is how do I pass user id dynamically to my service which i am using in tile. Since dynamic tile is a configuration I could not write any code to get the logged in userid.

So what are the ways I can pass the logged in userid to my service?

Please advise.

Thanks, Swarnaprakash

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 01, 2017 at 12:50 PM

    To give a bit more context - there are no named users in HANA, only a service user, so XSJS to get the user ID is not an option. Also, there is no Web Dispatcher in the Landscape, so calling native HANA directly from UI5 is not an option.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 02, 2017 at 01:54 AM

    The username should be available in gateway as SY-UNAME. So you should be able add some coding in gateway to pass it to the service and filter the data accordingly.



    Add comment
    10|10000 characters needed characters exceeded