Skip to Content

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

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!

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on May 20, 2018 at 07:27 AM

    Hi Wewer Mireille,

    Have you got the solution on above problem. i am facing same let me know.

    Regards,

    Parshuram Arsul

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 12, 2018 at 04:18 AM

    Did ensure your CDS view ZI_EKKN that you have in your association has the correct annotations for the object model and access control. They should be similar to the annotation in the TP view you are are extending. i.e.

    @AccessControl.authorizationCheck: #CHECK
    @AccessControl.personalData.blocking: #REQUIRED
    @ObjectModel: {
       compositionRoot: true,
       representativeKey: 'xxxxxxxxx',
       createEnabled,
       deleteEnabled,
       updateEnabled: 'EXTERNAL_CALCULATION',
       usageType.serviceQuality: #C,
       usageType.sizeCategory: #L,
       usageType.dataClass: #MIXED
    

    Note make sure you check the annotations of sub views of the main Odata enabled CDS view

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 01, 2019 at 12:26 PM

    Hello Wewer Mireille / Parshuram Arsul,

    Have you find any solution for the Issue. Please share it if you find something..

    Thanks

    Himadri

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.