InvoiceSelectionCheckCache

Maintain Invoice Selection Cache

Major Business Rule

Object Name: B03B0172

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to check the Invoice Selection cache for the specified invoice pay item. The 

Invoice Selection cache is used by the Standard Receipts Entry (P03B102) and Draft Entry (P03B602) 

applications to track invoices that have been tagged for selection. This cache stores only the match line 

ID and extension and the invoice document number (DOC), type (DCT), company (KCO), and pay item (SFX). 

The records in the cache can be manipulated by one of two indexes: match line ID and extension 

(Invoice Selection by ID) or document number, type, company, and pay item (Invoice Selection by Document).


Setup Notes and Prerequisites

The Invoice Selection cache must exist before calling this function.


Special Logic

None.



Technical Specification


Parameters

Item DescriptionI/OReq?Notes
MATH01mnMatchLineID NMatch Line ID defines a group of selected Invoices

RC5mnMatchLineExtension NMatch Line Extension defines a individual record in 

the group

DOCmnDocumentNumberIYDocument Number of the selected Invoice

DCTszDocumentTypeIYDocument Type of the selected Invoice

KCOszDocumentCompanyIYDocument Key Company of the selected Invoice

SFXszDocumentPayItemIYPay Item of the selected Invoice

EV01cReturnStatus '0' if the record was not found, '1' if the record was 

found.


Related Tables

None.


Related Functions

None.


Processing

Set cReturnStatus to '0'.

Validate required parameters.

If the number of records in the Invoice Selection by Document cache is greater than zero,

Open cursor.

Retrieve record from the Invoice Selection by Document cache.

If the record was found,

Set cReturnStatus equal to '1'.

Close the cursor.



Data Structure

D03B0172 - Maintain Invoice Selection Cache

Purpose
This Data Structure is used by the following functions:

InvoiceSelectionCheckCache       - Check the Invoice Selection cache for the specified invoice pay 
item

InvoiceSelectionCreateCache      - Create the Invoice Selection cache

InvoiceSelectionDeleteByDocument - Delete the specified invoice pay item from the Invoice 

Selection cache

InvoiceSelectionDeleteByID       - Delete invoices from the Invoice Selection cache for the 

corresponding                                    line ID and extension

InvoiceSelectionDestroyCache     - Terminate the Invoice Selection cache and free its associated 

memory

InvoiceSelectionWriteCache       - Write the specified invoice pay item to the Invoice Selection 

cache


Based on which function you are calling the following parameters will be required or optional. For 

more detail information see the function notes for the individual functions.




Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineIDI       Match Line ID number to define group of invoices
InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Required

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


RC5mnMatchLineExtensionI       Match Line Extension to define item in the Match Line 

ID

InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Optional

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DOCmnDocumentNumberI       Document Number of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DCTszDocumentTypeI       Document Type of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


KCOszDocumentCompanyI       Document Key Company of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


SFXszDocumentPayItemI       Pay Item of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


EV01cReturnStatusO '0' if the record was not found, '1' if the record was 

found.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnMatchLineIDMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnMatchLineExtensionRC5MATH_NUMERICNONENONE

This field is used to create a unique key within a file and should be used with a next number approach.

mnDocumentNumberDOCMATH_NUMERICNONENONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szDocumentCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szDocumentPayItemSFXcharNONENONE

A number that identifies the pay item for a voucher or an invoice. The system assigns the pay item number. If the voucher or invoice has 
multiple pay items, the numbers are sequential.

cReturnStatusEV01charNONENONE

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

F03B11 Customer Ledger
InvoiceSelectionCreateCache

InvoiceSelectionCreateCache

Maintain Invoice Selection Cache

Major Business Rule

Object Name: B03B0172

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to create the Invoice Selection cache. The Invoice Selection cache is used by 

the Standard Receipts Entry (P03B102) and Draft Entry (P03B602) applications to track invoices that 

have been tagged for selection. This cache stores only the match line ID and extension and the invoice 

