Show TOC

 Detection Method: Duplicate Invoices with Same Approver 2

 

Use this detection method to find duplicate invoices that were approved by the same user.

Logic

Invoices are considered duplicates if the:

  • Company code (field BUKRS in table BKPF) is the same

  • Vendor (field LIFNR in table BSEG) is the same

  • Reference number (field XBLNR in table BKPF) is the same

  • Amount (field WRBTR in table BSEG) is the same

  • Document currency (field WAERS in table BKPF) is the same

  • Document numbers (field BELNR in table BKPF) are different

If the invoices are duplicates and the approver (field WI_AAGENT in table SWWWIHEAD) is identical, then the detection method returns a score of 100.

To determine the approver, only workflow items with task ID TS00407862, which is the standard payment release task (field WI_RH_TASK in table SWWWIHEAD), are considered. This information may need to be adapted for customer-specific workflow implementations.

Investigation and Detection Object Types
  • FRA_VEND: (Vendor)

  • FRA_VEINVH: (Vendor Invoice Header)

ERP Tables Used
  • BKPF: Accounting Document Header

  • BSEG: Accounting Document Segment

  • LFA1: Vendor Master (General Section)

  • LFB1: Vendor Master (Company Code)

  • SWOTIP: Index Parent Object Types

  • SWWWIHEAD: Workflow Runtime: Header Table for All Work Item Types

  • SWW_WI2OBJ: Workflow Runtime: Relation of Work Item to Object

SAP HANA Procedures for Detection Methods

Procedure Category

Procedure Name

Procedure Type

Package

Selection

PR_DUP_INV_SAME_APPROVER_SELE

SQLScript Procedure

sap.hana-app.fra.suite.pur.dt.vendor.invoiceheader.se

Execution

PR_DUP_INV_SAME_APPROVER_EXEC

SQLScript Procedure

sap.hana-app.fra.suite.pur.dt.vendor.invoiceheader.ex

Additional Information

PR_DUP_INV_SAME_APPROVER_ADDINF

SQLScript Procedure

sap.hana-app.fra.suite.pur.dt.vendor.invoiceheader.ai

Detection Method Parameters

None

Alert Messages

Message ID

Message Number

Message Text

FRA_INTERNAL_AUDIT

116

Invoice has a duplicate in the system:

FRA_INTERNAL_AUDIT

117

Invoice number: &1 Fiscal year: &2 Approved by: &3