Documente Academic
Documente Profesional
Documente Cultură
Introduction ............................................................................................................................................. 2
Basics steps to follow ............................................................................................................................... 2
Example................................................................................................................................................ 2
Steps to follow...................................................................................................................................... 3
Have the values ready for posting..................................................................................................... 3
Call the function module POSTING_INTERFACE_START ..................................................................... 3
Call the function module POSTING_INTERFACE_CLEARING ............................................................... 3
Call the function module POSTING_INTERFACE_END ........................................................................ 7
Posted Document ............................................................................................................................. 8
Introduction
There are business requirements where you need to automate customer clearing process (Posting with
Clearing)
Transactions being used;
F-28
FB05
When there are large number of customer payments, it is very difficult to process and post them
manually. By automating this process, users can minimize data entry errors too.
It is important that the payment amounts, invoice amount, bank charges, service charges, etc. match in
order to do successful posting.
The function module that used to accomplish this task actually a BDC recorded using FB05.
Example
Customer pays 2 payments (multiple payments) for 3 invoices (multiple invoices).
Bank deducts bank charges.
Customer Invoices
Inv 123
$200
Inv 234
$300
Inv 456
$400
Customer Payment
Payment 1
Payment 2
Account
Amount
Entry
15 Customer
15 Customer
40 Bank Account
40 Bank charge Acc
850 GL Debit
50 GL Debit
$450
$450
Bank Charges
Charge 1
$50
Steps to follow
Have the values ready for posting
Company Code
Document Date
Posting Date
Document Currency
Document type
= 'EINGZAHL'
= 'FB05'
= 'C'
Incoming payment
Transaction
Supply below values Populate internal tables for the function module
T_FTCLEAR : Clearing document details ( Invoices to be cleared )
FTCLEAR-AGKON
= CUSTOMER.
CUSTOMER NUMBER
FTCLEAR-AGBUK
FTCLEAR-XNOPS
= BELNR.
FTCLEAR-SELVON
= COMPANY_CODE.
= X.
FTCLEAR-SELBIS
= INV_NUMBER.
= INV_NUMBER.
COMPANY CODE
CONSTANT VALUE X FTCLEAR-SELFD
INVOICE NO FIELD 'BELNR'
INVOICE NUMBER
INVOICE NUMBER
lwa_ftpost-stype
= K.
lwa_ftpost-count
= 001.
lwa_ftpost-fnam
= 'BKPF-BUKRS'.
lwa_ftpost-fval
= company_code.
APPEND lwa_ftpost TO li_ftpost.
Since this FM runs through a BDC, dates have to be in the format of the user profile.
lwa_ftpost-stype
= K.
lwa_ftpost-count
= 001.
lwa_ftpost-fnam
= 'BKPF-BLDAT'.
lwa_ftpost-fval
= document_date
APPEND lwa_ftpost TO li_ftpost.
lwa_ftpost-stype
lwa_ftpost-count
lwa_ftpost-fnam
= K.
= 001.
= 'BKPF-WAERS'.
lwa_ftpost-fval
= doc_currency
APPEND lwa_ftpost TO li_ftpost.
lwa_ftpost-stype
= K.
lwa_ftpost-count
= 001.
lwa_ftpost-fnam
= 'BKPF-BLART'.
lwa_ftpost-fval
= document_type
APPEND lwa_ftpost TO li_ftpost.
lwa_ftpost-stype
lwa_ftpost-count
= K.
= 001.
lwa_ftpost-fnam
= 'BKPF-XBLNR'.
lwa_ftpost-fval
= ref_number
APPEND lwa_ftpost TO li_ftpost.
= P.
Item entry
= lwa_ftpost-count.
lwa_ftpost-fnam
= RF05A-NEWBS.
indicator
lwa_ftpost-fval
= 40.
lwa_ftpost TO li_ftpost.
"Posting Key
APPEND
Customer credit entry will be automatically inserted by the SAP standard process and the
amount will be the total of invoices provided in the T_FTCLEAR table. (See the above
step populating T_FTCLEAR table).
The total of invoices should match the bank debit amount + bank charges.
Once POSTING_INTERFACE_CLEARING is successful, call this function module to complete the processing
Posted Document
After a successful posting, the accounting document will look like this.
You can add your own entries based on your requirement as well. (I.e. Customer chargeback)
Disclaimer
This article is done based on my research and readings, unless otherwise stated. The views expressed are
my own and not of anyone else.
Author accepts no liability for the content of the articles in this website or for the consequences of any
actions taken on the basis of the information provided. Using this information is at the users own
discretion and responsibility.