3.1 About table TF123(Additional Rules for Running Program SAPF124)
SAPF124 selects all accounts specified in the value sets with debit and credit postings according to customizing for SAP table TF123 via SAP transaction OB74.
The defaulted Clearing Criteria/Rule for Additional Rules For Automatic Clearing are:
Criterion 1 = Technical Field ZUONR for Assignment Number.
Criterion 2 = Technical Field GSBER for Business Area.
Criterion 3 = Technical Field VBUND for Trading Partner.
Be cautious that the criteria field from BEDG1 to BEDG5 has a limit of 30 characters. For example, trying to use Item Text (BSEG-SGTXT) as one of the criteria will lead to incorrect clearing because the SGTXT is 50 characters long.
Besides, the definition of the criteria field BEDGX only supports 24 characters long less than 30 of TF123!
To support longer fields like SGTXT as criteria then have to customize the following places for SAPF124 (better create Z one and its include program):
Check every place criteria field has been used including definition/populating/displaying. Dozens of places need to be adjusted after this length extension. May take some time but it will work.
3.2 About archived documents during clearing items
SAPF124 will encounter a termination popup (with Error F1 800-Clearing: Document & & & does not exist) while trying to post any archived documents and terminate the whole process.
We can use BSIS-XARCH as an archived indicator to separate from the normal FI documents.
Remember to add an XARCH check for all data fetching toward table BSID/BSIS/BSIK.