Mirror of Oracle documentation

Converted for search and offline reading. Authoritative source: Oracle. Diagrams and some complex tables are simplified — check the PDF when in doubt.

10

Invoice Matching

Merchandising and Sales Audit stage invoice records to be integrated to the Invoice Matching solution for returns to vendor (RTV), consignment orders and returns, deals, importing partners, obligations, and customs entry. The programs described in this chapter ensure that open transactions are closed and old data is purged related to this integration.

In addition to the programs listed below, there are two integration programs related to this functional area:

  • edidlinv (Download of Invoice For Invoice Matching)

  • saexpim (Export DSD and Escheatment from Sales Audit to Invoice Matching)

These are both described in Merchandising Inbound and Outbound Integration Guide .

Program Summary

The following batch designs are included in this functional area:

  • Close Aged Shipments to Prevent them from Matching Open Invoices (invc_ship_close_job) - background job

  • Close Aged Shipments to Prevent them from Matching Open Invoices (invclshp)

  • fdrmanifest_job

  • Fiscal Document Upload into FDG (fdg_reim_job)

  • Purge Aged Invoices (invoice_purge_job)

  • Purge Aged Invoices (invprg) - background job

  • Purge Obsoleted Documents in FDG (fdg_purge_job) - background job

  • Invoice Matching Accounts Payable Publish (fif_ap_publish)

  • Invoice Matching Financial Data Publish (fif_im_gl_publish)

Close Aged Shipments to Prevent them from Matching Open Invoices (invc_ship_close_job)

Module Name invc_ship_close_job Description Close Aged Shipments to Prevent them from Matching Open Invoices Functional Area Invoice Matching Module Type Admin - Ad hoc Module Technology Background Processing Catalog ID N/A Wrapper Script b8dwrap.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This background job is composed of two steps processing. It will have a threading assignment and a business logic processing.

Thread assignment program will filter eligible records from order-shipment and order header tables based on its purge criteria. The Close Open Ship Days parameter will determine number of days that all shipment records that have remained opened and not associated with any open invoices. These records are chunked and Thread ID is assigned for each. They will be stored temporarily in a staging table.

The Business logic program will process all records from the staging table. Using bulk processing, this program will update the records from order-shipment table by setting the invoice match status to ‘C’losed. It will free up and clean the staging table afterwards. There is a STOP ON NEXT feature in bulk processing (through a loop) where Administrators can stop this batch with a flip of this indicator.

Restart/Recovery

N/A

Key Tables Affected

Table 10-1 Key Tables Affected

TableSelectInsertUpdateDelete
PERIODYesNoNoNo
SYSTEM_OPTIONSYesNoNoNo
RMS_BATCH_STATUSYesNoNoNo
B8D_PROCESS_CONFIGYesNoNoNo
JOB_AUDIT_LOGSNoYesNoNo
B8D_INVC_CLOSE_SHIP_STGYesYesNoYes
ORDHEADYesNoNoNo
SHIPMENTYesNoYesNo
SHIPSKUYesNoNoNo
INVC_HEADYesNoNoNo
INVC_XREFYesNoNoNo

Close Aged Shipments to Prevent them from Matching Open Invoices (invclshp)

invclshp.pc

Module Name

Description Close Aged Shipments to Prevent them from Matching Open Invoices Functional Area Invoice Matching Module Type Admin Module Technology ProC Catalog ID RMS252 Wrapper Script rmswrap.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch program will close all shipments that have remained open for a specified number of days as defined by the ‘Close Open Ship Days’ system parameter and are not associated with any open invoices. This will be accomplished by setting the invc_match_status on the SHIPMENT table to ‘C’losed.

Restart/Recovery

N/A

Design Assumptions

N/A

fdrmanifest_job

Module Name fdrmanifest_job Description The script identifies invoices that should be sent to SEFAZ for manifest. Functional Area Rfm Module Type Admin – Ad hoc Module Technology Background Processing Catalog ID Wrapper Script fdrmanifest.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch calls the FDR process to identify invoices that need to be sent to the government for receipt manifests. The batch also accounts for the necessary steps to complete the manifest process, such as verifying the accuracy of the data, executing the necessary validations, and

applying the changes to the system. The batch execution is complete once the manifest process is complete, whether it is successful or unsuccessful.

Restart/Recovery

N/A

Key Tables Affected

TableSelectInsertUpdateDelete
RFM_CODE_DETAILYesNoNoNo
RFM_CODE_DETAIL_TLYesNoNoNo
RFM_WFLW_SETYesNoNoNo
RFM_WFLW_EVE_LOGYesNoNoNo
RFM_WFLW_STA_LOGYesYesNoNo
RFM_FLX_DOC_FDRYesYesYesNo
RFM_FLX_DOC_FDR_DATA_XMLYesYesYesYes
RFM_WFLW_SET_VARYesNoNoNo
RFM_WFLW_EXEC_VARYesNoNoNo
RFM_WFLW_SET_ACTIONYesNoNoNo
RFM_WFLW_ERRNoYesNoNo
RFM_WFLW_EVE_LOGNoYesNoNo
RFM_FLX_SET_CONTENTYesNoNoNo
RFM_FLX_DOC_FDR_HISTYesYesYesNo
RFM_FLX_DOC_FDR_DATA_JSONNoYesYesNo
RFM_FLX_DOC_FDR_DATA_XML_HISTNoYesYesNo
RFM_FLX_DOC_FDR_KEYSYesYesYesNo

