cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Update manually added Standard Fields to Standard ODATA APIs using Extended CDS view.

Sijin_Chandran
Active Contributor
0 Kudos

Hello SAP Gurus,

My query is exactly same as the below one,

https://community.sap.com/t5/technology-q-a/unable-to-update-additional-fields-in-extended-cds-view-...

But since there is no answer for this, am creating a post again.

We have added Standard PO Item field BEDNR to the CDS EntitySet responsible for Item details in /sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder

We are successfully able to use this newly added field for Data Fetch that is GET calls but during POST its not getting updated at the Table level.

 

@AbapCatalog.internal.setChange: 'FLDADD_NO_ASS_INFLUENCE'
@AbapCatalog.sqlViewAppendName: 'ZS_PO_API_EXT'
@EndUserText.label: 'Purchase Order API Extension'
extend view A_PurchaseOrderItem with Z_PO_API_EXT
{
  R_PurchaseOrderItem.RequirementTracking
}

 

Helpful pointers much appreciated on understanding where we could be missing on this.

Thanks,

Sijin

View Entire Topic
Mikhail_Minakov
Explorer
0 Kudos

I suppose you have to redefine PATCH method of class CL_API_PURCHASEORDER_P_DPC_EXT implementing the modify code for new field.

More details Extending an OData Service Using Service Builder 

Sijin_Chandran
Active Contributor
0 Kudos
Hello Mikhail, We were finally able to find the solution for this with minimalistic coding approach. I have updated the same as solution, you can have a look. Thanks, Sijin