Configuring Clearing Control

Objective

After completing this lesson, you will be able to configure a clearing strategy

Clearing Variant Overview

Diagram illustrating 1-n clearing steps with open item group forming, processing, and subsequent processing stages. The process includes sorting, amount-dependent grouping, customer-specific rules, and specifications for further allocation and partial clearing handling.

Clearing variants contain several steps. The individual steps control the selection, grouping, sorting, and amount-dependent assignment of the open items for clearing.

The steps are executed in number sequence, although you can also call them up directly according to each clearing rule.

The steps inherit the clearing proposal and the remaining amount from the previous steps.

Items that are completely cleared in a clearing step are not included in subsequent steps.

A table titled TFK116 displays the definition of grouping and sorting characteristics including company code, main transaction, and due date with respective field names and derivation modules. Explanatory text on the right side defines original and derived characteristics.

Characteristics describe a specific feature of an open item (for example, whether the item is a payment on account or due) or the occurrence of a certain event (for example, a document number is specified on payment).

Characteristics are used as follows:

  • Group open items

    Open items that have identical characteristic values are grouped into one clearing step and processed as one unit (for example, all items that belong to the same company code).

  • Filter open items

    Open items that are to be processed in a clearing step have to be specified (for example, only those due or only those in company code 0001).

  • Sort open items and groups

    Sorting determines the sequence of the groups themselves and the sequence of the assignments of the open items within the group.

  • Switch

    Defines the condition that states whether a clearing step should be executed at all (for example, only carry out the step if a document number is specified on payment).

IMG: Transaction SPRO.

Financial Accounting (New)Contract Account Receivable and PayableBasic FunctionsOpen Item ManagementClearing ControlClearing VariantsDefine Clearing Variants.

Mark Variant 014, and select in the dialog structure on left-hand side Clearing steps.

A flowchart detailing the steps for selecting, grouping, sorting, and amount-dependent allocation of items for incoming payments, featuring three main sections: grouping, sorting, and amount rule. The rules are processed in a specific order, starting from grouping items, sorting groups and items, applying amount rules, and finally using clearing rules.

Up to five grouping characteristics can be defined in a grouping string. The characteristics are connected with a logical AND.

You can also define a grouping rule for each grouping characteristic. Depending on each rule, you can define an alternative characteristic value for the individual values of a characteristic. For example, combine two attributes of a characteristic into one group (company code 0001 = company code 0002), exclude certain characteristic values (from the clearing analysis in the current clearing step or in general), or restrict the clearing analysis to certain values (such as company code 0001 only).

The sorting string controls the processing sequence of individual item groups, as well as the sequence in which the open items are cleared within a group.

From a technical point of view, the groups are sorted according to the smallest value in their sorting string. For example, if items are grouped according to company code and sorted according to due date, the group with the oldest due date is placed first in the sequence.

If no partial clearing proposal has been made, you may wish to stop the clearing program: enter value 1 in the End of Assignment field.

Clearing Variant Examples

The image explains the concept of characteristic 001, Company Code, and its direct transfer from the field BUKRS. It includes a table with example data and illustrations of grouping and sorting characteristics.

Open items that have identical characteristic values are grouped into one clearing step and processed as one unit (for example, all items that belong to the same company code).

Grouping characteristics can be attributes in the FKKOP table.

Grouping characteristics can be specifically derived in a function module as well.

Diagram illustrates how characteristic 010 (Due Date) is defined, transferred, and used to sort items in a data table. The characteristic value is directly transferred from the FAEDN field and sorted accordingly.

Sorting determines the sequence of the groups themselves and the sequence of the assignments of the open items within the group.

Sorting is generally used when a company is unsure how a payer will group payments and, therefore, uses custom priorities to clear items. For example, the company may wish to clear open items of a certain revenue type before any additional charges and interest.

The image illustrates how Characteristic 024, which considers the deferral date for due dates, is defined and used in sorting open items. It shows a table of characteristics and a sorting example based on Characteristic 024, referencing the function module FSC_SAMPLE_TFK116.
An instructional diagram about the characteristic 011 Item Is Due filter, showing item grouping and sorting characteristics in a table format with corresponding values and an example of grouped OIs by characteristic 011. It includes field names, derivation functions, and a sample conditional code block.
A diagram explaining the process of clearing items within a company code using grouping rules and alternative groupings for characteristic values. It shows the interaction between tables T_CL and VC_TFK115, with Group Formation resulting in the grouping of items into two groups.

