Skip to Content
0
Apr 17, 2018 at 02:18 PM

The element XXX of the CDS view YYY contains a path but is not read-only

1365 Views

Hi experts,

We want to extend the app for the purchase order (F0348A), which uses OData serviceMM_PUR_PO_MAINTAIN_V2. On the account assignment section of the PO item, a bunch of custom fields (already added to EKKN) shall be available for display and maintenance.

There are three "layers" of CDS:

1. CDS "C_PurOrdAcctAssignmentTP" that refers to

2. CDS "I_PurOrdAcctAssignmentTP" that refers to

3. CDS "I_PurgDocAccountAssignment"

Now we have extended the highest level CDS because it's the one which is used in the OData Service:

@AbapCatalog.sqlViewAppendName: 'Z_PO_ACCASS'

@EndUserText.label: 'PO: Acc. Assignment'

extend view C_PurOrdAcctAssignmentTP with ZC_PurOrdAcctAssignmentTP

association [1..1] to ZI_EKKN as _Ekkn on $projection.purchaseorder = _Ekkn.ebeln

and $projection.purchaseorderitem = _Ekkn.ebelp

and $projection.accountassignmentnumber = _Ekkn.zekkn {

_Ekkn.zfield1,

_Ekkn.zfield2,

_Ekkn.zfield3 }

We could activate this and the append is also visible in C_PurOrdAcctAssignmentTP and data is also read, when executing the extended CDS.

Now the problem is in transaction SEGW in the service MM_PUR_PO_MAINTAIN_V2. When we open it now, we got the following error message:

The element 'ZFIELD1' of the CDS view 'C_PurOrdAcctAssignmentTP' contains a path but is not read-only

I tried already to debug, to find out the root cause but had no success so far.

Can anybody assist here? Is this the right approach to extend the PO item account assignment section?

I would really appreciate some help!

Thanks!