Symptom
- Custom field "Original Date" is not populated with the material document header level field "Document date" value
- Custom field "LR NO" is not populated with the material document header level field "Bill Of lading" value
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Check the output form template for the material document。
- Observe that in the XML file output, the "Original Date" field is not populated with the "Document date" field data, and the custom fields YY1_BILL_OF_LADING & YY1_DocumentDate are empty/initial values.
- Use MIGO > Change Material Document to display the material document in the output tab and verify that the custom field values remain unchanged.
Cause
- For material document output the custom fields YY1_BILL_OF_LADING and YY1_DocumentDate are not populated during the material document generation.
- Even when the system calls custom logic again in the change material document mode, the custom field values cannot be updated and remain with the initial values set during the material document generation.
Resolution
1. Create a data source extension "YY1_RETURNTOVENDOR" in the APP: Custom fields > "Data source extensions" tab for the custom form template's data source.
- Add the header fields "BillOfLading" and "DocumentDate" to the data source.
2. Navigate to MIGO > Change Material Document> Output > Document Details: #&&DOWNLOAD_FORM_DATA_XML&&#
- Verify that the XML file now retrieves the values of the header fields as follows:
- YY1_BillOfLading: 'LR NO'
- YY1_DocumentDate : '2025-06-26T00:00:00'
3. Adjust the data binding in the custom form template "YY1_RETURNTOVENDOR" as follows:
- For "Original Date" change the data binding to YY1_DocumentDate.
- For "LR NO" change the data binding to YY1_BillOfLading.
4. Confirm that the "Original Date" and "LR NO" fields in the output form template are now populated with the values from the material document header fields "Document date" and "Bill of Lading" respectively.
See Also
- Refer to: SAP Note 3072643 for additional information about support platforms.
Keywords
custom fields, MIGO, movement type 161, original date, document date, YY1_BILL_OF_LADING, YY1_DocumentDate, form template, data source extension, sap s/4hana cloud public edition, goods receipt, material document, output form, data binding. , KBA , MM-IM-GR-MIGO-2CL , Goods Receipt from External Procurement (MIGO) (Public Cld) , How To