Skip to Content

Add Edit View and Save Function to Fiori ODATA App

Hello Community,

it is very easy for me to build a fiori app with a master detail template providing data from an ODATA service with Web IDE.

My ODATA Service does not only provide a GET function, it is also able to create and update entries, but the master detail template only displays the data and has no edit view.

What is the easiest way to add an edit function to my app?
I am able to create an edit view and call the ODATA service with ajax and send the changed values from document.getElementById() but what is the correct way to do this?

Is there a step by step instruction or demo app?

Thanks for your help!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 08, 2017 at 11:19 AM

    There is already a template providing an edit function in the category "SAP Fiori Application" called "CRUD Master-Detail Application".

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 06, 2017 at 08:28 AM

    dont use ajax and getElementById() etc.

    use sap.ui.model.odata.v2.ODataModel or v4 and to add and edit functionality explore createEntry() and submitChanges(), will help you.

    Add comment
    10|10000 characters needed characters exceeded

    • once you select the oData service while creating app from template, initially odata model will be created(check- component.js and manifest.json). no need to create any other model and all.

      now, you can perform CRUD operation with the help of this model, check below link for more info:

      OData V2 Model