Logged in User Details in Fiori UI5

In this example, We will create an UI5 application which will read the login User details and display it on Table.

We will be following below steps-

      1. Configure AppRouter service in xs-app.json.
      2. Create and define Table in View.
      3. Define Method on Controller.

Step 1 - Configure AppRouter service in xs-app.json

In the xs-app.json, add the app router configuration.

So your xs-app.json file will look like below -

Step 2 - Create and define Table in View

In the View.xml file, define the table like below -

Step 3 - Define Method on Controller

In the Controller.js file, define the method and call it on onInit method like below -

And it is done !!!