cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert a Fiori Elements List Report to be Draft Enabled?

michael_piehl
Active Participant
0 Kudos
661

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,

Mike

Accepted Solutions (0)

Answers (2)

Answers (2)

pfoehn
Explorer
0 Kudos

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.

Kind regards
Paul
.

michael_piehl
Active Participant
0 Kudos

Can anyone explain how to create a draft enabled fiori elements list report from an existing app?

pfoehn
Explorer
0 Kudos

Hi Mike

I used the inline editing of a table in a similar scenario as yours without draft.

My setup:

- 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...

Kind regards
Paul


michael_piehl
Active Participant
0 Kudos

thanks Paul,

Currently, when I press the create button, I do not get the blank line in my table to add values into anything. I only get the error

Cannot set properties of undefined (setting 'createNonDraftInfo)

Here is the other question I asked that started all of this: https://answers.sap.com/questions/13998183/inline-create-in-object-page-cannot-set-properties.html?u... (this link contains my metadata and manifest, if that might help).

I'm already using the changeset_begin and changeset_process methods for other buttons. My problem seems to be that when I press the button, I don't even get the option to enter some values and press save. Did you need to create a different button, instead of the standard SAP button?

Thanks for all your help,

Mike