You can use the grouping rules to influence the grouping string and, therefore, the grouping.

The following grouping rules are available:

  • _ – Group definition according to the characteristic value.

  • 1 – Group definition to use if you want to combine several groups into a single group.

    Any characteristic values that cannot be grouped can be allocated to a separate group based on the characteristic value. For example, you are grouping by product group and there are three possible values. Product groups 1 and 2 are grouped using an alternative grouping and form one group. Product group 3 forms the second grouping.

  • 2 – Group definition similar to 1 except that any non-specified values for the characteristic all contain the value SPACE and are therefore grouped into one additional group. This is used to exclude certain groups.

  • 3 – Group definition where any values for the characteristic not specified in the grouping rule will not be considered for payment.

You can enter an alternative grouping by choosing the Alternative Grouping button on the right of the grouping rule after you have confirmed the rule with Enter.

Sorting example shows clearing sorted by due date with priority given to items of company code 0002. Different sorting strings and the effect on the sorted output are illustrated.

For most characteristics, sorting them according to their values does not lead to the desired results. For example, if you want to clear charges first (STAKZ = G), you cannot achieve this simply by sorting the characteristic values by statistics key. To get the result you want, you can define a ranking order rule for each characteristic. Depending on this rule, you can sort a specific characteristic value so that it appears at the start or the end of the table.

The following sorting rules are available:

  • _ – Sort by the value of the characteristic (for example, due date).

  • 1 – Sort by value ranking first and then by the value of the characteristic.

    Not all values must be specified explicitly. For example, if there are four values 1, 2, 3, 4, priority 1 is assigned to value 4, and the remaining values are not ranked. The result of sorting will then be that values 1 and 4 (same rank) are allocated first, followed by 2 and 3.

  • 2 – Unranked values have priority and the others are handled in ranked order (1, 2, 3, 4).

  • 3 – Unranked values have the lowest priority (after all other ranked values) (4, 1, 2, 3).

You can enter an alternative sorting by choosing the Alternative Sorting button on the right of the sorting rule after you have confirmed the rule with Enter.

Two sections titled Amount Rules and Clearing Rules with related examples. Amount Rules explain conditions for assigning amounts to item groups, while Clearing Rules describe how to clear items in a group.

The following amount rules are available:

  • _ – No amount restriction (only use when not using a grouping).

  • 0 – Clear only when amounts are equal.

  • 1 – No partial clearing allowed, but overpayment is permitted.

  • 2 – No overpayment allowed, but partial clearing is permitted.

  • 3 – Maximum amount difference according to tolerance group. Post tolerance.

  • 4 – Maximum amount difference according to amount check group.

Partial clearing takes place (difference is not written off when using a tolerance group). If the difference between the payment amount and open item amount is greater than this amount, the payment will be posted on account. Amounts specified here are not added to tolerance group amounts.

With clearing rule 1, the system makes proportional payments.

For example, a payment of 90 is made to two open items with 100 and 50: (100/150)*90. This means that a payment of 60 is made to the item with 100 and a payment of 30 is made to the item with 50.

Diagram showing the process of joint clearing with labeled arrows connecting Credit or Payment, Receivable, and Clearing Payment/Receivable. The Amount Check Group includes Currency, Amount from/to, Limit absolute, and Limit percentage.

Amount check groups are used in a clearing step to define amount-dependent conditions.

Amount check groups are used within a group of open items in the following way:

  • In the case of incoming payments, the difference between the available payment amount and the total balance of open items in a group that have already been posted undergoes the amount check.

  • For all other business transactions, the difference between the total credit items and the total receivable items undergoes the standard check.

Amount check groups allow you to specify differentiated amount variances within which a clearing is permitted.

Amount check groups should not have the same functionality as the tolerance group defined in the contract account. It only has to specify whether a clearing takes place or not. The amount differences that were calculated from the payment and item allocation, in accordance with the information in the amount check group, are not implicitly written off. Instead, they can be written off, cleared, or posted on account depending on the additional specifications in the clearing step.

Amount check groups are defined according to currency.

A table under clearing type shows details of clearing categories, transactions, and intervals. A flowchart underneath funnels data to either clearing open items or no clearing.

In the selection criteria, you can specify, for every clearing type, which item is to be included in the clearing analysis based on transaction and due date. You can use clearing category, main transaction, andsub transaction to specify whether an item is to be included and, if so, within which due date interval.

