on 09-25-2015 6:35 AM
Hi Experts,
I have created a report in Fiori which displays all records,but i want to display particular record when i clicked on button after providing input values .
Can anyone suggest me how to capture values from input field and send it back to odata.
Thanks,
Reshma
Hi Reshma,
This.getView().byId(your input id).getValue()
This will help you to take value from input field
Thanks,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reshmi,
You should use odata model to get records from services.
For example.
Input1 - employees collection
Input 2 - purchase collection
Step 1: call metadata by using sap.ui.model.odata.odatamodel
Step2: create one json model
Var data= {
'input1' : metadata model collection name dot entity type,
'input2' : metadata model collection name dot entity type,
}
Sap.ui.getCore ( ) . setModel (new sap.ui.model.json.jsonModel (data))
Now go to view
New sap.m.Input({value: '{input1}'})
Thanks,
Karthik A
Hi,
Once you have input all the data in the UI fields, you can submit it for persistence using odata create function. Please refer the create function in the below api help
Then, you can refresh your Table to display the latest data using the refresh operation. Please refer the same help api above for this.
Hope this answers your question.
Regards , Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.