Skip to Content
-1
Former Member
Sep 26, 2015 at 01:39 PM

How to Pass data of Odata Services to Simpleform Element in SAPUI5

1436 Views

Hi All,

i am beginner in SAPUI5 , i am writing complete code in index.html file only till now .

below is my code where i am trying to pass data to simpleform element

var oModel =

new sap.ui.model.odata.ODataModel("http://abc.com:8002/sap/opu/odata/SAP/ZGET_SINGLE_DATA_SRV/",

true,

'p_usrid, 'p_pass');

oModel.read("/empinfoSet('910302')");

var oSimpleForm = new sap.ui.layout.form.SimpleForm(

"sf1",

{

maxContainerCols: 2,

editable: true,

content:[

new sap.ui.core.Title({text:"Person"}),

new sap.ui.commons.Label({text:"Name"}),

new sap.ui.commons.TextField({value:"{Pernr}"}),

]

});

oSimpleForm.setModel(oModel);

oSimpleForm.placeAt("content");

Please Help..