Hello,
Scenario:
I am a newbie to SAPUI5 and I am creating a simple report using SAPUI5 in which I am using ODATA which consumes an RFC which has some input parameters which I'll be giving from the front-end itself and getting the output based on the RFC itself. So for that to achieve, I have created 2 views and 2 controllers.
VIEW1: I have created a form which is taking 6 input parameters. One is drop-down list, one is text box and remaining are date, time (from,two). and a search button.
CONTROLLER 1: After hitting search button,I am retrieving my inputs using sap.ui.getCore().getElementById('myid').getValue(); within the search function and then forwarding my app to view 2 using app.to("idview2");
CONTROLLER 2: Here, I have created a model using ODATA web service
VIEW2: In my view 2, I just have a table (11 columns) which will be having different outputs based on the inputs and I want to show the data using.
var oTable = sap.ui.table.Table("tableid",{
visibleRowCount: 100,
editable: false
});
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text:"User Name"}),
visible: true,
template: new sap.ui.commons.TextView({text:"{}"})
}));
and binding at the end like oTable.bindRows("CHNG>/changeSet");
Questions:
- How the ODATA Model should look like, right now it is having 2 entities (i/p,o/p) by importing the RFC
- How to pass the parameters which i am getting in the controller 1 to my model and where to pass those. Or do I have to create a new model after passing those input parameters.
- Syntax to get the output? is it the same which I have written in view 2.
I am really stuck and could't find anything.