cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create and Update not appearing in Fiori Elements App in CAPM

durgaprasanth_vemula
Participant
0 Kudos
2,053

Create and Update not appearing in Fiori Elements App in CAPM

1)I am had exposed the entity Materials

2)Create button is not appearing and when we click on record and Edit button also not appearing.

Note : only Delete button is appearing

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Include an annotation similar to the one below in your app's <appname>/annotations.cds file.

annotate AdminService.Books with @odata.draft.enabled;

durgaprasanth_vemula
Participant
0 Kudos

Hi edgar1506,

1)As per your instructions i had added the code

2)But i am getting the below error.

Epena
Participant
0 Kudos

durgaprasanth.vemula please do a deploy, so the draft tables can be created by the framework...

akik
Discoverer
0 Kudos
deploy the database like cds deploy
Epena
Participant
0 Kudos

Hello, I believe the entity must be draft enabled:

@odata.draft.enabled

Docs: https://cap.cloud.sap/docs/advanced/fiori#enabling-draft-with-odatadraftenabled

Also make sure it's annotated with insert capabilities

annotate CatalogService.Materials with @(
  Capabilities.InsertRestrictions : {
    Insertable : true,
  }
);

Docs: https://sapui5.hana.ondemand.com/sdk/#/topic/b623e0bbbb2b4147b2d0516c463921a0.html

Regards.

Epena
Participant
0 Kudos

durgaprasanth.vemula please do a deploy, so the draft tables can be created by the framework...

martinstenzig
Contributor
0 Kudos

Did you specify the draft annotation

odata.draft.enabled : true
durgaprasanth_vemula
Participant
0 Kudos

Hi martin.stenzig3,

Could you please tell me where exactly i had to mention this code.

Thanks