Since SAP Cloud Platform inception earlier this year I have hosted HDB trial DB with Azure. I have been extremely pleased with CAL, SAP Cloud Appliance Library. I have especially enjoyed the ablity to upload previous hanatrial source files where no remediation required to run on CAL. Also it is fantastic experience to observe the catalog and editor get steady functionality improvements throughout. However the purpose of this post is to provide working example of XSODATA and SAPUI5 dropdown functionality alongside previous examples from hanatrial (see previous blogs on embedding contact form in web application using $.hdb direct sql statement and follow up blog using HANA sqlscript stored procedure.
<INSERT_YOUR_CAL_INSTANCE_URL_HERE>,,
http://<PREVIOUS_URL>/sap/hana/xs/lm/?page=HomeTab,http://<INSERT_YOUR_CAL_INSTANCE_URL_HERE>/sap/ha...,
http://<PREVIOUS_URL>/sap/hana/ide/trace/,http://<INSERT_YOUR_CAL_INSTANCE_URL_HERE>/sap/hana/ide/tr...,
http://<PREVIOUS_URL>/sap/hana/ide/catalog/,http://<INSERT_YOUR_CAL_INSTANCE_URL_HERE>/sap/hana/ide/...,
http://<PREVIOUS_URL>/sap/hana/ide/editor/,http://<INSERT_YOUR_CAL_INSTANCE_URL_HERE>/sap/hana/ide/e...,
http://<PREVIOUS_URL>/sap/hana/ide/,http://<INSERT_YOUR_CAL_INSTANCE_URL_HERE>/sap/hana/ide/,
http://<PREVIOUS_URL>/sap/hana/xs/admin/,http://<INSERT_YOUR_CAL_INSTANCE_URL_HERE>/sap/hana/xs/admi...,
http://<PREVIOUS_URL>/<INSERT_YOUR_FOLDER_HERE>/contact.html,http://<INSERT_YOUR_CAL_INSTANCE_URL_HE...,
http://<PREVIOUS_URL>:8000/sap/hana/uis/clients/ushell-app/shells/fiori/FioriLaunchpad.html?siteId=s...,
http://<PREVIOUS_URL>/sap/hana/ide/editor/plugin/testtools/odataexplorer/index.html?appName=/<INSERT...,
create column table "ACTUALS"."STATES" (
System nvarchar(3) not null,
Client nvarchar(3) not null,
state nvarchar(3) not null,
PRIMARY KEY
(
System,
Client,
state
)
);
service {
"ACTUALS"."STATES" as "ZDATA" with ("CLIENT","SYSTEM","STATE");
}
var oModel_XS = new sap.ui.model.json.JSONModel('http://<INSERT_YOUR_CAL_INSTANCE_HERE>/act/zdata.xsodata/ZDATA?$format=json');
sap.ui.getCore().setModel(oModel_XS,"XSODATA");
var oDrop_Lbl =new sap.ui.commons.Label({text:"State", width:"85px", textAlign:"Right"});
oDrop_Lbl.setDesign(sap.ui.commons.LabelDesign.Bold);
oDrop_Lbl.addStyleClass('zlabel');
var oDrop_field = new sap.ui.commons.DropdownBox({ id: 'dropdownBoxid',
width:"185px",
items : {
path : "XSODATA>/d/results",
template : new sap.ui.core.ListItem({ text : "{XSODATA>STATE}"
}).bindProperty("text","XSODATA>STATE")
}
});
oDrop_field.addStyleClass('zlabel');
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |