Professional Documents
Culture Documents
Community
Personal Insights
Syed Usama
January 26, 2021 4 minute read
Challenge:
Importing back dated Invoices at the time of Greenfield system implementation can affect the calculation of
Debtor’s Aging
Proposed Solution:
Application of Substitution Rule in a manner defined in this article can help the practitioners to efficiently
resolve this matter.
1. Introduction
2. What is a Substitution Rule?
3. Understanding the Challenge of Contradicting Dates.
4. Call up Points to use for Substitution.
5. Steps of Substitution
6. Two Scenarios of substitution & proposed solutions
7. Solution for substitution
8. Adding a Field in Substitution Rule.
9. Conclusion.
1. Introduction:
https://blogs.sap.com/2021/01/26/substitution-rule-to-maintain-customer-aging/ 1/8
7/8/2021 Substitution Rule to Maintain Customer Aging (SD Billing) | SAP Blogs
Customer aging is very important to analyze the customers’ unpaid invoices and credit memos by date ranges.
For the purpose of managing customer aging, it is very essential to maintain the document date as per the
original billing date when the receivables are raised through SD billing using VF01 or directly from FI.
In our proposed solution, the proper maintenance of aging can be achieved by using a small substitution rule,
which can be helpful for uploading the orders and in generation of billing.
Some prerequisites (could be in the form of logical expressions) are maintained in the system in order to get the
desired output. The system checks the defined prerequisite whenever a request runs, then the system replaces
the desired field(s) with the substituted figures or values.
When Billing is created, the system generates an accounting document with the same date as of billing date.
Which means, the Billing Date becomes the Posting Date and also the Document Date.
Since the system calculates the aging based on due date, which itself is calculated from the document date.
Here the challenge is, if we do not set the document date as per the correct and original invoice date (as it was
in the legacy system), our new systems’ aging calculation would be wrong and understated.
We should know that there are specific areas only in which we can use substitution.
The substitution applies only when have activated it for the call up points.
The call up point could be Document Header, Line Item, and even Complete Document.
In our proposed solution, we will apply substitution on the document header level.
5. Steps of Substitution:
1. Prerequisite statement, in which the system checks the conditions which must be matched to continue with
the substitution.
The System checks the true and false of the Prerequisite statement.
If the statement is false, then system doesn’t replace it with the substitution values and if the statement is
true, then replaces the field(s) with the substitution values.
2. Substitution Values can be numeric value or string of letters.
3. Substitution Exists.
Here we have explained two different scenarios for the benefit of the readers.
https://blogs.sap.com/2021/01/26/substitution-rule-to-maintain-customer-aging/ 2/8
7/8/2021 Substitution Rule to Maintain Customer Aging (SD Billing) | SAP Blogs
Scenario A:
In this scenario, a company has a Fiscal Year from July to June and we want to post previous period customer
invoices through sales order on the cutover date i.e. 31.10.2020. But the billing date is 15.07.2020.
Note: Here we should give consideration that an Order can be created in the back date, but invoice should be
made on the date when it is originally billed.
If billing Date is 15.07.2020, the system will generate error in release to accounting in VF01 because previous
months are closed in FI. So, no document will be generated in Finance because posting date for balancing trial
balance is 31.10.2020.
And, if we take Billing Date as 31.10.2020, which is actually a cutover date so system will show wrong customers
aging because Document Date (BLADT) and Posting Date (BUDAT) would remain same as Billing Date (FKDAT).
Hence, the aging would be wrongly impacted, as it should start from the original billing date (15.07) as per
legacy system.
To calculate the aging with actual billing date a substitution rule on Document Header can be applied with some
relevant fields, which can affect the accounting document only without any date change on billing document.
1. Transaction Code: There are many other T codes and Document Types from which an accounting entry can
be generated so it should be restricted on the specific T code and Document Type.
For instance, Billing VF01, Billing change VF02 and Document Type ‘RV’
https://blogs.sap.com/2021/01/26/substitution-rule-to-maintain-customer-aging/ 3/8
7/8/2021 Substitution Rule to Maintain Customer Aging (SD Billing) | SAP Blogs
2. Substitution are:
https://blogs.sap.com/2021/01/26/substitution-rule-to-maintain-customer-aging/ 4/8
7/8/2021 Substitution Rule to Maintain Customer Aging (SD Billing) | SAP Blogs
Scenario B:
If billing documents belongs to Previous Fiscal Years, in that case we can create step 2 which runs parallel with
step 1.
For Example:
In this step we make a substitution rule for previous fiscal years from the header table BKPF so that the task
can be achieved of customer aging.
https://blogs.sap.com/2021/01/26/substitution-rule-to-maintain-customer-aging/ 5/8
7/8/2021 Substitution Rule to Maintain Customer Aging (SD Billing) | SAP Blogs
https://blogs.sap.com/2021/01/26/substitution-rule-to-maintain-customer-aging/ 6/8
7/8/2021 Substitution Rule to Maintain Customer Aging (SD Billing) | SAP Blogs
These fields can be added from table VWTYGB01 and after adding these fields in substitution ABAP program
would be executed RGUGBR00.
Precaution:
All the relevant (previous) Fiscal year and/or Periods would remain open until all the documents get posted.
Conclusion:
In our proposed solutions, Billings from Previous Fiscal years and Previous Periods can be posted on current
date without any enhancement in the system and maintaining the correct customers aging calculation.
Alert Moderator
Assigned tags
FIN (Finance) | FIN Accounts Receivable and Payable | FIN General Ledger | SD Sales |
https://blogs.sap.com/2021/01/26/substitution-rule-to-maintain-customer-aging/ 7/8
7/8/2021 Substitution Rule to Maintain Customer Aging (SD Billing) | SAP Blogs
Related Questions
FI posting from SD
By
Former Member , Feb 10, 2011
Substitution BSEG Filed
By
Former Member , Aug 08, 2006
Document splitting and substitution rule
By
Former Member , Nov 20, 2008
Find us on
Newsletter Support
https://blogs.sap.com/2021/01/26/substitution-rule-to-maintain-customer-aging/ 8/8