Symptom
An error message "Property YY1_F_Customfiled is invalid" occurs during the creation of a billing document based on an SD document using the API Create from SD Document. The issue persists even after enabling the OData API for the custom field YY1_F_Customfiled.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Create a custom field named "YY1_F_Customfiled'" and enable the OData API for the field.
- Attempt to create a bill document using the Create from SD Document - Include the custom field "YY1_F_Customfiled" in the payload.
- Error message: "Property 'YY1_F_Customfiled" is invalid" appears.
Cause
The API action "Create from SD Document" does not support setting custom field values directly and cannot be extended.
Resolution
Follow the recommended approach to achieve the required functionality:
- Create the billing document using the CreateFromSDDocument API as a POST action, with the parameter AutomPostingToAcctgIsDisabled set to true, this creates the billing document with reference to the SD document.
- Update the custom field value using the Update Billing Document API as a PATCH action.
Using this approach, the custom field can be updated with the required value.
See Also
Refer the below document for more information
- Create (disable auto posting): Create from SD Document
- Update: Update billing doc
Keywords
invalid property, 'YY1_F_Customfiled' , API billing document creation, CreateFromSDDocument, OData API, metadata name mismatch, SAP S/4HANA Cloud Public Edition,, update billing document, integration testing. , KBA , SD-BIL-IV-IF-2CL , External Billing (Public Cloud) , Problem
SAP Knowledge Base Article - Public