STO - IDOC INVOIC - MM Receipt on Delivery note rather PO number
I'm processing an MM Receipt INVOIC IDOC to create an Intercompany Vendor Invoice against a Purchase order.
This is integrated in a standard Stock Transfer Order. This IDOC is generated using Output type RD04 from Intercompany billing.
When SAP creates IDOC, it is based on the Delivery note number rather than the PO number, even I have the PO and Delivery in my PO historic, and even if I have IDOC segment E1EDP02 QUALF 001 with PO and segment E1EDP02 with QUALF 016 with Delivery note.
I tried to managed PO item flags: "Invoice Receipt Indicator" or "Indicator: GR-Based Invoice Verification".
But there is no impact.
When I create the MM Receipt manually using TCode MIRO in reference to the PO. It works.
When I create the MM Receipt manually using TCode MIRO in reference to the Delivery not. It doesn't work. I got the same error message "Delivery note/service entry sheet xxxx does not exist".
I conclude that when SAP performs the IDOC, someting in the IDOC tells him to create a invoice in reference to the Delivery note rather than the PO. How can we change it?
Please, could you help me to understand this blocking point and to allow to create the MM Receipt on PO?