cancel
Showing results for 
Search instead for 
Did you mean: 

Updating cds view from front-end application's table (UI5)

emil_lazarski
Explorer
0 Kudos

Hi Gurus,

Today I came accross the following problem:

I have created a basic ui5 app that displays the Fragment in a dialog:

after the value in the field is changed the smartTables param:

fieldChange="onFieldChange"

is called:

onFieldChange: function (oEvent) {
let oSource = oEvent.getSource();<br>oSource.getTable().getModel().submitChanges();<br>}

However, when I am trying to perform changes, I get the following error:

I debugged the backend and basically the reason is that value in:
entity_load-sadl_entity-entity_control for update is empty (for update_final is not).

This, in turn comes from the method _determine_cud_enablement of class CL_SADL_TX_MD_FROM_CDS_ANNOS, where CDS annotations are READ. I have noticed that in order to have the UPDATE filled with abap_true, the following annotation is required:

@ObjectModel.updateEnabled: true.

When I added the both required annotations in the

define root view entity AAA provider contract transactional_query as projection on YYY{

I got the errorstating, that I cannot use these annotations there.

Has anyone encountered such problem before?

All I wanted was just push the updated values to the backend.

Thank you

junwu
Active Contributor

what's your environment? are you using rap?

Accepted Solutions (1)

Accepted Solutions (1)

emil_lazarski
Explorer
0 Kudos

Alright, the solution was to create the Behaviour definitions for other projection views exposed in the service.

Hopefully it will help someone in the future.

Answers (1)

Answers (1)

emil_lazarski
Explorer
0 Kudos

Yes, we are using RAP.