SAP Knowledge Base Article - Public

3147360 - Automatic and GR/IR Clearing Process in S/4HANA Cloud


How is Automatic Clearing Process, including GR/IR Clearing working in S/4HANA Cloud?

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.




System logic:

The automatic clearing program works based on the user criteria defined in SSCUI 101971 (Manage Your Solution - Configure Your Solution - Finance - General Settings - Prepare Automatic Clearing) and also according to fixed system criteria. Special case is the GR/IR account clearing.

In SSCUI 101971 by default Assignment (ZUONR) and Trading Partner (VBUND) fields are set as grouping criteria for account type 'S'. (It can be enhanced with maximum 5 other criteria from the dropdown list).

SSCUI 101971

The program selects open items, groups them according to criteria and then clears them when the balance of one of the groups is zero.


System try to group the open items based on the clearing criteria defined in SSCUI 101971.


The program looks for every single item in the group whether there is one item with the same amount or some items that balance to the amount of this single item.


The program tries to build a subgroup of items that can be cleared.


GR/IR Account Clearing:


According to SAP Best Practices Explorer 'Post automatically only flag' is set for GR/IR Accounts in G/L Account Master Data. Therefore no manual clearing is possible for these accounts.


I. To execute automatic clearing use 'Automatic Clearing' Job in app 'Schedule General Ledger Jobs' or enter app 'Clear Open Items Automatically'.

Under Parameters you can find the flag 'GR/IR Special Process'.

There are two possible options:

  1. Leave 'GR/IR Special Process' empty and enter the GR/IR account number under "Select G/L Accounts". In this case the grouping criteria is done based on the settings in SSCUI 101971.


 2. Check 'GR/IR Special Process' and enter the GR/IR account number under "Select G/L Accounts". In this case - independently of the settings in SSCUI 101971 - the hard coded         criteria are the followings:

  • Purchase Order Number (EBELN)
  • Purchase Order Item (EBELP)
  • Business Area (GSBER)
  • Reference 3 (XREF3)

If the balance of one of the groups is NOT zero, the GR/IR line items cannot be cleared.


II. Use 'GR/IR Automatic Clearing' Job in app 'Schedule General Ledger Jobs'

It only works if extended open item management is activated for the GR/IR Account. The job creates a group of open items that can be cleared based on the sort key of the GR/IR

clearing account, for example, grouped by purchase order and purchase order item.


Additional hint:

This indicator does not mean that it always has to be set for the clearing of GR/IR accounts. Generally, you can avoid setting the "GR/IR Special Process" indicator. By doing so, you can prevent several grouping problems with the automatic clearing of the GR/IR account.

Check whether the items of the GR/IR account can also be cleared without special processing.

  • If the GR/IR account has sort key 014 (purchase order) set in GL master then only the field Assignment (ZUONR) has to be added in SSCUI 101571 as grouping criterion.
  • For other sort keys set Purchase Order (EBELN) and Purchase Order Item (EBELP) as grouping criteria in SSCUI 101971.


First start the programs in TEST run!

See Also

Automatic Clearing

GR/IR Automatic Clearing With Extended Open Item Management

Schedule General Ledger Jobs


GR/IR, GR/IR clearing, WRX, Schedule General Ledger Jobs, Automatic Clearing, F.13, SAPF124, Clear Open Items Automatically, GR/IR Special Process, GR/IR account special processing, SSCUI 101571, OB74, EBELN, EBELP, ZUONR, VBUND, purchase order, Post automatically only, F1927, F1 927, Goods receipt/Invoice receipt , KBA , FI-GL-GL-A , Posting/Clearing , How To


SAP S/4HANA Cloud 2108