The restrictions are interpreted in four steps: starting with the specified clearing category, main transaction, subtransaction and finishing with an unspecified entry. Normally, the level found first is used. If the system cannot determine any selection restrictions for open items, the items are considered to be unfiltered in the clearing analysis.

The selection criteria can be used to exclude items with specific main transactions and sub transactions, or to define how many days into the future the system should look for open items for possible clearing (Grace Days column). If you select the NC indicator, the items of the corresponding main transaction and subtransaction are excluded from the clearing analysis. You can also exclude items from clearing in the corresponding clearing step.

Statistical items can be written off automatically in several ways when posting a payment to an account with statistical postings on it.

In the Control data: payment on account folder, you can define rules for posting on account. For example, it could be set that any amount over X will be posted directly to the clarification (interim) account and not posted on account (payment lot status would be not posted).

Program enhancements allow for the use of two function modules: one for the selection of open items, and the other for how statistical items should be written off.

A diagram explains how to clear items sorted by due date, showing a grouping and sorting string setup and a table example of items being cleared. The table contains columns for Doc., Division, MainTr, SubTr, Due Date, and Amount, with resulting clearing and open amounts illustrated.

Since no characteristics have been entered, 4710, 4711 and 4712 form a group.

Within the group, the items are sorted according to their due dates.

The invoice credit of 30.00 is calculated step-by-step, as follows:

  1. First, the invoice request of 10.00 from September 15 is cleared.

  2. The remaining credit of 20.00 is cleared using the budget billing request of December 5.

  3. The budget billing request remains open at 40.00.

Example scenario 2 shows the clearing of all items sorted by due date using the VC_TFK115 clearing variant. The example table displays open and cleared amounts, emphasizing the impact of incorrect grouping on undesirable clearing results.

Since no characteristics have been entered, 4709, 4710, 4711, and 4712 form a group.

Within the group, the items are sorted according their due dates.

The clearing algorithm produces the following processing steps:

  • The payment on account of 20.00 is used to clear the invoice request of September 15.

  • This is cleared completely using the invoice credit from November 15.

  • The remaining credit of 25.00 means that the invoice request for the gas division (dated November 15) is partially cleared.

  • The budget billing repayment request of 10.00 is cleared against the remaining invoice request for the gas division dated November 15.

  • The outstanding receivable from invoice 4711 is 65.00.

A diagram illustrates a two-step clearing process for financial transactions, showing the document and due dates used for grouping and sorting. Tables display initial amounts and the respective cleared and open balances for each step.

Clearing step 1 leads to the following processing steps:

Document number and due date are specified as characteristics with the result that the following groups are created:

  • Group 1: Open item document 4709

  • Group 2: Open item document 4711

  • Group 3: Open item document 4710

  • Group 4: Open item document 4712 with due date December 5

  • Group 5: Open item document 4712 with due date January 5

The following clearing steps take place:

  • In groups 1, 2 and/or 5, no clearing takes place.

  • In group 3, the credit of 30.00 from the electricity division is cleared against the gas receivable of 100.00, which leaves an outstanding receivable of 70.00.

  • In group 4, the budget billing requests from December 5 are balanced so that a budget billing amount of 140.00 is due on December 5.

Clearing step 1 leads to the following results:

  • No further characteristics have been specified. All items still open are grouped together.

  • The payment on account of 20.00 is cleared with the oldest open invoice.

  • The receivable of 5.00 is still outstanding.

IMG: Transaction SPRO.

Financial Accounting (New)Contract Account Receivable and PayableBasic FunctionsOpen Item ManagementClearing ControlClearing VariantsDefine Clearing Variants.

Mark Variant 014, and select in the dialog structure on left-hand side Clearing steps.

A screenshot demonstrating a payment clearing scenario in a financial system, with various grouping and sorting rules, an example of document and amount entries, and explanations of grouping and payment rules. It shows that a customer wants to pay an invoice and outlines how different amounts and document combinations are managed and checked.

The additional grouping according to due date is necessary because the due dates of a budget billing plan or installment plan have the same number. The clearing consideration should usually take place at the level of the individual due dates.

For example, the customer wants to pay invoice 4709. The customer can pay the full amount of 25.00 or the remaining amount of 5.00 after withholding the credit of 20.00 (document 4710).

Configure a Clearing Strategy