document number (DOC), type (DCT), company (KCO), and pay item (SFX). The records in the cache can be 

manipulated by one of two indexes: match line ID and extension (Invoice Selection by ID) or document 

number, type, company, and pay item (Invoice Selection by Document).


Setup Notes and Prerequisites

None.


Special Logic

None.



Technical Specification


Parameters

Item DescriptionI/OReq?Notes
MATH01mnMatchLineID NMatch Line ID defines a group of selected Invoices

RC5mnMatchLineExtension NMatch Line Extension defines a individual record in 

the group

DOCmnDocumentNumber NDocument Number of the selected Invoice

DCTszDocumentType NDocument Type of the selected Invoice

KCOszDocumentCompany NDocument Key Company of the selected Invoice

SFXszDocumentPayItem NPay Item of the selected Invoice

EV01cReturnStatusON'0' if unsuccessful, '1' if successful.


Related Tables

None.


Related Functions

None.


Processing

Set cReturnStatus to '0'.

Initialize the Invoice Selection by ID cache.

Initialize the Invoice Selection by Document cache.

If successful,

Set cReturnStatus to '1'.



Data Structure

D03B0172 - Maintain Invoice Selection Cache

Purpose
This Data Structure is used by the following functions:

InvoiceSelectionCheckCache       - Check the Invoice Selection cache for the specified invoice pay 
item

InvoiceSelectionCreateCache      - Create the Invoice Selection cache

InvoiceSelectionDeleteByDocument - Delete the specified invoice pay item from the Invoice 

Selection cache

InvoiceSelectionDeleteByID       - Delete invoices from the Invoice Selection cache for the 

corresponding                                    line ID and extension

InvoiceSelectionDestroyCache     - Terminate the Invoice Selection cache and free its associated 

memory

InvoiceSelectionWriteCache       - Write the specified invoice pay item to the Invoice Selection 

cache


Based on which function you are calling the following parameters will be required or optional. For 

more detail information see the function notes for the individual functions.




Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineIDI       Match Line ID number to define group of invoices
InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Required

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


RC5mnMatchLineExtensionI       Match Line Extension to define item in the Match Line 

ID

InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Optional

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DOCmnDocumentNumberI       Document Number of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DCTszDocumentTypeI       Document Type of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


KCOszDocumentCompanyI       Document Key Company of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


SFXszDocumentPayItemI       Pay Item of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


EV01cReturnStatusO '0' if the record was not found, '1' if the record was 

found.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnMatchLineIDMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnMatchLineExtensionRC5MATH_NUMERICNONENONE

This field is used to create a unique key within a file and should be used with a next number approach.

mnDocumentNumberDOCMATH_NUMERICNONENONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szDocumentCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szDocumentPayItemSFXcharNONENONE

A number that identifies the pay item for a voucher or an invoice. The system assigns the pay item number. If the voucher or invoice has 
multiple pay items, the numbers are sequential.

cReturnStatusEV01charNONENONE

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

F03B11 Customer Ledger
InvoiceSelectionDeleteByDocument

InvoiceSelectionDeleteByDocument

Maintain Invoice Selection Cache

Major Business Rule

Object Name: B03B0172

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to delete the specified invoice pay item from the Invoice Selection cache. The 
Invoice Selection cache is used by the Standard Receipts Entry (P03B102) and Draft Entry (P03B602) 

applications to track invoices that have been tagged for selection. This cache stores only the match line 

ID and extension and the invoice document number (DOC), type (DCT), company (KCO), and pay item 

(SFX). The records in the cache can be manipulated by one of two indexes: match line ID and extension 

(Invoice Selection by ID) or document number, type, company, and pay item (Invoice Selection by Document).


Setup Notes and Prerequisites

The Invoice Selection cache must exist before calling this function.


Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineID NMatch Line ID defines a group of selected Invoices
RC5mnMatchLineExtension NMatch Line Extension defines a individual record in 

the group

DOCmnDocumentNumberIYDocument Number of selected Invoice

