Skip to Content

h2. Business Rules

Introduction

SAP Business Planning and Consolidations delivers certain pre-defined functionalities and calculations to support common accounting/financial scenarios such as currency translation and intercompany matching/elimination or validations.  Business rules framework also allows the business user to configure and customize these functions to meet their specific requirements “table-based” logic is applied.  Table-based logics are logic commands that are driven by the tables underlying the business rules. This instills the SAP philosophy of separating the content from the container.

Business Rule is a table based logic execution functionality which provides flexibility to the end users to customize certain pre-delivered functions, without having to fully understand BPC scripting logic. Under this framework all business rule functionalities are support by an underlying business rule table in which the business user can configure/setup rules such as what balances should be read in order to calculate an amount to be posted within the boundaries of the specific functionality.

Types Business Rule

There are six types of business rules available at the application level which can be enabled

    • Carry – Forward: Summarizes a group of activity accounts and copies the value into an opening balance account. Facilitates populating the opening balances in the new year with the closing balances as of the last period of the prior year and transfer current period net income to the Balance Sheet in order to create a fully balanced Balance sheet for each period.

    • Currency Translation: Performs standard currency translation. The currency conversion function is designed to convert local currency values into one or more reporting and/or group currencies.

    • Intercompany Eliminations: Performs intercompany eliminations and allows us to perform the intercompany matching process.

    • US Eliminations: Controls where in an Entity dimension member the results of eliminations are stored

    • Validation: Allows user to check integrity and correctness of entered data. This facilitates validating the data at different stages of the data submission and enrichment process to help ensure the completeness and accuracy of the existing data. In other words this business rule ensures that the data is in consistent state as per the business logic.

We will be focusing on the validation business rule in the rest of the article.

<br />h2. Validation Business Rule

Introduction

The data is entered via various sources in BPC; the data might be entered from input schedules (evdre), data manager packages or journals. At various stages of the data entry and work state, some user defined checks need to be performed in order to help ensure the consistency, completeness and accuracy of the data from the business aspect.  Validation rules allow you to check the integrity and correctness of entered values, before signing off such data as “approved.”

