cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass values to odata service

vignesh_kamath
Explorer
0 Kudos

I need to pass value (date) to the following odata service-

/sap/opu/odata/sap/ZDATAXYZ_SRV/DatatestSet(Pdate=datetime'2015-07-30T00%3A00%3A00')

Have already created XML view/ controller, model using WEBIDE 1.12.

Also able to get value from Datepicker in the above date format.

Pls guide how to do the data binding..etc

There is a serviceBinding.js file generated while creating Odata model.

function initModel() {

  var sUrl = "/sap/opu/odata/sap/ZDATAXYZ_SRV/";

  var oModel = new sap.ui.model.odata.ODataModel(sUrl, true);

  sap.ui.getCore().setModel(oModel);

}

...

Odata service needs to fetch just one value ItemID, for the specified date (Pdate).

after passing Pdate-

the result - ItemID is to be displayed.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182645
Participant
0 Kudos

hi vighnesh

if you are using single field of date

in odata set pdate as string and

just pass value DatatestSet('yyyymmdd')