cancel
Showing results for 
Search instead for 
Did you mean: 

unable to update manually added standard field (vbkd.kdkg2) on service API_SALES_QUOTATION_SRV

more_
Discoverer
0 Kudos
83

Hi everyone,

we want to update the VBKD field KDKG2 by calling the service /sap/opu/odata/sap/API_SALES_QUOTATION_SRV/A_SalesQuotation. Since the field is not provided in the standard view, we extended the associated view E_SalesDocumentBasic to make the field available. Our extension looks like this:

extend view entity E_SalesDocumentBasic with 
    association [1..1] to vbkd on  Persistence.vbeln      = vbkd.vbeln and vbkd.posnr = '000000'
{
    vbkd.kdkg2 as ZSDQuotationResult
}

We are now able to access the data of the field, but we can not update it. Updating one of the fields provided by default works fine.

I found this post describing exactly our problem just with another API, but the solution in that case was to extend the E_* CDS-View, which we already did, or am I missing something here?

https://community.sap.com/t5/technology-q-a/unable-to-update-manually-added-standard-fields-to-stand...

Technically, the update seams to fail because the "read table" in line 4285 (in Eclipse) of CL_SD_S4H_SDOC_GODATA returns sy-subrc=8 when reading for ZSDQUOTATIONRESULT (when trying this with the standard field sy-subrc is 0)

(this is line 4284 to 4286)

      loop at lt_concat_component reference into data(lr_concat_component).
        read table lr_mapping->field_mapping reference into lr_field_mapping with table key field_name_odata = lr_concat_component->*.
        check sy-subrc = 0.

Can someone here tell me whats wrong?

 

Accepted Solutions (0)

Answers (0)