DCTszDocumentTypeIYDocument Type of selected Invoice

KCOszDocumentCompanyIYDocument Key Company of selected Invoice

SFXszDocumentPayItemIYPay Item of selected Invoice

EV01cReturnStatusO '0' if unsuccessful, '1' if succesful.


Related Tables

None.


Related Functions

None.

Processing

Set cReturnStatus to '0'.

Validate required parameters.

If the number of records in the Invoice Selection cache is greater than zero,

Open Invoice Selection by ID cursor.

Open Invoice Selection by Document cursor.

Retrieve record from the Invoice Selection by Document cache.

If the record was found,

Retrieve record from the Invoice Selection by ID cache.

If the record was found,

Delete the invoice from the Invoice Selection by Document

cache.

Delete the invoice from the Invoice Selection by ID cache.

Set cReturnStatus equal to '1'.

Close both cursors.



^

Data Structure

D03B0172 - Maintain Invoice Selection Cache

Purpose
This Data Structure is used by the following functions:

InvoiceSelectionCheckCache       - Check the Invoice Selection cache for the specified invoice pay 
item

InvoiceSelectionCreateCache      - Create the Invoice Selection cache

InvoiceSelectionDeleteByDocument - Delete the specified invoice pay item from the Invoice 

Selection cache

InvoiceSelectionDeleteByID       - Delete invoices from the Invoice Selection cache for the 

corresponding                                    line ID and extension

InvoiceSelectionDestroyCache     - Terminate the Invoice Selection cache and free its associated 

memory

InvoiceSelectionWriteCache       - Write the specified invoice pay item to the Invoice Selection 

cache


Based on which function you are calling the following parameters will be required or optional. For 

more detail information see the function notes for the individual functions.




Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineIDI       Match Line ID number to define group of invoices
InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Required

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


RC5mnMatchLineExtensionI       Match Line Extension to define item in the Match Line 

ID

InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Optional

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DOCmnDocumentNumberI       Document Number of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DCTszDocumentTypeI       Document Type of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


KCOszDocumentCompanyI       Document Key Company of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


SFXszDocumentPayItemI       Pay Item of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


EV01cReturnStatusO '0' if the record was not found, '1' if the record was 

found.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnMatchLineIDMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnMatchLineExtensionRC5MATH_NUMERICNONENONE

This field is used to create a unique key within a file and should be used with a next number approach.

mnDocumentNumberDOCMATH_NUMERICNONENONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szDocumentCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szDocumentPayItemSFXcharNONENONE

A number that identifies the pay item for a voucher or an invoice. The system assigns the pay item number. If the voucher or invoice has 
multiple pay items, the numbers are sequential.

cReturnStatusEV01charNONENONE

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

F03B11 Customer Ledger
InvoiceSelectionDeleteByID

InvoiceSelectionDeleteByID

Maintain Invoice Selection Cache

Major Business Rule

Object Name: B03B0172

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to delete invoices from the Invoice Selection cache for the corresponding line 
ID and extension. If only line ID is passed, this function will delete all invoices that match. If 

both line ID and extension are passed, only the matching invoice will be deleted. The Invoice Selection 

cache is used by the Standard Receipts Entry (P03B102) and Draft Entry (P03B602) applications to track 

invoices that have been tagged for selection. This cache stores only the match line ID and extension 

and the invoice document number (DOC), type (DCT), company (KCO), and pay item (SFX). The records in 

the cache can be manipulated by one of two indexes: match line ID and extension (Invoice Selection by 

ID) or document number, type, company, and pay item (Invoice Selection by Document).


Setup Notes and Prerequisites

The Invoice Selection cache must exist before calling this function.


Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineIDIYMatch Line ID defines a group of selected Invoices
RC5mnMatchLineExtensionINMatch Line Extension defines a individual record in 

the group

DOCmnDocumentNumber NDocument Number of the selected Invoice

DCTszDocumentType NDocument Type of the selected Invoice

