Symptom
Updating fields via PATCH on A_EnterpriseProjectElement returns error "Use the Project entity to update the project definition." (/S4PPM/CRUD/377).
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Request URI:
PATCH <host>/sap/opu/odata/sap/API_ENTERPRISE_PROJECT_SRV;v=0002/A_EnterpriseProjectElement(guid'9418820a-c0a9-1ed8-9a92-4bed96f211dd') - Payload:
{
"ProjectElementDescription":"EPPM TEST updated",
"PlannedEndDate":"2018-06-11T00:00:00"
} - You get error:
<code>/S4PPM/CRUD/377</code>
<message xml:lang="en">Use the Project entity to update the project definition.</message>
Cause
The ProjectElementUUID used refers to the project definition (top/root node of the WBS). For enterprise projects, updating the project definition is not supported via A_EnterpriseProjectElement; only read is supported.
As noted in SAP Help Document:
https://help.sap.com/docs/SAP_S4HANA_CLOUD/988903b47d7040f6ac4ec02e44bb58e4/08cf160a75bb49f2ba740650b2e9662e.html?locale=en-US&version=LATEST
Resolution
Updates to the project definition must be performed via the Project entity (A_EnterpriseProject). The Project Element API supports updates for WBS elements, not for the project header.
If you expect to avoid reading the project definition with the project element entity, you can test to add the filter:
"?$filter=(ParentObjectUUID ne guid'00000000-0000-0000-0000-000000000000')"
Keywords
API_ENTERPRISE_PROJECT_SRV, A_EnterpriseProjectElement, A_EnterpriseProject, PATCH, YY1_EP_PROJ_PKID_PTD, project definition, root node, ParentObjectUUID, update not supported, /S4PPM/CRUD/377, 400 bad request, enterprise projects, WBS element, OData v2, custom field update, Use the Project entity to update the project definition , KBA , PPM-SCL-STR , Project Structure (Public Cloud) , Problem
SAP Knowledge Base Article - Public