Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

While working on Script logic in BusinessObjects Planning and Consolidation, at times we might want to perform conditional execution.  Say for example, we might want to compare two accounts A and B, post the difference to another account C only when A is greater than B. In such scenarios, instead of writing a custom logic we can use the Validation Rules.  These business rules are normally used to check the integrity of accounts, example - to verify if total assets equal to total liabilities and equities in the balance sheet.

Let me now illustrate how these validation rules can be used for conditional execution with an example.

Case
We want to compare the Recoverable Amount and Book Value of an asset, post the difference to Impairments only when Recoverable amount is less than the Book Value.  No value should be posted to impairments account in other conditions.

When Recoverable Amount < Book Value

Impairments = Book Value – Recoverable Amount

End When

For this we have to do the following steps:

1)      Setup the Subtable type dimension i.e. Flow dimension and add it to the application.

2)      Modify the application to contain Validation Rules.

Select your application > Modify Application > Change Application Type > Modify Application > Select the check box for Validation rules > Modify Application.

After this you can see that two tables – “Validation rules” and “Validation rules detail” are added under Business Rules in your application.

The above two steps are generic for using Validation rules in the application. Now coming to the case considered, we need to configure the business rules tables.

3)      The table Validation rules is configured as:

Here we specify the fields as follows:

FieldValueDescription
Validation accountI_ImpairmentsDestination Account
RemarkConditional ExecutionA description of the rule
Validation operandWe can specify the operands :  =, <</strong>, >, >=,<=This depends on our requirement
Other source dimensionsBlankA filter criterion for the original data extraction. Used to limit the selection on one dimension.
Other destination dimensionsBlankA forced destination. Used to force a target destination’s dimension.
Applicable periodsDECBlank or one or more time periods.
Validation toleranceBlankUsed to determine a limitation in the Value.

4)      The table “Validation rules details” is configured as:

Here we specify the fields as follows:

FieldValueDescription
Validation accountI_ImpairmentsDestination Account
Account 1I_RecoverableAmtThe member ID of the “left side” account.
Flow 1CloseBalBlank or the “left side” member of the FLOW dimension.
Sign 11The operator used in the Left part of calculation ( + or - )
Account 2I_BookValThe member ID of the “right side” account.
Flow 2CloseBalBlank or the “right side” member of the FLOW dimension
Sign 2-1The operator used in the Right part of calculation  ( + or - )
RemarkConditional ExecutionA description for the rule.

5)      Write the following to Default logic in your application (Finance here).  

//========================================================

//Logic to call Stored Procedure

//========================================================

*RUN_STORED_PROCEDURE=SPRUNVALID(‘FINANCE’,’ACTUAL’,’USD’,’%SCOPETABLE%’,’%LOGTABLE%’)

*COMMIT

The above logic executes the business rules. It takes the syntax:

RUN_STORED_PROCEDURE=SPRUNVALID(‘application’,’category’,’currency’,’%SCOPETABLE%’,’%LOGTABLE%’)

           *COMMIT

6)      Now execute the “Default Formulas” package and check the result.

7)      The result can be verified from a report.  It can be seen that value is posted to Impairments only when recoverable amount is less than book value. In the report shown, we have different asset categories.

 
Thus we can use validation rules for conditional execution.  It can be configured to suit our requirements. This not only simplifies our task but will also help us improve the performance as we are using table based logic instead of custom script logic.

 

Hope this blog helps you perform conditional execution using Validation rules.

    
1 Comment