Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
Showing results for 
Search instead for 
Did you mean: 
Active Contributor

Hello SAP Finance Folks,


Hope everyone is doing fine and staying safe. As we recover from COVID-19 pandemic and start our routine life, I thought of sharing a very useful feature in SAP Financials which many of us might not be aware of.

Automatic clearing of customer open items is a mandatory part of month end closing process. In simple words, receipts from customer are cleared against the invoices by accountant manually using F-32 or any other clearing t code. This can become a tedious and very time-consuming activity especially when the volume of receipts and invoices are very high especially.

Taking example of past companies where I worked in, the clearing of more than hundred thousand receipt documents coming from various sources e.g., direct booking in SAP, uploading of receipts, payments made by customer using KIOSK was extremely time consuming. It was laborious task which used to take 3–4-man days to complete. We had to rely to custom automatic clearing which clears customer invoices and receipts based on FIFO approach and many other grouping criteria. It is important to note that timely clearing of customer open items is very important especially when it comes FINT (interest calculation on open A/R items)

The standard offering for automatic clearing by SAP is F.13 which enables clearing of open items of Customers, vendors and GL but it has got certain limitations.

Limitations of F.13:

  1. It does not allow clearing based on FIFO method i-e oldest invoices should be considered first for the clearing

  2. It does not allow partial clearing of the customer receipts against invoices e.g., Invoice value is 1000 USD and payment received is 650 USD, F.13 does not clear such receipts.

  3. F.13 is not exclusively for the customer clearing as it can be used for the supplier/GL clearing as well.

Given the above limitations in standard automatic clearing program, most of the companies have to rely on the custom programs to do the automatic clearing of customer receivables and their receipts which takes lots of efforts and time.

SAP has offered an automatic clearing program J3RCALD for customers which is a country specific functionality. With very little customization SAP consultants can enable J3RCALD execution.

J3RCALD can be found in below SAP Menu path.


This program has multitude of functions which can help companies perform automatic clearing of receivables against customer receipts.

What does J3RCALD offer?

  1. It offers First in first (FIFO) out based clearing of invoices against receipts. This means that invoice will oldest posting date will be cleared first against the receipt document. This feature will be explained in more details in the later part of this blog.

  2. J3RCALD program allows partial clearing of open items. A customer containing one invoice valuing 1000 USD and also a receipt of 700 USD. J3RCALD program will do the clearing for this customer and generate residual item line in customer ledger for remaining 300 USD.

  3. J3RCALD program offers a compact interface which is exclusively for customers and selection of customer open items is possible based on key date selection.

  4. Invoices of customers can be selected for a given range of posting/document date and currency selection is mandatory.

  5. Payments/collection from customer can be filtered by providing input dates for posting/document date.

  6. J3RCALD program also offers various ways of generating clearing document by letting you choose from various option like one invoice and one payment , multiple invoices and multiple payments (one clearing document will be generated of all) etc.

  7. You can also choose to clear open items which contains different control accounts using different GL Accounts only option

Solution Walkthrough:

Solution walkthrough includes configuration overview and detailed explanation of J3RCALD execution.


As I mentioned earlier, very minor configuration is needed to run this program. As a first step, following configuration is required to set the additional clearing rule in OB74. I have used VERTN (Contract number) to group customer open items. Many companies use ZUONR assignment number field to group customer open item, you can insert more than one clearing rule as needed.

OB74 Additional Clearing Rules


There is one more configuration which must be done to define sorting rules for the clearing of customer open items. As per SAP Note 2471260, settings need to be done in O7F6 for Account type D. The sort fields must contain below field in any order:

BUDAT (Posting date)

BLDAT (Document date)

BUZEI (Document item)

BELNR (Document number)

You can navigate as shown below to add above fields

O7F6 Sorting Rules IMG Path


O7F6 Configuration

In above screenshot it can be seen that sorting fields as required by SAP have been added.

Important Note:

With reference to above settings in OB74, please note that Invoice and Payment that are expected to be cleared should have the same values in the fields maintained in OB74 otherwise clearing would not happen. In the example to come, my postings for customer invoices and receipts are based on the Contract number field BSEG-VERTN.

We will take a practical example of a customer for which two contracts have been created and billing has been done for both. Looking at below screenshot, we can see that this customer has two contracts 11000002 and 1100003, these two contracts have Invoices and receipts posted against them.

FBL5N Overview

We will analyze open items of contract 11000002 as under

FBL5N Open Items Explained

J3RCALD Program:

Below screenshot contains J3RCALD input parameters which have been explained in detail.

J3RCALD Selection Screen

Second part of J3RCALD selection screen is explained as under

J3RCALD Second Section

J3RCALD Output:

System will now perform FIFO based clearing of Receipt 1400000007 by selecting Invoice number 7100000012. We will run the program in Test Mode and once we are satisfied with the clearing output; we will rerun program in Call transaction mode.

Call transaction program will post the clearing immediately, you can also opt to run as Batch Input , system will create a batch which can be processed in SM35.

J3RCALD Output

It is evident from above screenshot that J3RCALD has picked oldest invoice 7100000021 first since it was posted in January 2022, remaining two invoices were posted after January 2022. We will now run program in call transaction mode


J3RCALD Posting Run Selection

Following is the output after clearing posting is done. Clearing document was posted which has cleared oldest invoice in the customer ledger for the given contract against the oldest recorded receipt satisfying FIFO based requirement of customer open items clearing .

J3RCALD Posting Run Output

Partial Clearing:

We will now take an example of partial receipt against an invoice. 7100000025 is the oldest invoice for contract number 11000003 and customer 60000001. It has two open payments 1400000008 and 1400000009. 1400000009 is the oldest recorded receipt by posting date criteria.

We will choose option “One Invoice and One Payment”.  1400000009 receipt documents has value of 160,000 SAR.

FBL5N Partial Clearing Open Items Overview

We will now look at the output of J3RCALD in test mode.

J3RCALD Output -Partial Payment

J3RCALD program has picked up oldest invoice 7100000025 out of three available invoices and oldest receipt. It has also created a 20,000 SAR residual balance.

We will now execute program in call transaction mode.

J3RCALD Posting Output-Partial Clearing

J3RCALD has generated residual balance in customer ledger for 20,000 SAR after clearing invoice and payment.

Clearing Document FB03 View After Partial Clearing


J3RCALD program is a really useful program and can facilitate month end closing process in companies . It can ease the life of business users who spend hours in clearing customers open items.

There is always a room for improvement, please do let me know if you find any shortcomings in this piece of knowledge :).. I would appreciate your feedback on the document, which will help me to improve it further.

Important SAP Notes:

Following are some useful SAP notes pertaining to J3RCALD functionality.

2471260 - SAP RU-FI: J3RCALD does not clear open items according FIFO method

2971302 - J3RCALD CPS. Incorrect linking with residual items in selection.

2217847 - J3RCALD(K): error when clearing documents with big amount

Labels in this area