Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
raga6600
Explorer

LOCKBOX ENHANCEMENT

The standard SAP lockbox processing program uses

MICR# (Bank Key and Bank account) and invoice numbers included in bank lockbox
file to apply and clear open AR items from customer accounts. There are cases
where the detailed remittance information is not available in the lockbox file.
This enhancement is to build additional algorithms to search invoices and apply
cash. The following additional algorithms are needed to improve invoice
matching:

Process Flow:

Standard SAP provides two Function exits EXIT_RFEBLB20_001 & EXIT_RFEBLB20_002.

The Parameters for the function exit EXIT_RFEBLB20_001 are.

The import parameter I_AVIK contains the Payment Advice Header details from file.

The export parameter (E_AVIK) contains the manipulated values which need to be
updated in the Payment advice header table (AVIK).

The table parameter will have the following tables.

 

The Parameters for the function exit EXIT_RFEBLB20_002 are.

Import Parameters:

Export Parameters:

The logic for calculating the total amount is written in the function exit EXIT_RFEBLB20_001.

The following are the important scenarios in Lockbox.

 

1) Payment advice header details (I_AVIK) are available and Payment Advice Line Item
details (I_AVIP) are not available.

For the above scenario fetch all the open items form BSID table by passing the Company
code (I_AVIK-BUKRS), Account number (I_AVIK-KONTO) and last date of previous
month.

Calculate the due date and delete the records where Baseline Date for Due Date Calculation
is less than last date of current month.

Calculate the total amount by Cumulating the Amount in document currency (BSID-WRBTR)
which is fetched from BSID table.

 

If the total amount is equal to the check amount (I_AVIK-RWBTR) then,

Move all line items with the corresponding fields from BSID to the table parameter
T_AVIP.

2) Payment advice header details (I_AVIK) are available and Payment Advice Line Item
details (I_AVIP) are available.

For the above scenario fetch all the open items form BSID table by passing the Company
code (I_AVIK-BUKRS), Account number (I_AVIK-KONTO) and Reference Document
Number (T_AVIP-XBLNR) for all the entries in T_AVIP table.

Check whether all the line items in T_AVIP table have a corresponding line item in
BSID.

If Net Payment Amount (NEBTR) in the table T_AVIP contains value then, calculate the
total amount by Cumulating the Net Payment Amount (T_AVIP-NEBTR).

Else calculate the total amount by Cumulating the Amount in document currency
(BSID-WRBTR) which is fetched from BSID table.

If the total amount is greater than the check amount (I_AVIK-RWBTR) then it is
“Under-Payment”. Insert a line in T_AVIP with the difference of check amount
(I_AVIK-RWBTR) from the total amount.

If the total amount is lesser than the check amount (I_AVIK-RWBTR) then it is
“Over-Payment”. Insert a line in T_AVIP with the difference amount of total
amount from check amount (I_AVIK-RWBTR).