Ansicht
Dokumentation

RFLQ_ASSIGN_FI - Liquidity Calc.: Assignment of Liquidity Item on Basis of FI Documents

RFLQ_ASSIGN_FI - Liquidity Calc.: Assignment of Liquidity Item on Basis of FI Documents

ABAP Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Purpose

This program runs through actual documents in the liquidity calculation that belong to FI documents (that is, all documents except for manual transfer postings). It attempts to derive the liquidity item for the document from the information in FI.

Integration

You specify the range of actual documents to be processed on the selection screen.

Features

The logic for deriving the liquidity item (with the query sequence and user exit) is the same as for the program that evaluates the information in bank statements. However, this program incorporates an additional step, namely the search for the FI document line items that are to be evaluated:

An actual line item in the liquidity calculation references a specific line item in FI (in other words, the G/L account for the line item is a bank account or another actual account). However, this document line item seldom contains information that is useful for evaluation purposes.

As a result, the mechanism imports the whole document, typically:

Line item: Bank account (actual)
Line item: Bank clearing account

Likewise, the line item on the bank clearing account seldom contains useful information.

If this line item has already been cleared in accounting, the program continues to search for other FI documents involved in the clearing transaction.

These are then imported. In the simplest scenario, it finds an additional payment document:

Line item: Bank clearing account
Line item: Vendor (Information)

In this case, the line item containing the information for the liquidity item is the vendor line item. The mechanism stops at this line item, regardless of whether or not it has been cleared.

As a rule, the account type and, in some cases, the G/L account determine whether a line item is an "end point" in which the program searches for information to derive a liquidity item. These "information line items" are:

  • All customer and vendor line items
  • All other line items posted to a G/L account that has been declared as an "information carrier" in Customizing (for example, reconciliation accounts for treasury transactions or salary payments).

This search method usually finds one or several potential "information line items", each of which is evaluated as follows: The line item (field values of structures BKPF, BSEG and possibly KNA1, LFA1) is checked against the first query in the sequence defined in the report. If all the conditions of this query apply, it makes a note of the assigned liquidity item. If not, it checks the line item against the next query, and so on. You also have the option of programming your own derivation logic in a user exit function (interface according to "FLQ_SAMPLE_ASSIGN_FI"). This may take priority over the derivation result from the queries.

The program collects the liquidity items derived from the "successful" information line items together with the corresponding amounts, and compares the total amount with the amount of the actual line item.

If the actual line item is not covered (that is, if the total amount from the information line items is less than the actual line item), the mechanism cannot assign a new liquidity item, and the liquidity item assignment remains unchanged.

If the actual line item is covered, it is assigned the new liquidity positions. The amount is divided up in proportion to the amounts of the information line items.

The detail log displays the new liquidity item and the corresponding query. If the program is unable to assign the liquidity item for an actual document, an error message is displayed in the log.

One of the errors that can occur is related to the fundamental program logic: If the mechanism begins with an actual line item as described above, and then reads the related document cluster from the clearing transaction, this document cluster may sometimes include other actual line items. As a result, the cluster comprises N actual line items and M information line items. In such cases, meaningful information can only be assigned to the current actual line item in exceptional cases. To reflect this, the program often displays an error message (N:M relationship).

This primarily applies to clearing transactions on bank clearing accounts. We therefore advise that you clear documents on bank clearing accounts on a strict transaction basis, and only clear a limited number of documents against each other (you can usually achieve this by using program SAPF124 for automatic clearing). You should not permit mass clearing postings with several hundred documents.

Activities

If the resulting assignments are unsatisfactory, you should first use program RFLQ_ITCHAIN to display the information/other line items found for an actual line item. You can use this as a starting point for revising the query sequence and, where applicable, the user exit applied to these line items.

Example

This example assumes that we have the simple document chain described above:

Line item: Bank account (actual) Amount 100-
Line item: Bank clearing account

Two documents are cleared on the bank clearing account:

Line item: Bank clearing account Amount 60-
Line item: External vendor
Line item: Bank clearing account Amount 40-
Line item: Internal vendor

If you have already declared the bank account or bank clearing account as an information carrier, the mechanism only sees the first document and evaluates the corresponding line item. However, this will tend to be the exception.

If the bank account and bank clearing account have not been defined as information carriers, the mechanism looks at the two other documents and evaluates the two line items:

Line item: External vendor Amount 60
Line item: Internal vendor Amount 40

If the program is unable to derive a liquidity item for both of these line items, the actual line item is not reassigned. This is because the actual line item is not fully covered.

If the program derives the same liquidity item for both line items, this liquidity item is assigned for the full amount of the actual line item. If the program derives a different liquidity item for each line item, the actual line item amount is split proportionately between the two liquidity items (in this example, the ratio is 60/40).






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   General Material Data  
This documentation is copyright by SAP AG.

Length: 7536 Date: 20240520 Time: 122543     sap01-206 ( 143 ms )