KCOszDocumentCompany NDocument Key Company of the selected Invoice

SFXszDocumentPayItem NPay Item of the selected Invoice

EV01cReturnStatusO '0' if unsuccessful, '1' if successful.


Related Tables

None.


Related Functions

None.

Processing

Set cReturnStatus to '0'.

Validate required parameters.

If the number of records in the Invoice Selection cache is greater

than zero,

Open Invoice Selection by ID cursor.

Open Invoice Selection by Document cursor.

Retrieve record from the Invoice Selection by ID cache using

mnMatchLineID only.

While the retrieved record's line ID matches mnMatchLineID,

Retrieve record from the Invoice Selection by Document cache.

If the record was found,

Delete the invoice from the Invoice Selection by Document

cache.

If mnMatchLineExtension was passed (full key),

Exit While loop.

Else,

Retrieve next record from the Invoice Selection by ID cache

using mnMatchLineID only.

Repeat until the retrieved record's line ID no longer matches

mnMatchLineID.

If no errors were encountered,

Delete all records from the Invoice Selection by ID cache equal

to mnMatchLineID.

If successful,

Set cReturnStatus equal to '1'.

Close both cursors.



^

Data Structure

D03B0172 - Maintain Invoice Selection Cache

Purpose
This Data Structure is used by the following functions:

InvoiceSelectionCheckCache       - Check the Invoice Selection cache for the specified invoice pay 
item

InvoiceSelectionCreateCache      - Create the Invoice Selection cache

InvoiceSelectionDeleteByDocument - Delete the specified invoice pay item from the Invoice 

Selection cache

InvoiceSelectionDeleteByID       - Delete invoices from the Invoice Selection cache for the 

corresponding                                    line ID and extension

InvoiceSelectionDestroyCache     - Terminate the Invoice Selection cache and free its associated 

memory

InvoiceSelectionWriteCache       - Write the specified invoice pay item to the Invoice Selection 

cache


Based on which function you are calling the following parameters will be required or optional. For 

more detail information see the function notes for the individual functions.




Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineIDI       Match Line ID number to define group of invoices
InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Required

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


RC5mnMatchLineExtensionI       Match Line Extension to define item in the Match Line 

ID

InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Optional

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DOCmnDocumentNumberI       Document Number of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DCTszDocumentTypeI       Document Type of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


KCOszDocumentCompanyI       Document Key Company of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


SFXszDocumentPayItemI       Pay Item of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


EV01cReturnStatusO '0' if the record was not found, '1' if the record was 

found.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnMatchLineIDMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnMatchLineExtensionRC5MATH_NUMERICNONENONE

This field is used to create a unique key within a file and should be used with a next number approach.

mnDocumentNumberDOCMATH_NUMERICNONENONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szDocumentCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szDocumentPayItemSFXcharNONENONE

A number that identifies the pay item for a voucher or an invoice. The system assigns the pay item number. If the voucher or invoice has 
multiple pay items, the numbers are sequential.

cReturnStatusEV01charNONENONE

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

F03B11 Customer Ledger
InvoiceSelectionDestroyCache

InvoiceSelectionDestroyCache

Maintain Invoice Selection Cache

Major Business Rule

Object Name: B03B0172

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to terminate the Invoice Selection cache and free its associated memory. Any 
records within the cache will be lost. The Invoice Selection cache is used by the Standard Receipts 

Entry (P03B102) and Draft Entry (P03B602) applications to track invoices that have been tagged for 

selection. This cache stores only the match line ID and extension and the invoice document number (DOC), type 

(DCT), company (KCO), and pay item (SFX). The records in the cache can be manipulated by one of two 

indexes: match line ID and extension (Invoice Selection by ID) or document number, type, company, and 

pay item (Invoice Selection by Document).


Setup Notes and Prerequisites

The Invoice Selection cache must exist before calling this function.


Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineID NMatch Line ID defines a group of selected Invoices
RC5mnMatchLineExtension NMatch Line Extension defines a individual record in 

