Skip to Content
0

How to pass username dynamically in defining requests in sap UI5

Jul 24, 2017 at 02:21 PM

118

avatar image
Former Member

I want to develop an offline fiori app in which data is specific to the user. So, I have to pass the username to the back-end to fetch the data of that particular user.

I am using SAP Cloud Platform Fiori Master-Detail template to develop the application. APP-to APP SSO is not configured in our SCP.

I think that username should be passed dynamically in the defining request.

can anybody help me out in this.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sergio Guerrero Jul 25, 2017 at 02:39 AM
0

there are several approaches here:

if your backend is via XS - you can derive the username from the $ ($.session.username) API or if you are able to make it to the database, there is also a session user you can get via the SESSION_USER variable.

Alternatively, if you have been able to authenticate the user, there should be some other parameter or variable on your application which authenticated the user, maybe ?? please analyze the request/response from the network tab in google chrome (F12)

hope this helps

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I am able to authenticate the user by passing username, problem lies when the offline store is created in the device, it will get all the data using defining request which is defined in manifest.json file. I am not able to pass dynamic username in manifest.json file.

0
Jithin Kumar Aug 01, 2017 at 11:12 AM
0

Hi Ashok,

Hope below link helps :

1. Link
2. Link

Share
10 |10000 characters needed characters left characters exceeded