Business Example

You want to configure a clearing strategy for incoming payments:

  • Items with specific main and sub transactions have to be cleared with a higher priority.

  • Items with other main and sub transactions have to be cleared with a lower priority.

Note

In this exercise, the value ## should be replaced with your group number.

Task 1: Prepare the Test of a New Clearing Strategy

Steps

  1. Start the SAP Fiori Display Account Balance app (transaction FPL9).

    1. Choose the Information tile group.

    2. Choose the Display Account Balance tile.

  2. Display the account of business partner ac240-##e using the following data:

    Initial Data

    FieldValue
    Business Partnerac240-##e
    List TypeALLES All Items
    Line Layout013 Line Item Display
    1. On the initial screen, enter the values from the Initial Data table.

    2. Choose Continue to check the basic list.

      There are three overdue items 6000/0010 displayed.

    3. Note the due date of the most overdue item.

    4. Note the amount of the most overdue item.

    5. Do not close the app.

  3. Open a new window in the browser.

    1. In the browser menu bar, choose New Tab.

    2. In the new window, enter the URL link from the Display Account Balance app.

    3. Select Enter.

    4. Choose Back.

  4. In the new window, start the SAP Fiori Post Document app (transaction FPE1).

    1. Choose the Document tile group.

    2. Choose the Post Document tile.

  5. Post a receivable to business partner ac240##e using the following data:

    Use the same noted due date and the same noted amount.

    Use different main and sub transactions.

    Initial Data

    FieldValue
    Document Datenoted due date
    Posting Datenoted due date
    Reconciliation Keyproposed by the system
    Document TypeYM General
    Clearing Reason12 Debit Entry Creation

    BP Item Data

    FieldValue
    Contract Accountac240-##e
    Main TransactionSB## Other Postings ##
    Sub TransactionFO## Receivables ##
    Amountnoted amount, should be 697,83
    1. On the initial screen, enter the values from the Initial Data table.

    2. Choose BP Item.

    3. Confirm the daily new reconciliation key, if necessary.

    4. In the Business Partner Items table, enter the values from the BP Item Data table.

    5. Select Enter.

      The net due date is calculated equal to the noted due date.

    6. Choose Post.

    7. Note the document number.

    8. Close the window.

  6. Check the new open item in the account balance display.

    1. After closing the window, you're back in the Display Account Balance app.

    2. In the basic list, choose Refresh.

      There are two overdue items displayed with the same due date and amount but with different main and sub transactions.

    3. Choose Back twice.

Task 2: Configure a Clearing Variant

