Some example rule sets

The following example rule sets may help you to understand how business rules can be applied in practice. They also provide examples of how you might plan and document your business rule requirements before you begin creating the rule sets in the system.

Example 1: Resetting analysis codes on Stock Cost of Sales Interface

The following rule ensures the analysis entered on transactions flowing across the Stock Cost of Sales interface, identified by Journal Type GJSTK, comply with the analysis requirements. Where an analysis code is not required, but exists on a transaction, the code is set to N/A.

Note:  Analysis code N/A is created as a valid code for all analysis dimensions that require a code to be entered. If an analysis dimension has been defined as mandatory a valid analysis code must be entered. If an analysis code is not known, or not applicable, the N/A code is used.

Rule LA001

Command Value 1 Operator Value 2 Decision Column 1 Decision Column 2
IF Journal Type = GJSTK Y Y
IF Account Code = 500110 Y  
IF Account Code = 120150   Y
SET Ledger Analysis 1 = N/A   X
SET Ledger Analysis 2 = N/A X X
SET Ledger Analysis 3 = N/A X X
SET Ledger Analysis 4 = N/A   X
SET Ledger Analysis 5 = N/A   X
SET Ledger Analysis 9 = N/A   X

Example 2: Setting an analysis code

This rule sets the correct cost centre code in Ledger Analysis 1 for transactions posting to account 530140, if the journal type is FAIMG or INT20.

Rule LA002

Command Value 1 Operator Value 2 Decision Column 1 Decision Column 2
IF Journal Type = FAIMG Y N
IF Journal Type = INT20 N Y
IF Account Code = 530140 Y Y
SET Ledger Analysis 1 = DPG41 X X

Example 3: Validating Sales Order Processing Revenue Transactions

This rule ensures all transactions entered for sales order posting to a revenue account reference an item code. Revenue accounts are identified by a 4 in the first character in the account code, and a redefined data item of A/C Code-Pos 1 has been created to identify this.

Message SOPE1 reads: Accounts beginning with 4 MUST reference an item code.

Rule SOP001

Command Value 1 Operator Value 2 Decision Column 1
IF A/C Code-Pos 1 = 4 Y
IF Item Code = SPACE Y
OR     -  
ERROR Msg SOPE1     X

Example 4: Assigning Destination and Flow Codes

This rule ensures that the correct type of destination code (ledger analysis 4) is entered on transactions posting to profit and loss or balance sheet accounts. For profit and loss postings, a two character Destination code is required, whereas for balance sheet postings a three character Flow code is required.

The rule uses the Ledger Analysis Usage flag to determine whether or not a code has been entered. It then checks to see whether a third character is present to determine whether a two or three character code has been entered.

Message SOPE2 reads: This account requires a two character Destination code.

Message SOPE3 reads: This account requires a three character Flow code.

Rule SOP002

Command Value 1 Operator Value 2 Decision Column 1 Decision Column 2
IF Ledger Analysis Usage Flag - Ledger Analysis 4 = Yes Y Y
IF Account Type = Profit and Loss Y  
IF Account Type = Balance Sheet   Y
IF Customer-AD4 - Pos 3 = SPACE N Y
ERROR Msg SOPE2     X  
ERROR Msg SOPE3       X