The validation business rule facilitates this verification process by running a report on the various “error” accounts, it makes it possible to visualize if the data is in consistent state in the context of the application or if data is inconsistent which further follow-up. Business rule tables exist in order to allow Business Users to define which sets of records they wish to compare; this separates the content from the container.</p><h3 style=”margin: 12pt 0in; text-align: justify”>Characteristics of Validation Rules</h3><p style=”margin: 6pt 0in 0pt; line-height: 150%; text-align: justify” class=”MsoNormal”>Below is the list of few key characteristics of the validation rules.</p><ul><li><div class=”MsoNormal” style=”margin: 6pt 0in 0pt; line-height: 150%; text-align: justify”>Validation business rule can only be configured at the application level</div></li><li><div class=”MsoNormal” style=”margin: 6pt 0in 0pt; line-height: 150%; text-align: justify”>Validation business rule is supported by two underlying business rules tables (clcVALIDATION_<APP> and clcVALIDATION_H_<APP>)</div></li><li><div class=”MsoNormal” style=”margin: 6pt 0in 0pt; line-height: 150%; text-align: justify”>Validation business rule should be enabled explicitly in order to configure it at the application level</div></li><li><div class=”MsoNormal” style=”margin: 6pt 0in 0pt; line-height: 150%; text-align: justify”>Validation rules can be configured for Financial and Legal Consolidation type application only</div></li><li><div class=”MsoNormal” style=”margin: 6pt 0in 0pt; line-height: 150%; text-align: justify”>The validation function provides for the ability to: </div></li></ul><p style=”margin: 6pt 0in 0pt 1in; text-indent: -0.25in; line-height: 150%; text-align: justify” class=”MsoNormal”>o    Compare the balance of one set of accounts against a second set of account or group of accounts , using operands like =,>,<,>= and <=</p><p style=”margin: 6pt 0in 0pt 1in; text-indent: -0.25in; line-height: 150%; text-align: justify” class=”MsoNormal”>o    If the comparison returns a true condition then the validation is deemed to have been successful and no entries are made in the variance (validation) account.</p><p style=”margin: 6pt 0in 0pt 1in; text-indent: -0.25in; line-height: 150%; text-align: justify” class=”MsoNormal”>o    If a false result is returned then the validation is deemed to have failed. In this case any variance between the balances in the two sets of accounts will be automatically posted to an variance (validation) account. </p><ul><li>Validation rule supports the ability to define the records to be checked using given combination of account and flow dimension. </li></ul><p> </p><ul><li>Validation business rule uses the SPRUNVALID stored procedure and can be called from the script logic with the below command  </li></ul><p style=”margin: 0in 0in 0pt 1in; line-height: 150%; text-align: justify” class=”MsoListParagraphCxSpLast”>RUN_STORED_PROCEDURE=SPRUNVALID( (FINANCE),  (ACTUAL),  (USD),  (%SCOPETABLE%),  (%LOGTABLE%) )</p><h3 style=”margin: 12pt 0in 3pt; line-height: 120%; text-align: justify”>Configuring the Validation Rules</h3><h4 style=”margin: 12pt 0in 3pt; line-height: 120%; text-align: justify”>Business Case</h4><p style=”margin: 6pt 0in 0pt; line-height: 120%; text-align: justify” class=”MsoNormal”>We want to ensure that the total asset is equal to total liabilities during a financial close cycle. The account for the total assets is “TotalAssets” and the account for total liability is “TotalLiabEquity”. In case of any difference is found in these account, the same should be posted in an exception account name “BSDiff”.</p><h4 style=”margin: 12pt 0in 3pt; line-height: 120%; text-align: justify”>Configuration Steps</h4><h5 style=”margin: 12pt 0in 3pt; line-height: 120%; text-align: justify”>Modify Application Property</h5><p style=”margin: 6pt 0in 0pt; line-height: 120%; text-align: justify” class=”MsoNormal”>Step 1: Log into BPC Administration and highlight the application to which you need to add Business Rules and select “Modify Application” from the action pane</p><p>!https://weblogs.sdn.sap.com/weblogs/images/252057395/image017.jpg|height=1|alt=image017.jpg|width=1|src=https://weblogs.sdn.sap.com/weblogs/images/252057395/image017.jpg|border=0!!https://weblogs.sdn.sap.com/weblogs/images/252057395/image011.jpg|height=width: 587px; height: 311px|alt=image011|width=587|src=https://weblogs.sdn.sap.com/weblogs/images/252057395/image011.jpg|border=0! </p><p> </p><p style=”margin: 6pt 0in 0pt; line-height: 120%; text-align: justify” class=”MsoNormal”>Step 2: Choose the “Change Application Type” option from the action pane.</p><p style=”margin: 6pt 0in 0pt; line-height: 120%; text-align: justify” class=”MsoNormal”> </p><p style=”margin: 6pt 0in 0pt; line-height: 120%; text-align: justify” class=”MsoNormal”>Step 3: Ensure that the reporting type of application is “Financial” and select “Modify Application” from the action pane</p><p>!https://weblogs.sdn.sap.com/weblogs/images/252057395/image012.jpg|height=332|alt=image12|width=558|src=https://weblogs.sdn.sap.com/weblogs/images/252057395/image012.jpg|border=0!</p><p> </p><p style=”margin: 6pt 0in 0pt; line-height: 120%; text-align: justify” class=”MsoNormal”>Step 4: Check the “Validation Rule” check box and select “Modify Application” from the action pane</p><h3 style=”margin: 12pt 0in 3pt; line-height: 120%; text-align: justify”>!https://weblogs.sdn.sap.com/weblogs/images/252057395/image013.jpg|height=302|alt=image013|width=558|src=https://weblogs.sdn.sap.com/weblogs/images/252057395/image013.jpg|border=0!  </h3><h3 style=”margin: 12pt 0in 3pt; line-height: 120%; text-align: justify”>Setting up Dimensions</h3>Flow Dimension* To use the validation business rule, a Flow dimension (a Subtable type dimension) is mandatory. The Flow dimension is not included in the ApShell appset that is standard with the software. The Flow dimension has been added to the Finance Application within ApShell for purposes of this guide.

For example, some accounts, like Fixed Assets, have a Subtable dimension which contains Opening Balances, Additions, Deletions, Transfers and Ending Balances.

For purposes of this example, the Flow dimension has been built to look like the following:

!https://weblogs.sdn.sap.com/weblogs/images/252057395/image015.jpg|height=343|alt=impage15|width=563|src=https://weblogs.sdn.sap.com/weblogs/images/252057395/image015.jpg|border=0

·       Note that the dimension is of type Subtable

·       Flow dimension members

ID|  |

EVDESCRIPTION|  |

PARENTH1| F_GEN | Generic Flow Member | F_TotalActivity |

F_OpenBal

Opening Balance

F_TotalActivity

F_Additions

Additions

F_TotalActivity

F_Deletions

Deletions

F_TotalActivity

F_Transfer

Transfer

F_TotalActivity

F_EndBalance

End Balance

F_TotalActivity

F_TotalActivity

Total Activity

·     After the Flow dimension has been successfully processed, add it to the application which contains the Business Rules. In this example we have added it to the Finance Application.

Error/Validation Account

Error or validation account should be setup in the account dimension to post the difference of the validation process. For this example a new account “BFDiff” is added to the account dimension.

Business Rule Table(s)

Two tables, “Validation Rules” table and “Validation Details” table need to be managed for setting up the validation rules.

Validation Rules Table

The following table describes the fields to define in the validation rules table (Extracts from the SAP BPC Help)

