User Exit for the Cash Preprocessor logic needs to include the following:
1 Account AVIK-KONTO
2 Payment Amount AVIK-REWBTR
3 Payment Date AVIK-ZALDT
4 Bank Number AVIK-ZBNKL
5 Payee Acct No AVIK-ZBNKN
6 *Check Number AVIK-CHECT
22 Adv Header Text AVIK-AVTXT
7 Payment Amount AVIP-NEBTR
8 Deduction Amount AVIP-ABBTR
9 Gross Amount AVIP-WRBTR
10 Reason Code AVIP-RSTGN
11 Discount Amount AVIP-WSKTO
12 Document Number AVIP-BELNR
13 Reference AVIP-XBLNR
14 Reference Key 1 AVIP-XREF1
15 Reference Key 2 AVIP-XREF2
16 PO Number AVIP-BSTNK
17 Assignment AVIP-ZUONR
18 Alternative Acct AVIP-ABWKO
19 Text AVIP- SGTXT
20 Customer AVIP-KONTO
21 Payment Reference AVIP-KIDNO
For Like reference numbers(AVIP-XBLNR) combine the following amounts
o Payment Amount (AVIP-NEBTR), Deduction Amount (AVIP-ABBTR), Gross Amount (AVIP-WRBTR), Discount Amount (AVIP-WSKTO)
Populate the Payment Advice
Loop Through All Checks Until Finished *****
Loop Get Next Check (from AVIK table)
Use the Bank Number (AVIK-ZBNKL) and Payee Acct No fields (AVIK-ZBNKN) from the Payment Advice Header (AVIK) to identify the Payer
o If one and only one Payer is returned
 Consider the Payer found
 Populate the Account Number (AVIK-KONTO) on the Payment Advice
 Populate Payment Advice Header Text (AVIK-AVTXT) with Payer Found Via MICR #
 Continue with Loop Get First Check Line Item
Else if No Payer Returned or Multiple Payers Returned
Loop through Document Numbers (AVIP-BELNR) supplied in the payment details to identify the Payer
o Consider only positive payment amounts
Search the BSID table for the open item using the Document Number (AVIP-BELNR) and company code US39
 If only one Document is Returned
Consider the Payer found
Assign the Account Number (AVIK-KONTO) on the Payment Advice
Populate Payment Advice Header Text (AVIK-AVTXT) with Payer Found Via Document #
Continue with Loop Get First Check Line Item
 Else Multiple Returns or None Returned
Consider the Check Unidentified
Update the Account Number (AVIK-KONTO) on the Payment Advice with a *
Populate Payment Advice Header Text (AVIK-AVTXT) with Payer Not Found
If Another Check Exists
o Go To Loop Get Next Check
Else
o Processing Complete
Endif
 Endif
o Endif
Inside Each Check, Loop Through All Check Lines *****
o Loop Get First Check Line Item
o Assign AVIP-XBLNR to AVIP-ZUONR Assignment
o Assign AVIP-XBLNR to AVIP-XREF2Ref Key 2
Logic for Non-Invoice Related Deductions *****
o If Payment Amount (AVIP-NEBTR) is < 0 (deduction)
 Move Payment Amount (AVIP-NEBTR) to Deduction Amount (AVIP-ABBTR) column
 Check to see if Deduction Amount (AVIP-ABBTR) <= Cash Tolerance
 For Cash Tolerance consider Company Code and Payer (AVIK-KONTO) and execute transaction XD03. Then go into the Company Code Data View to get the Tolerance Group (KNB1-TOGRU)
 Go to OBA3 to search the Company Code and Tolerance Group (KNB1-TOGRU) for the Tolerance Amount
 If Deduction Amount (AVIP-ABBTR) <= V_T043G-BETRS (Ref B)
Assign Z98 to Deduction Reason Code (AVIP-RSTGN)
Populate Payment Advice Text (AVIP-SGTXT) (AVIP- SGTXT) with Small Balance Write-off
 Else
Assign Z00 Unexplained Deduction to the Deduction Reason Code (AVIP-RSTGN)
Populate Payment Advice Text (AVIP-SGTXT) (AVIP- SGTXT) with Non-Invoice Related Deduction
If Another Check Line exists
o Loop Get Next Check Line Item
Else
o Go To Loop Get Next Check until all checks have been processed
Endif
 Endif
o Endif
Logic for Invoice Related Payments *****
o If Payment Amount (AVIP-NEBTR) > 0 (payment)
o Use the Document Number (AVIP-BELNR) Company Code provided to locate the open item in BSID
o Capture list of Alt Payers (BSID-KUNNR) using transaction XD03 with Payer (AVIK-KONTO) and Company Code US39
o Execute SE16 on table BSID for Company Code US39, Customer (BSID-KUNNR) and Document Number (AVIP-BELNR)
o If one and only one document number can be found using a wild card search ####### for the Payer or Alt Payer group
 Move the Payer to into the Alternative Acct Field AVIP-ABWKO
 Move BSID Amount into AVIP-WRBTR Move the BSID Document Number into AVIP-BELNR
 Go to Document Number Found
o Else if Document Number Not Found
 Execute SE16 on table BSID for Company Code US39, Customer (BSID-KUNNR) and Reference Number (AVIP-XBLNR)
 Perform wild card search ######## on the Reference Number (AVIP-XBLNR)
If one and only one Reference Number is returned
o Move the Payer to into the Alternative Acct AVIP-ABWKO
o Move BSID Amount into AVIP-WRBTR
o Move the BSID Document Number into AVIP-BELNR
o Go to Document Number Found
Else
o Place an * in the first position of the Document Number (AVIP-BELNR
o Populate Payment Advice Text (AVIP-SGTXT) (AVIP- SGTXT) with Invoice Not Found
o Loop Through All Check Lines until all items are processed
Endif
 Endif
o Endif