Advanced rule formulas include movement calculations and allocating expenses based on entity type.
You can use the following features of advanced rule formulas:
Movement calculations
Movement calculations define the copying or movement of data from one time period to another. In the formula examples below, [AccRec] is the accounts receivable account, and [AccPay] is the accounts payable account.
Example
Account |
Description |
Formula |
---|---|---|
|
Movement in Accounts Receivable |
With the formula, you are checking whether the current TIME member is parent or not by checking the property CALC = NO. If it is not a parent, then we take the current TIME member’s Account Receivables (ACCREC) and subtract the previous month’s Account Receivables. If the current TIME member is parent, then you simply sum up all of the children. |
|
Movement in Inventory |
The formula checks inventory. |
|
Movement in Accounts Payable |
|
|
Movement in Working Capital |
|
Allocating expenses based on entity type
The following examples assume there is an Entity property named Function. If an entity has the function SM, the Total Department Expense is allocated to the S&M Exp
account. If an entity has
the function RD, the Total Department Expense is allocated to the R&D Exp
account. If an entity has the function CORP, the Total Department Expense is allocated to the G&A Exp
account.
Example
Account |
Description |
Formula |
---|---|---|
|
Sales & Marketing Expense |
You first check if the current ENTITY member is parent or not. Then, you read the property FUNCTION of the current ENTITY member to see whether it is “SM” or not. If it is “SM”, then, you are taking the Total Department Expense as a Sales & Marketing expense. Otherwise, it will be assigned with zero. If current ENTITY is parent, a sum of all children appears. |
|
R&D Expense |
In this formula, you are taking the “RD” values of FUNCTION property. |
|
G&A Expense |
|
Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or by its gross negligence.