SAP Knowledge Base Article - Public

3684028 - Error "Property YY1_F_CustomField is Invalid" During Billing Document Creation Using API "Create from SD Document" in SAP S/4HANA Cloud Public Edition

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

    1. Create a custom field named "YY1_F_Customfiled'" and enable the OData API for the field.
    2. Attempt to create a bill document using the Create from SD Document - Include the custom field "YY1_F_Customfiled" in the payload.
    3. 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:

    1. 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.
    2. 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

    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

    Product

    SAP S/4HANA Cloud Public Edition all versions