cancel
Showing results for 
Search instead for 
Did you mean: 

Passing userid dynamically to oDataservice in dynamic tile in fiori

Former Member
0 Kudos

Hi,

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

Accepted Solutions (0)

Answers (2)

Answers (2)

jamie_cawley
Advisor
Advisor
0 Kudos

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.

Regards,

Jamie

Former Member
0 Kudos

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.