the group

DOCmnDocumentNumber NDocument Number of the selected Invoice

DCTszDocumentType NDocument Type of the selected Invoice

KCOszDocumentCompany NDocument Key Company of the selected Invoice

SFXszDocumentPayItem NPay Item of the selected Invoice

EV01cReturnStatusO '0' if unsuccessful, '1' if successful.


Related Tables

None.


Related Functions

None.

Processing

Set cReturnStatus to '0'.

Destroy the Invoice Selection by ID cache.

Destroy the Invoice Selection by Document cache.

If successful,

Set cReturnStatus to '1'.



^

Data Structure

D03B0172 - Maintain Invoice Selection Cache

Purpose
This Data Structure is used by the following functions:

InvoiceSelectionCheckCache       - Check the Invoice Selection cache for the specified invoice pay 
item

InvoiceSelectionCreateCache      - Create the Invoice Selection cache

InvoiceSelectionDeleteByDocument - Delete the specified invoice pay item from the Invoice 

Selection cache

InvoiceSelectionDeleteByID       - Delete invoices from the Invoice Selection cache for the 

corresponding                                    line ID and extension

InvoiceSelectionDestroyCache     - Terminate the Invoice Selection cache and free its associated 

memory

InvoiceSelectionWriteCache       - Write the specified invoice pay item to the Invoice Selection 

cache


Based on which function you are calling the following parameters will be required or optional. For 

more detail information see the function notes for the individual functions.




Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineIDI       Match Line ID number to define group of invoices
InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Required

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


RC5mnMatchLineExtensionI       Match Line Extension to define item in the Match Line 

ID

InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Optional

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DOCmnDocumentNumberI       Document Number of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DCTszDocumentTypeI       Document Type of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


KCOszDocumentCompanyI       Document Key Company of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


SFXszDocumentPayItemI       Pay Item of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


EV01cReturnStatusO '0' if the record was not found, '1' if the record was 

found.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnMatchLineIDMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnMatchLineExtensionRC5MATH_NUMERICNONENONE

This field is used to create a unique key within a file and should be used with a next number approach.

mnDocumentNumberDOCMATH_NUMERICNONENONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szDocumentCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szDocumentPayItemSFXcharNONENONE

A number that identifies the pay item for a voucher or an invoice. The system assigns the pay item number. If the voucher or invoice has 
multiple pay items, the numbers are sequential.

cReturnStatusEV01charNONENONE

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

F03B11 Customer Ledger
InvoiceSelectionWriteCache

InvoiceSelectionWriteCache

Maintain Invoice Selection Cache

Major Business Rule

Object Name: B03B0172

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to add an invoice pay item to the Invoice Selection cache. The Invoice 

Selection cache is used by the Standard Receipts Entry (P03B102) and Draft Entry (P03B602) applications to 

track invoices that have been tagged for selection. This cache stores only the match line ID and 

extension and the invoice document number (DOC), type (DCT), company (KCO), and pay item (SFX). The records in 

the cache can be manipulated by one of two indexes: match line ID and extension (Invoice Selection by 

ID) or document number, type, company, and pay item (Invoice Selection by Document).


Setup Notes and Prerequisites

The Invoice Selection cache must exist before calling this function.


Special Logic

None.



Technical Specification


Parameters

Item DescriptionI/OReq?Notes
MATH01mnMatchLineIDIYMatch Line ID defines a group of selected Invoices

RC5mnMatchLineExtensionIYMatch Line Extension defines a individual record in 

the group

DOCmnDocumentNumberIYDocument Number of the selected Invoice

DCTszDocumentTypeIYDocument Type of the selected Invoice

KCOszDocumentCompanyIYDocument Key Company of the selected Invoice

SFXszDocumentPayItemIYPay Item of the selected Invoice

EV01cReturnStatusO '0' if unsuccessful, '1' if succesful.


Related Tables

F03B11Customer Ledger File


Related Functions

None.


