cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass value from one webpage to another in SAP UI5?

Former Member
0 Kudos

Hi Friends,

I am having a tree structure as below:

Plant

     Production

            Equipment1

            Equipment2

            Equipment3

I am fetching the ID for one of the equipments say Equipment2 and passing the ID to another query template from which I am getting some records related to that ID. Suppose the ID for the equipment is 5, then the records I am geeting are:


           Equipment1

                 SubItem1

                 SubItem2

                 SubItem3

                 SubItem4


Now I want to map these records as it is in tree structure to another web page which I am triggering from the first web page.

Can anyone suggest some ideas regarding this?

Regards,

Shitikantha Nanda

Accepted Solutions (0)

Answers (2)

Answers (2)

bhuvneshkumar_gupta
Participant
0 Kudos

Hi,

create a second view  for example -'detail view' and define the required parameter in manifest.json file in routing section .

now u have two views main and detail.

Make ur first call from main view.

now pass the Equipment1 from main view to detail view. -


this.getRouter().navTo("detail", {equipmentId : Equipment1}, true);

detail - view name , {equipmentID : Equipment1} is the pattern defined in manifest.json, true is parameter to refresh the router.


now in detail view controller, you make a your second call using this equipment id and map the data to view.


coding help you can get from SAPUI5 SDK - Demo Kit  

and -

https://open.sap.com/courses/ui51/items/33aLjCaN7p6ule56JwXUqDhttps://sapui5.netweaver.ondemand.com/sdk/#docs/guide/1b6dcd39a6a74f528b27ddb22f15af0d.html


open sap Developing Web Apps with SAPUI5 course week4 unit 1 and 2.

SergioG_TX
Active Contributor
0 Kudos

Shitikantha,

you can use the router from the sdk as shown here:

SAPUI5 SDK - Demo Kit