cancel
Showing results for 
Search instead for 
Did you mean: 

Using Fiori smart templates for Create /Update of Deep Entity Structure

venkatakalyan_karanam
Active Contributor

Hi Team,

Can you please let us know if Fiori elements / Smart Form and Smart Table can be used for creating /Updating the deep entity structure using the oData service method create deep insert. I heard that Smart templates/ Fiori elements well suitable for read operation or for CDS View display. I did not find any information about this scenario with smart templates. I know there are some SAP Standard Fiori apps using the Master detail with Smart templates , not sure how they are handling the update with header and items with deep entity structure.

Generally we will use JSON Payload with header and items and call oData service update method with sap.m library Simple Form and sap.m.Table.

Please help if you know any information .

Accepted Solutions (0)

Answers (1)

Answers (1)

maheshpalavalli
Active Contributor
0 Kudos

Smart table will only be supported with odata model binding.. But there are some blogs where people hacked it using the json model as well.. But it might break in future, can't tell for sure..

https://blogs.sap.com/2019/06/26/enable-crud-operations-in-smart-table-sapui5/

If you want to do it the right way then Smart table has to be binded with the odata model and if you want to add new items to the smart table when binded to odata model, it will not add the items like how it works for json mode (eg. just adding a new item in array automatically adds item in a table)

What you are talking about standard apps with crud enabled smart templates is draft feature.. They support draft feature, if you add a new item, it will send a request to backend and save the data and it reloads the smart table so u have a new item there...

For basic apps without deep entity scenarios you can go with fiori app templates or smart controls..

But when you want deep entity then try the draft scenario. Else go with the regular json model with smart controls.

https://blogs.sap.com/2019/01/09/abap-programming-model-for-sap-fiori-draft-based-for-non-guid-keys-...

Thanks,
Mahesh

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi Mahesh , Smart controls using with JSON , there is no smart here. I think this is just same as we do normally with sap.m Library.

I need some example on Smart Templates with Deep Entity Post- just like Header and Items.

Using JSON with sap.m. library is straight forward. But I am looking for the Direct oData Binding for deep entity structure

Thanks and Regards

Kalyan

maheshpalavalli
Active Contributor
0 Kudos

Hi Venkatakalyan Karanam

I suggested it as it is not possible to have deep create scenario with Smart controls. So you have to go with normal controls as far as I know.

BR,

Mahesh