cancel
Showing results for 
Search instead for 
Did you mean: 

Edit function not available in Fiori elements app object page generated from OData V4 - UI service

benyei_gergely
Discoverer
0 Kudos

Hi Experts

I face the following problem during my first RAP implementation: I have created an OData V4 - UI service in the S4 backend based on CDS Entities (Root and child entities) and an unmanaged behaviour definition. In the behavior definition for the root entity there are the standrad actions delete and update are included, plus 3 custom actions. For the child entity create and delete is in the behavior def.

When I generate a Fiori Element List report application in the Business Application Studio, the Update button is not shown in the object page of the root entity  and also the create and delete buttons for the child entities table (below the root entity object page) are also missing. If I generate the fiori app from an OData V2 - UI service, then these buttons are there and working correctly (the implementation in the backend is okay).

Maybe one important thing: I have set the "isActionCritical" annotation to one of my custom actions. Is this at fault?

Could you give me a hint, what am I missing or doing wrong?

Thanks

Gergely

View Entire Topic
MioYasutake
Active Contributor
0 Kudos

@benyei_gergely 

Please try adding the following draft actions to the behavior definition of the root entity.

 

  draft action Edit;
  draft action Activate;
  draft action Discard;
  draft action Resume;
  draft determine action Prepare;

 

benyei_gergely
Discoverer
0 Kudos

@MioYasutake

Hi Mio

Thanks for your answer. Is the only possible way to get the edit functionality that I use draft mode? I'm not sure how this is going to change my whole solution. Do I have to implement all the draft actions? Also, do I have to change all my implementations of the current update, delete, create and custom actions to accomodate draft?

Thanks and kind regards

Gergely

MioYasutake
Active Contributor
0 Kudos

@benyei_gergely

To create Fiori elements with CRUD functionality using OData V4, you need to enable the draft functionality. Even in an unmanaged scenario, you don't need to implement the draft logic yourself, nor do you need to change the existing CRUD implementation.

Additionally, regarding the issue of the Create and Delete buttons for child entities not being displayed, try adding the following to the association definition to the child in the Behavior Definition:

association _ChildEntity { create; with draft; }
benyei_gergely
Discoverer
0 Kudos

Hi @MioYasutake

thanks for your feedback and the further info. I have tried to simply add these mentioned fragments in the behaviour definition(s) and also created with quick fix the draft tables. It is still not working properly (however after exposing the draft actions, at least the edit button appears). Now I am going to figure out, what is still needed. In my usecase no direct table update happens in the CRUD functions, but I call some standard ABAP methods to update specific objects. 
Your hints are usefull and thanks for them.

Br
Gergely