In logistics invoice verification, the system does not check for duplicate vendor invoice when Electronic Data Interchange (EDI) invoices are created. You can implement sap note 394316 to activate this check.
You can configure user exit EXIT_SAPLMRMH_015 in enhancement MRMH0002 so that the system checks for a duplicate invoice when the EDI invoice is entered.
To do this, activate the user exit above and add the following lines in include ZXM08U26
* Check for duplicate invoice CALL FUNCTION 'MRM_DUPLICATE_INVOICE_CHECK' EXPORTING i_bukrs = e_rbkpv-bukrs i_lifnr = e_rbkpv-lifnr i_waers = e_rbkpv-waers i_xblnr = e_rbkpv-xblnr i_bldat = e_rbkpv-bldat i_rmwwr = e_rbkpv-rmwwr i_xrech = e_rbkpv-xrech * I_BELNR = EXCEPTIONS INVOICE_ALREADY_EXISTS = 1 OTHERS = 2 . IF sy-subrc <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
For the user under whose name the import of the EDI invoice happens, use transaction OMRM to create the following error (not warning) messages: M8 462’Check if invoice already entered as logistics inv. doc. number & &’ and M8 108 ‘Check if invoice already entered under accounting doc. no. & &’. If when you do this the system displays a message telling you that message number 462 is not allowed, create the following entry in table T100S of transaction SM31:
SM31: T100S -> choose “Maintain” -> choose “New entries”
Application Area | MsgNo | Allowed | Standard | Switch off |
---|---|---|---|---|
M8 | 462 | IWE | W | X (select) |
When the IDoc is now processed and an invoice is found in the system that fulfills the criteria for being a duplicate invoice, the IDoc is not posted but is set to status 51 (incorrect) instead.