Design Assumptions

N/A

Fiscal Document Upload into FDG (fdg_reim_job)

Module Name Description Functional Area Module Type Module Technology Catalog ID Wrapper Script

fdg_reim_job The script calls the FDG to migrate data between ReIM and FDG.

Rfm Admin – Ad hoc Background Processing N/A fdg_reim_batch_sql.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

The purpose of this process is to migrate data from ReIM tables to FDG tables and then follow the existing process in the FDG module to finish the migration. ReIM will be the owner of the data to be stored in their staging tables, which will be consumed by batch, and will begin the migration process to FDG.

Restart/Recovery

N/A

Key Tables Affected

TableSelectInsertUpdateDelete
IM_FDG_DOC_HE
AD
YesNoYesYes
IM_FDG_DOC_ET
T
YesNoNoYes
IM_FDG_DOC_DT
L
YesNoNoYes
IM_FDG_DOC_DT
L_PACK_COMP
YesNoNoYes
IM_FDG_DOC_RE
F
YesNoNoYes
IM_FDG_DOC_NO
N_MERCH
YesNoNoYes
IM_FDG_DOC_TA
X
YesNoNoYes
IM_FDG_DOC_TE
XT
YesNoNoYes
IM_FDG_DOC_EX
T
YesNoNoYes
SVC_FDG_HDRYesYesYesYes
SVC_FDG_ETTYesYesNoYes
SVC_FDG_DTLYesYesNoYes
SVC_FDG_DTL_P
ACK
YesYesNoYes
SVC_FDG_REFYesYesNoYes
SVC_FDG_NON_
MERCH
YesYesNoYes
SVC_FDG_TAXYesYesNoYes
SVC_FDG_TEXTYesYesNoYes
SVC_FDG_EXTYesYesNoYes
FDG_HDRNoYesNoNo
FDG_ETTNoYesNoNo
FDG_DTLNoYesNoNo
TableSelectInsertUpdateDelete
FDG_REFNoYesNoNo
FDG_NON_MERCNoYesNoNo
H
FDG_TAXNoYesNoNo
FDG_DTL_PACKNoYesNoNo
FDG_TEXTNoYesNoNo
FDG_EXTNoYesNoNo
FDG_ERRORNoYesNoNo

Design Assumptions

N/A

Purge Aged Invoices (invoice_purge_job)

Module Name invoice_purge_job Description Purge Aged Invoices Functional Area Invoice Matching Module Type Admin - Ad hoc Module Technology Background Processing Catalog ID N/A Wrapper Script b8dwrap.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This background job is composed of two steps processing. It will have a threading assignment and a business logic processing.

Thread assignment program will filter eligible records from invoice header table based on its purge criteria from system parameter settings. The Order History Months parameter will determine the number of months older than month ages between current date and invoice match date, invoice date (if match date is not available). These old posted invoices that have not already been purged by Order Purge Job (invoices associated to an order) will be included for deletion. This includes all types of invoices-non-merchandise, credit notes, credit note requests, debit memos, and consignment invoices. Regular merchandise invoices will primarily be deleted through order purge job but will be deleted by this job if they still exist in the system. This program deletes only from the RMFCS invoice tables preceded with ‘INVC’. These records are chunked and Thread ID is assigned for each. They will be stored temporarily in a staging table.

The Business logic program will process all records from the staging table. Using bulk processing, this program will delete the records from invoice-related tables by calling INVC_SQL.DELETE_INVC. It will free up and clean the staging table afterwards. There is a

STOP ON NEXT feature in bulk processing (through a loop) where Administrators can stop this batch with a flip of this indicator.

Restart/Recovery

N/A

Key Tables Affected

Table 10-2 Key Tables Affected

TableSelectInsertUpdateDelete
PERIODYesNoNoNo
PURGE_CONFIG_OPTIONSYesNoNoNo
RMS_BATCH_STATUSYesNoNoNo
B8D_PROCESS_CONFIGYesNoNoNo
JOB_AUDIT_LOGSNoYesNoNo
B8D_INVOICE_PURGE_STGYesYesNoYes
INVC_HEADYesNoNoYes
SA_TRAN_HEADYesNoNoNo
SHIPSKUYesNoNoNo
INVC_DETAILNoNoNoYes
INVC_NON_MECHNoNoNoYes
INVC_MERCH_VATNoNoNoYes
INVC_DETAIL_VATNoNoNoYes
INVC_DISCOUNTNoNoNoYes
INVC_TOLERANCENoNoNoYes
ORDLOC_INVC_COSTNoNoYesNo
INVC_MATCH_QUEUENoNoNoYes

Purge Aged Invoices (invprg)

