Hi Dennis,
Thanks for the reply, It works well.
I also have another question as per below screenshot, I have created 2 panels - 1 for getting Input Parameters and another for showing table
On clicking Button, I also want to pass the input parameters to my Odata Model to which my table is bound
Sample Code:
var updatePanel = new sap.ui.commons.Panel("updPanel").setText('Enter Input Parameters');
var layoutNew = new sap.ui.commons.layout.MatrixLayout({width:"auto"});
var oVal1 = new sap.ui.commons.TextField("cArea",{tooltip: "Controlling Area", width: "200px", editable:true});
var oVal2 = new sap.ui.commons.TextField("sDate",{tooltip: "Start Date", width: "200px", editable:true});
var oVal3 = new sap.ui.commons.TextField("eDate",{tooltip: "End Date", width: "200px", editable:true});
var oExcButton = new sap.ui.commons.Button({
text : "Submit",
press: function(e) {
oTable.setVisible(oTable.getVisible() === false);
}});
//press : oController.callOdataService });
layoutNew.createRow(new sap.ui.commons.Label({text: "Controlling Area: "}), oVal1 );
layoutNew.createRow(new sap.ui.commons.Label({text: "Start Date: "}), oVal2 );
layoutNew.createRow(new sap.ui.commons.Label({text: "End Date: "}), oVal3 );
layoutNew.createRow(new sap.ui.commons.Label(),oExcButton);
updatePanel.addContent(layoutNew);
var tPanel = new sap.ui.commons.Panel("tbPanel").setText('Table');
//Models and Table Defined and now Binding model to table
oTable.setModel(oModel);
var sort1 = new sap.ui.model.Sorter("CostCenter");
var bindString = "/InputParams(P_ControllingArea='ULIN',P_FromExpectedPostingDate='20130101',P_IsReadItem='0',P_ToExpectedPostingDate='20131231')/Results";
oTable.bindRows(bindString, sort1);
tPanel.addContent(oTable);
As you can see at present I am manually passing Input Parameters to my Odata Service but Now I want it to be dynamic, can you please help me with this
Regards,
Rohit