0% found this document useful (0 votes)
383 views

PDF Automate Posting With Clearing F 28 fb05 - Compress

The document describes the steps to automate customer clearing and posting of multiple payments against multiple invoices using function modules in SAP. It involves having the necessary payment and invoice details ready, then calling the POSTING_INTERFACE_START, POSTING_INTERFACE_CLEARING and POSTING_INTERFACE_END function modules. The POSTING_INTERFACE_CLEARING module requires populating internal tables with the clearing documents and posting document details before processing can begin.

Uploaded by

Ganesh Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
383 views

PDF Automate Posting With Clearing F 28 fb05 - Compress

The document describes the steps to automate customer clearing and posting of multiple payments against multiple invoices using function modules in SAP. It involves having the necessary payment and invoice details ready, then calling the POSTING_INTERFACE_START, POSTING_INTERFACE_CLEARING and POSTING_INTERFACE_END function modules. The POSTING_INTERFACE_CLEARING module requires populating internal tables with the clearing documents and posting document details before processing can begin.

Uploaded by

Ganesh Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Contents

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.
Basics steps to follow
•Have amounts ready for posting
•Call FM POSTING_INTERFACE_START to initiate
•Then call FM POSTING_INTERFACE_CLEARING to post
•Finally call FM POSTING_INTERFACE_END to complete
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
Bank Charges
Charge 1 $50
$450
$450
Accounting Document Entry
Posting Account Amount Entry
15 Customer -450 Customer Credit
15 Customer -450 Customer Credit
40 Bank 850 GL Debit
40 Bank 50 GL Debit

Steps to follow
Have the values ready for posting
•Company Code
•Document Date
•Posting Date
•Document Currency
•Document type
•Reference number for the accounting document
•Customer number
•Customer invoice document numbers to be cleared
•Bank account number and the amount
•Bank service charge account and the amount
Call the function module POSTING_INTERFACE_START
Call the FM with below parameters

Call the function module POSTING_INTERFACE_CLEARING


If POSTING_INTERFACE_START is successful, then start processing this function module.
Supply below importing parameters
i_auglv = 'EINGZAHL' “Incoming payment
i_tcode = 'FB05' “Transaction
i_sgfunct = 'C'
Supply below values Populate internal tables for the function module
D T_FTCLEAR : Clearing document details ( Invoices to be cleared )
FTCLEAR-AGKON = CUSTOMER. “CUSTOMER NUMBER
FTCLEAR-AGBUK = COMPANY_CODE. “COMPANY CODE
FTCLEAR-XNOPS = ‘X’. “CONSTANT VALUE ‘X’ FTCLEAR-SELFD
= ‘BELNR’. “INVOICE NO FIELD 'BELNR'
FTCLEAR-SELVON = INV_NUMBER. “INVOICE NUMBER
FTCLEAR-SELBIS = INV_NUMBER. “INVOICE NUMBER
Insert a record for each invoice to the T_FTCLEAR table.
The internal table will look like this.

D T_FTPOST : Posting document details ( Header and Items )


o Populate the accounting document header
lwa_ftpost-stype = ‘K’. “Header entry indicator
lwa_ftpost-count = ‘001’.
lwa_ftpost-fnam = 'BKPF-BUKRS'. “Company code field
lwa_ftpost-fval = company_code. "Company code value
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’. “Header entry indicator
lwa_ftpost-count = ‘001’.
lwa_ftpost-fnam = 'BKPF-BLDAT'. “Document date field
lwa_ftpost-fval = document_date "Document date value
APPEND lwa_ftpost TO li_ftpost.
lwa_ftpost-stype = ‘K’. “Header entry indicator
lwa_ftpost-count = ‘001’.
lwa_ftpost-fnam = 'BKPF-WAERS'. “Document currency field
lwa_ftpost-fval = doc_currency "Document currency value
APPEND lwa_ftpost TO li_ftpost.
lwa_ftpost-stype = ‘K’. “Header entry indicator
lwa_ftpost-count = ‘001’.
lwa_ftpost-fnam = 'BKPF-BLART'. “Document type field
lwa_ftpost-fval = document_type "Document type value
APPEND lwa_ftpost TO li_ftpost.
lwa_ftpost-stype = ‘K’. “Header entry indicator
lwa_ftpost-count = ‘001’.
lwa_ftpost-fnam = 'BKPF-XBLNR'. “Reference number field
lwa_ftpost-fval = ref_number "Reference number value
APPEND lwa_ftpost TO li_ftpost.
o Populate accounting document item details
Bank debit entry – Posting Key
lwa_ftpost-stype = ‘P’. “Item entry indicator
lwa_ftpost-count = lwa_ftpost-count. lwa_ftpost-fnam
= ‘RF05A-NEWBS’.
lwa_ftpost-fval = ‘40’. "Posting Key of Bank account line
APPEND lwa_ftpost TO li_ftpost.
Bank debit entry – Account Number
lwa_ftpost-stype = ‘P’. “Item entry indicator
lwa_ftpost-count = lwa_ftpost-count. lwa_ftpost-fnam
= ‘RF05A-NEWKO’.
lwa_ftpost-fval = bank_account. "Bank account value
APPEND lwa_ftpost TO li_ftpost.
Bank debit entry – Amount
lwa_ftpost-stype = ‘P’. “Item entry indicator
lwa_ftpost-count = lwa_ftpost-count.
lwa_ftpost-fnam = ‘BSEG-WRBTR’.
lwa_ftpost-fval = bank_amount. "Bank debit amount
APPEND lwa_ftpost TO li_ftpost.
Bank debit entry – Profit Center
lwa_ftpost-stype = ‘P’. “Item entry indicator
lwa_ftpost-count = lwa_ftpost-count.
lwa_ftpost-fnam = ‘COBL-PRCTR’.
lwa_ftpost-fval = profit_center. "Profit center value APPEND
lwa_ftpost TO li_ftpost.
Increment the count value for the next entry.
lwa_ftpost-count = lwa_ftpost-count +1.
Bank service charge debit entry – Posting Key
lwa_ftpost-stype = ‘P’. “Item entry indicator
lwa_ftpost-count = lwa_ftpost-count.
lwa_ftpost-fnam = ‘RF05A-NEWBS’.
omer clearing process (Posting with

icult to process and post them

arges, service charges, etc. match in

BDC recorded using FB05.


essing this function module.

You might also like