Symptom
It is not clear when the system updates the fields Reference Document, Reference Document Item and Fisc. Year Ref. Doc. in purchase order history CDS view I_PURCHASEORDERHISTORYAPI01 and material document item CDS view I_MATERIALDOCUMENTITEM_2.
Environment
SAP S/4HANA Cloud Public Edition
Cause
The Reference Fields Fisc. Year Ref. Doc. (for the Fiscal Year), Reference Document (for the Document Number) and Reference Document Item (for the Item Number) are only updated in the CDS view I_PURCHASEORDERHISTORYAPI01 and I_MATERIALDOCUMENTITEM_2 when posting goods movements with reference to a Purchase Order Item which has indicator "GR-based IV".
Resolution
The fields are used to build the corresponding link between the goods receipt and the corresponding invoice.
Via these Reference Fields we can see which documents belong to the same Goods Receipt-Invoice Receipt Assignment Group.
- If the purchase order item has the 'GR-based IV' indicator set:
- A Goods Receipt is posted for the Purchase Order:
The three fields Reference Document, Reference Document Item and Fisc. Year Ref. Doc. will be updated with the document number, item and year from the goods receipt. - The previous Goods Receipt is cancelled:
This cancellation makes reference to the previous posting. The three fields Reference Document, Reference Document Item and Fisc. Year Ref. Doc. will be updated with the document number, item and year from the previous goods receipt that we are now reversing. - A new Goods Receipt is posted as a Subsequent Delivery to the previous posting:
This further delivery makes reference to the previous posting. Again the three fields Reference Document, Reference Document Item and Fisc. Year Ref. will be updated with the document number, item and year from the initial goods receipt. - A new Goods Receipt is posted with reference to the Purchase Order:
This new posting does not reference any of the previous goods movements. This document starts a new Goods Receipt - Invoice Receipt Assignment Block. Therefore, the three fields Reference Document, Reference Document Item and Fisc. Year Ref. will be updated with the document number, item and year from the new goods receipt.
- A Goods Receipt is posted for the Purchase Order:
- If the purchase order item does not have the 'GR-based IV' indicator set, these fields are not updated in any case.
The Reference Fields Reference Document, Reference Document Item and Fisc. Year Ref. Doc. are only updated in goods movements referencing purchase orders (movement type 1xx). They are not updated in Goods Issues or Transfer Postings.
Note: The Reference Fields Reference Document, Reference Document Item and Fisc. Year Ref. Doc. will not be updated with reference to production orders.
Keywords
I_PURCHASEORDERHISTORYAPI01, CDS view, Reference Document, Reference Document Item, Fisc. Year Ref. Doc., Fiscal year, MIGO, GRN, goods receipt, GR-based IV, purchase order history, blank, empty, I_PURCHASEORDERHISTORYAPI01, goods issue, transfer posting, material document , KBA , MM-FIO-IM-SGM-2CL , Fiori UI for Stock and Goods Movements (Public Cloud) , Problem
SAP Knowledge Base Article - Public