Skip to Content
avatar image
Former Member

How to pass username dynamically in defining requests in sap UI5

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 25, 2017 at 02:39 AM

    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

    Add comment
    10|10000 characters needed 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.

  • Aug 01, 2017 at 11:12 AM

    Hi Ashok,

    Hope below link helps :

    1. Link
    2. Link

    Add comment
    10|10000 characters needed characters exceeded