Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

UI5 Navigation to script view with parameters

$
0
0

Hello,

 

I have a xsodata service to access a database table and I need a navigation from this table to a script calculation view which has 2 input parameters.

 

Problem is these parameters are not part of the database table. They come from an UI5 application and are entered by the user. So I can't use method described in part "7.1.6.8 OData Parameter Entity Sets" of hana dev guide.


Here is my script calc view


 

Here is my xsodata code :

 

"<package>.data::LOCATIONS" as "LocationsTable"

     navigates ( "location_devices" as "Devices");

 

"<package>.models::CV_LOC_DEVICES" as "LocDevices"

    keys generate local "ID"

    aggregates always

    parameters via entity;

 

association "location_devices"

        principal "LocationsTable"("LOC_GROUPID") multiplicity "1"

        dependent "LocDevices"("LOC_GROUPID") multiplicity "*";

 

For now I call the calc view from my UI5 app with this kind of link :

 

.../services/services.xsodata/LocDevicesParameters(IP_FR_DTE=param1,IP_TO_DTE=param2)/Results&$filter=LOC_GROUPID eq 1

 

But I would like to get LOC_GROUPID from current context in my UI5 app, so the link should be something like :

 

.../services/services.xsodata/LocationsTable(1)/Devices(IP_FR_DTE=param1,IP_TO_DTE=param2)

 

 

Could you please explain me how I can get this.

 

Thanks,

François


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>