I have an existing Fiori Elements List report. The services were generated from SEGW, OData V2, and I am using annotations to control all the elements of the display.
I have several ui.lineitems on the object page that I want to be able to use change/display and inline creation. I understand that inline creation is only available for draft enabled applications, but I have been unable to determine how to convert my existing application to be draft enabled. I have looked through the blogs/questions and I Have been unable to find anything that shows me how to set something as draft enabled. What annotations need to be added? do I need to add new entities (DraftAdministrativeData???)
If anyone can point me to documentation or walk-thrus to help me convert my application, I would be very greatful,
Good evening Mike
Sorry, I can't help you there, as I build my apps with SAPUI5 and I am not really into Fiori Elements.
My guess is that Fiori Elements requires an oData built with RAP. Maybe you try the flexible programming
model and "extend" your Fiori Elements App with your own "coding". I.E. code your own "create" Buttton which
calls a Dialog to create a new record.
I used the inline editing of a table in a similar scenario as yours without draft.
- SEGW using CDS via Referenced Data Sources
- SmartTable to display / edit Table
- Save with oModel.submitChanges() -> this triggers a $batch call with all modified
records (changesets) in the body of the oData call -> this again triggers
the changeset methods of your DPC_EXT class.
- Redefine the (/IWBEP/IF_MGW_APPL_SRV_RUNTIME) methods changeset_begin,
changeset_end and CHANGESET_PROCESS for your DPC_EXT class
- You could code all your business logic in these methods. Be carefull with the "commit".
- As I wanted to re-use my already existing code in my single record "update_entity",
I used the "deferred mode" which calls my "update entity" methods. To achieve this
behaviour I just did not redefine the CHANGESET_PROCESS. You are not allowed
to commit the "update entity". Do the commit in the changeset_end.
If you want to know more about deferred mode:
Deferred mode versus Non-deferred mode batch request processing? in SAP NW gateway Odata | SAP Commu...