Symptom
When using the API 'Commercial Project - Create, Update' (/CPD/SC_PROJ_ENGMT_CREATE_UPD_SRV) to update header fields of the sales order generated from a customer project (order type SO01), one of the following errors occurs:
- Field PAYMENT_METHOD_CODE is not an input field.
- Field PAYMENT_TERMS_CODE is not an input field.
Upon checking the API metadata, both fields don't have the bellow property, so they should be updatable:
- sap:updatable="false"
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
Send a PATCH request to the following URL and containing the following body
<host>/sap/opu/odata/CPD/SC_PROJ_ENGMT_CREATE_UPD_SRV/A_CustProjSlsOrd('{Project ID}')
{
"CustomerProject": "{Project ID}",
"SalesOrder": "{Sales Order ID}",
"CustomerPaymentTerms": "KB01",
"PaymentMethod": "P"
}
Cause
The sales order is already in status 'Completed' and the project billing request is invoiced.
Resolution
When the sales order is in this status, some fields cannot be changed anymore.
If, by checking the sales order through the app 'Manage Sales Orders - Services' (F0804), the fields are greyed out and cannot be updated, then those fields cannot be updated through API as well.
See Also
Keywords
/CPD/SC_PROJ_ENGMT_CREATE_UPD_SRV, A_CustProjSlsOrd, sales order, SO01, customer project, plan customer project, update, patch, merge, greyed out, PaymentMethod, CustomerPaymentTerms, updatable , KBA , SD-SLS-PBS , Project-Based Services in Sales Documents , CA-CPD-SS , S/4HANA Public Cloud – Professional Service Projects , Problem
SAP Knowledge Base Article - Public