Steps

  1. Go to the SAP S/4HANA system.

  2. Configure a clearing variant using the following rules:

    • Group the items according to main transaction, subtransaction, and due date.

    • Sort the items according to main transaction, subtransaction, and due date.

    • The main transaction 6000 is processed before main transaction SB##.

    • The subtransaction 0010 is processed before subtransaction FO##.

    • The items must be cleared according to their due dates.

    Header Data

    FieldValue
    Clearing VariantG##
    NameClearing Variant ##

    Step Data

    FieldValue
    Clearing Step10
    NameMT + ST + Due Date

    Grouping Data

    Number and CharacterGrouping Rule
    1. and 004 Main Transactioninitial
    2. and 005 Sub Transactioninitial
    3. and 010 Due Dateinitial

    Sorting Data

    Number and CharacterRanking Rule
    1. and 004 Main Transaction1 Order = Rank, else Char. Value
    2. and 005 Sub Transaction1 Order = Rank, else Char. Value
    3. and 010 Due Dateinitial

    Alternative Sorting MT

    FieldValue
    Character Value6000
    Ranking1

    Alternative Sorting ST

    FieldValue
    Character Value0010
    Ranking1
    1. Call transaction FICAIMG to access the FI-CA implementation guide.

    2. Choose Basic FunctionsOpen Item ManagementClearing ControlClearing VariantsDefine Clearing Variants.

    3. In the Clearing Variant overview, choose New Entries.

    4. Enter the values from the Header Data table.

    5. Choose Save.

    6. Choose Back.

    7. Select your entry G##, and double-click the Clearing Steps sub folder.

    8. In the Clearing Steps overview, choose New Entries.

    9. In the Header area, enter the values from the Step Data table.

    10. In the Grouping area, enter the values from the Grouping Data table.

    11. In the Sorting area, enter the values from the Sorting Data table.

      Do not forget to enter the ranking rule.

    12. Select Enter.

    13. Choose Save.

    14. In the Sorting area, the Alternative Sorting button is active now.

    15. In the Sorting area, choose Alternative Sorting for the Main Transaction row.

    16. Choose New Entries.

      Enter the values from the Alternative Sorting MT table.

    17. Choose Save.

    18. Choose Back twice.

    19. In the Sorting area, choose Alternative Sorting for the Sub Transaction row.

    20. Choose New Entries.

      Enter the values from the Alternative Sorting ST table.

    21. Choose Save.

    22. Choose Back twice.

    23. In the Group Rule area, check all fields with F4, but leave them blank.

    24. In the End of Step area, check all fields with F4 but leave them blank.

    25. Choose Save to save the complete clearing variant.

    26. Choose Back four times.

  3. Configure a clearing category using the following data:

    Header Data

    FieldValue
    Clearing CategoryG##
    NameClearing Category ##
    1. Call transaction FICAIMG to access the FI-CA implementation guide.

    2. Choose Basic FunctionsOpen Item ManagementClearing ControlDefine Clearing Categories.

    3. In the Clearing Categories overview, choose New Entries.

    4. Enter the values from the Header Data table.

    5. Choose Save.

    6. Choose Back twice.

  4. Assign clearing variant G## to clearing category G## for clearing type Post Manually.

    1. Call transaction FICAIMG to access the FI-CA implementation guide.

    2. Choose Basic FunctionsOpen Item ManagementClearing ControlDefine Specifications for Clearing TypesDefine Defaults for Incoming Payments.

    3. In the Incoming Payment table, select the clearing type 01 Post Manually.

    4. Double-click the Alternative Clearing Variant subfolder.

    5. Choose New Entries.

    6. In the Clearing Category field, enter G##.

    7. In the Clearing Variant field, enter G##.

    8. Choose Save.

    9. Choose Back four times.

  5. Assign clearing category G## to contract account ac240-##e (transaction CAA2).

    1. Call transaction CAA2 Contract Account Change.

    2. On the initial screen, enter contract account ac240-##e.

    3. Select Enter.

    4. In the Information dialog box, choose Continue.

    5. Go to the General Data tab.

    6. In the Clearing Category field, choose G##.

    7. Choose Save.

    8. Choose Back.

Task 3: Execute the Test of the New Clearing Strategy

Steps

  1. Start the SAP Fiori Post Document app (transaction FPE1).

    1. Choose the Document tile group.

    2. Choose the Post Document tile.

  2. Post a manual payment of business partner ac240-##e.

    You can test the clearing variant by selecting the Create Proposal flag.

    Initial Data

    FieldValue
    Document Datecurrent date
    Posting Datecurrent date
    Reconciliation Keyproposed by the system
    Document TypeYG Payment Lot
    Clearing Reason01 Incoming Payment

    G/L Item Data

    FieldValue
    Company Code1010
    G/L Account11100025 Bank Incoming Payment
    Amountnoted amount, should be 697,83
    1. On the initial screen, enter the values from the Initial Data table.

    2. Choose G/L Item.

    3. In the G/L Account Items table, enter the values from the G/L Item Data table.

    4. Choose Select Open Items.

    5. In the Business Partner selection field, enter ac240-##e.

    6. Select Create Proposal in the lower part of the screen.

    7. Choose Continue.

      You access the Post Document: Process Open Items screen.

    8. The settings in the clearing variant cause the following proposal:

      The most overdue item with transaction 6000/0010 is proposed for clearing.

      The same overdue item with transaction SB##/FO## is not proposed for clearing.

    9. Choose Post to accept the clearing proposal.

    10. Note the document number.

    11. Choose Back.

  3. Start the SAP Fiori Display Account Balance app (transaction FPL9).

    1. Choose the Information tile group.

    2. Choose the Display Account Balance tile.

  4. Display the account of business partner ac240-##e using the following data:

    Initial Data

    FieldValue
    Business Partnerac240-##e
    List TypeALLES All Items
    Line Layout0C1 Clearing Information
    1. On the initial screen, enter the values from the Initial Data table.

    2. Choose Continue to check the basic list.

      The most overdue item with transaction 6000/0010 is cleared.

      The same overdue item with transaction SB##/FO## is not cleared.

    3. Choose Back twice.

Log in to track your progress & complete quizzes