Processing

Set cReturnStatus to '0'.

Validate required parameters.

Open F03B11 table.

Retrieve specified invoice from the F03B11 table.

Close F03B11 table.

Add the specified invoice to the Invoice Selection by ID cache.

Add the specified invoice to the Invoice Selection by Document cache.

If successful,

Set cReturnStatus to '1'.



Data Structure

D03B0172 - Maintain Invoice Selection Cache

Purpose
This Data Structure is used by the following functions:

InvoiceSelectionCheckCache       - Check the Invoice Selection cache for the specified invoice pay 
item

InvoiceSelectionCreateCache      - Create the Invoice Selection cache

InvoiceSelectionDeleteByDocument - Delete the specified invoice pay item from the Invoice 

Selection cache

InvoiceSelectionDeleteByID       - Delete invoices from the Invoice Selection cache for the 

corresponding                                    line ID and extension

InvoiceSelectionDestroyCache     - Terminate the Invoice Selection cache and free its associated 

memory

InvoiceSelectionWriteCache       - Write the specified invoice pay item to the Invoice Selection 

cache


Based on which function you are calling the following parameters will be required or optional. For 

more detail information see the function notes for the individual functions.




Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineIDI       Match Line ID number to define group of invoices
InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Required

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


RC5mnMatchLineExtensionI       Match Line Extension to define item in the Match Line 

ID

InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Optional

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DOCmnDocumentNumberI       Document Number of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DCTszDocumentTypeI       Document Type of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


KCOszDocumentCompanyI       Document Key Company of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


SFXszDocumentPayItemI       Pay Item of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


EV01cReturnStatusO '0' if the record was not found, '1' if the record was 

found.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnMatchLineIDMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnMatchLineExtensionRC5MATH_NUMERICNONENONE

This field is used to create a unique key within a file and should be used with a next number approach.

mnDocumentNumberDOCMATH_NUMERICNONENONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szDocumentCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szDocumentPayItemSFXcharNONENONE

A number that identifies the pay item for a voucher or an invoice. The system assigns the pay item number. If the voucher or invoice has 
multiple pay items, the numbers are sequential.

cReturnStatusEV01charNONENONE

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

F03B11 Customer Ledger
Set cReturnStatus equal to '1'.

Close both cursors.



^

Data Structure

D03B0172 - Maintain Invoice Selection Cache

Purpose
This Data Structure is used by the following functions:

InvoiceSelectionCheckCache       - Check the Invoice Selection cache for the specified invoice pay 
item

InvoiceSelectionCreateCache      - Create the Invoice Selection cache

InvoiceSelectionDeleteByDocument - Delete the specified invoice pay item from the Invoice 

Selection cache

InvoiceSelectionDeleteByID       - Delete invoices from the Invoice Selection cache for the 

corresponding                                    line ID and extension

InvoiceSelectionDestroyCache     - Terminate the Invoice Selection cache and free its associated 

memory

InvoiceSelectionWriteCache       - Write the specified invoice pay item to the Invoice Selection 

cache


Based on which function you are calling the following parameters will be required or optional. For 

more detail information see the function notes for the individual functions.




Parameters

Item DescriptionI/OReq?Notes

MATH01mnMatchLineIDI       Match Line ID number to define group of invoices
InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Required

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


RC5mnMatchLineExtensionI       Match Line Extension to define item in the Match Line 

ID

InvoiceSelectionCheckCache - Not used.
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Not Used

InvoiceSelectionDeleteByID - Optional

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DOCmnDocumentNumberI       Document Number of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


DCTszDocumentTypeI       Document Type of the Invoice

InvoiceSelectionCheckCache - Required
InvoiceSelectionCreateCache - Not Used

InvoiceSelectionDeleteByDocument - Required

InvoiceSelectionDeleteByID - Not Used

InvoiceSelectionDestroyCache - Not Used

InvoiceSelectionWriteCache - Required


KCOszDocumentCompanyI       Document Key Company of the Invoice