Module Name Invprg.pc Description Purge Aged Invoices Functional Area Invoice Matching Module Type Admin Module Technology ProC Catalog ID RMS253 Wrapper Script rmswrap.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This program will purge old posted invoices that have not already been purged by ordprg.pc (which purges invoices associated with an order). This includes all types of invoices-nonmerchandise, credit notes, credit note requests, debit memos, and consignment invoices. Regular merchandise invoices will primarily be deleted through the order purge batch (ordprg.pc) but will be deleted by invprg.pc if they still exist in the system. The invoices considered are those older than the number of months defined in the

purge_config_options.ORDER_HISTORY_MONTHS column. The age of the invoices will be determined from the match date; if there is no match date, the invoice date will be used.

Note

This program deletes only from the Merchandising invoice tables preceded with ‘INVC’.

Restart/Recovery

N/A

Design Assumptions

N/A

Purge Obsoleted Documents in FDG (fdg_purge_job)

Module Name fdg_purge_job Description Purge obsoleted documents Functional Area Financial Module Type Admin – Ad hoc Module Technology Background Processing Catalog ID Wrapper Script b8dwrap.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This background job finds all fiscal document records on FDG tables that have passed retention days based on FDG system option FDG_SYSTEM_OPTIONS.DOCUMENT_PURGE_DAYS and purges the records.

Restart/Recovery

N/A

Key Tables Affected

TableSelectInsertUpdateDelete
B8D_PROCESS_CONFIGYesNoNoNo
RMS_BATCH_STATUSYesNoNoNo
JOB_AUDIT_LOGSNoYesNoNo
FDG_SYSTEM_OPTIONSYesNoNoNo
B8D_FDG_PURGE_STGYesNoYesYes
FDG_DTL_PACKYesNoNoYes
FDG_ERRORYesNoNoYes
FDG_EXTYesNoNoYes
FDG_TAXYesNoNoYes
FDG_REFYesNoNoYes
FDG_NON_MERCHYesNoNoYes
FDG_ETTYesNoNoYes
FDG_DTLYesNoNoYes
FDG_HDRYesNoNoYes
FDG_DTL_PACKYesNoNoNo
FDG_ERROR_PRG_HISTYesNoNoNo
FDG_EXT_PRG_HISTYesNoNoNo
FDG_TAX_PRG_HISTYesNoNoNo
FDG_REF_PRG_HISTYesNoNoNo
FDG_TEXT_PRG_HISTYesNoNoNo
FDG_NON_MERCH_PRG_HISTYesNoNoNo
FDG_ETT_PRG_HISTYesNoNoNo
FDG_DTL_PRG_HISTYesNoNoNo
FDG_HDR_PRG_HISTYesNoNoNo
Module Nameff_ap_publish.ksh
DescriptionInvoice Matching Accounts Payable Publish
Functional AreaGeneral Ledger
Module TypeBusiness Processing
Module Technologyksh
Catalog ID
Wrapper Scriptrmswrap_shell.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch job will first call FIF_AP_PUBLISH_SQL.PROCESS_HEAD to load records from IM_AP_STAGE_HEAD for the current date to the FIF_AP_HEAD_PUBLISH table. Then, it will call FIF_AP_PUBLISH_SQL.PROCESS_DETAIL to load records from IM_AP_STAGE_DETAIL for the current date to the FIF_AP_DETAIL_PUBLISH table.

If an external reference ID is not defined for the following fields in the corresponding RMS table, the program will raise an error:

  • Vendor (SUPS table)

  • Third Party Payee (SUPS table)

  • Best Terms (TERMS_HEAD table)

  • Org Unit (ORG_UNIT table)

Restart/Recovery

N/A

Key Tables Affected

TableSelectInsertUpdateDelete
RMS_PLSQL_BATCH_CONFIGYesNoNoNo
CODE_DETAILYesNoNoNo
IM_AP_STAGE_HEADYesNoNoNo
IM_AP_STAGE_DETAILYesNoNoNo
FIF_AP_HEAD_PUBLISHYesYesNoYes
FIF_AP_DETAIL_PUBLISHYesYesNoYes
FOUNDATION_UNIT_OPTIONSYesNoNoNo
SUPSYesNoNoNo
TERMS_HEADYesNoNoNo

Invoice Matching Financial Data Publish (fif_im_gl_publish)

Module Nameff_im_gl_publish.ksh
DescriptionInvoice Matching Financial Data Publish
Functional AreaGeneral Ledger
Module TypeBusiness Processing
Module Technologyksh
Catalog ID
Wrapper Scriptrmswrap_shell.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch job will call a program FIF_GL_PUBLISH_SQL.PROCESS_IM that will load records from IM_FINANCIALS_STAGE for the current date to the FIF_GL_PUBLISH table.

If the set of books from IM_FINANCIALS_STAGE does not have an external reference ID defined in FIF_GL_SETUP, this program will raise an error.

Restart/Recovery

N/A

Key Tables Affected

TableSelectInsertUpdateDelete
RMS_PLSQL_BATCH_CONFIGYesNoNoNo
IM_FINANCIALS_STAGEYesNoNoNo
FIF_GL_PUBLISHYesYesNoYes
FIF_GL_SETUPYesNoNoNo

In this guide