*Field Name </td><td width=”67%” valign=”top” style=”border-right: #d4d0c8; padding-right: 7.5pt; border-top: black 1pt solid; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 67.52%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>Description</td></tr><tr><td width=”32%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 32.48%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>Validation account</td><td width=”67%” valign=”top” style=”border-right: #d4d0c8; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 67.52%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>The member ID of the ‘error’ account.</td></tr><tr><td width=”32%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 32.48%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>Remark</td><td width=”67%” valign=”top” style=”border-right: #d4d0c8; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 67.52%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>A description for the rule. </td></tr><tr><td width=”32%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 32.48%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>Validation operand</td><td width=”67%” valign=”top” style=”border-right: #d4d0c8; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 67.52%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>=*, <</strong>, >, >=,<=If the sign is =, the total of the left account must be equal to the total of the right account *-1If the sign is >, the total of the left account must be greater than the total of the right account *-1 If the sign is <, the total of the left account must be smaller than the total of the right account *-1| Other source dimensions | Blank or a filter criterion for the original data extraction. Used to limit the selection on one dimension. |

Other destination dimensions

Blank or a forced destination. Used to force a target destination’s dimension.

Applicable periods

Blank or one or more time periods.

Validation tolerance

Used to determine a limitation in the Value.

All validations compare the Left part with the right part (ACCOUNT_L with ACCOUNT_R). You can have more than one account in the left or in the right. The system calculates all the accounts on the left and compares it with all the accounts on the right. Here is our example:

0.1. TotalAssets – Total Asset = 1000

0.2. TotalLiabEquity – Total Liabilities = 990

If the validation sign is = , 10 is generated in the validation account because 1000 is not equal to 990.

If the validation sign is < , 10 is generated in the validation account because 1000 is not smaller than 990.

If the validation sign is > , nothing is generated in the validation account because 1000 is greater than 990.  

<br />Sample Configuration

*Validation *Account

Validation Operand

Other Source Dimensions

*Other Destination Dimensions    </td><td width=”17%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: black 1pt solid; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 17.98%; padding-top: 0.75pt; border-bottom: black 1pt solid; height: 22.35pt; background-color: transparent”>Applicable Periods      </td><td width=”12%” valign=”top” style=”border-right: #d4d0c8; padding-right: 7.5pt; border-top: black 1pt solid; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 12.68%; padding-top: 0.75pt; border-bottom: black 1pt solid; height: 22.35pt; background-color: transparent”>Validation Tolerance</td></tr><tr><td width=”18%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 18.7%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>BSDiff</td><td width=”14%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 14.96%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>=</td><td width=”16%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 16.86%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”> </td><td width=”18%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 18.8%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”> </td><td width=”17%” valign=”top” style=”border-right: black 1pt solid; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 17.98%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”> </td><td width=”12%” valign=”top” style=”border-right: #d4d0c8; padding-right: 7.5pt; border-top: #d4d0c8; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 12.68%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>0</td></tr></tbody></table><p> </p><p>!https://weblogs.sdn.sap.com/weblogs/images/252057395/image016.jpg|height=315|alt=image016|width=592|src=https://weblogs.sdn.sap.com/weblogs/images/252057395/image016.jpg|border=0! </p><p style=”margin: 6pt 0in 0pt; line-height: 120%; text-align: justify” class=”MsoNormal”> </p><p style=”margin: 6pt 0in 0pt; line-height: 120%; text-align: justify” class=”MsoNormal”>Note: After addition or change do “Save without Validation” and “Validate Validation rules rule table”, without this the setting will not work.

  
Validation Rules Details Table

The validation process compares the left side intersection (ACCOUNT1 / FLOW1) with the right side intersection (ACCOUNT2 / FLOW2).The following table describes the fields to define in the Validation rules detail table.

*Field Name </td><td width=”67%” valign=”top” style=”border-right: #d4d0c8; padding-right: 7.5pt; border-top: black 1pt solid; padding-left: 7.5pt; padding-bottom: 0.75pt; border-left: #d4d0c8; width: 67.52%; padding-top: 0.75pt; border-bottom: black 1pt solid; background-color: transparent”>Description*| Validation account | The member ID of the ‘error’ account. |

Account 1

The member ID of the “left side” account.

Flow 1

Blank or the “left side” member of the FLOW dimension.

Sign 1

The operator used in the Left part of calculation ( + or )| Account 2 | The member ID of the “right side” account. |

Flow 2

Blank or the “right side” member of the FLOW dimension

Sign 2

The operator used in the Right part of calculation  ( + or )| Remark | A description for the rule. |

Sample Configuration

Validation Account

ACCOUNT1

FLOW1

SIGN1

ACCOUNT2      

FLOW2            

SIGN2

BSDiff

TotalAssets

F_GEN

+ 1

TotalLiabEquity

F_GEN

+ 1

!https://weblogs.sdn.sap.com/weblogs/images/252057395/image017.jpg|height=308|alt=image017|width=596|src=https://weblogs.sdn.sap.com/weblogs/images/252057395/image017.jpg|border=0!</body>

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Rashmi G
    Hi,

    This is a good article.
    Could anyone help me in setting the validation on following business scenario?

    I have three accounts say ACT1, ACT2, ACT3 and Flow as F_FLOW
    I would like to validate ACT1 against sum of ACT2 and ACT3.  If they are not equal then it will post the difference to the validation account say ‘VLD_ACC’

    Regards,
    Rashmi

    (0) 

Leave a Reply