Overview of expert rules defined based on the IBP_DB() command

An expert rule can also be defined using the IBP_DB() command. You must first define the expert calculation rule , see Defining an expert rule.

This is the Infor BI OLAP DB() function syntax:

DB(Cube,Dim1Element,Dim2Element,...,DimxElement)
Cube = the name of the external Cube.
Dim1Element = an element of the first dimension of Cube, Dim2Element is an element of the 2nd dimension of Cube, etc...
Note: 
  • All dimensions of DB(), including additional dimensions for pivot attributes must be specified in the correct order. Pivot attributes can be Cycle-Module specific, but must be predefined in the DB() commands.
  • IBP_DB() is an internal command that is used for expert calculation rules and is a quick method to define the OLAP DB() function.
  • When creating calculation rules in OLAP (the cycle period is started using the Start or Resume with Refresh options), any rules wherein the Expert Rule contains an IBP_DB() command are converted to a corresponding DB() function in the rule for the OLAP cube. This conversion occurs prior to the variable substitution.

Conversion rules:

  • The naming convention for parameters, for example, <parameter name>="<parameter value>":
    • Double quotes are required if the parameter value contains "," or ")". Otherwise, quotes can be omitted.
    • All (trimmed) text between "=" and the next preceding "," is considered the parameter value.
    • When quotes are used, all "internal" quotes must to be 'escaped' using "\", for example, \"value\".
  • You are only required to specify the dimensions elements that are different to the calculation target:
    • Parameters that are only based on the dimension variables such as %cube and !%items, which read the same dimension and elements from the source cube, are not required to be specified.
    • Any missing dimensions are replaced with the appropriate cube dimension name in the OLAP DB() function.
  • IBP_DB dynamically adjusts to the dimensions in the cycle period (that is, the addition of any relevant pivot dimensions). Missing pivot dimensions, if any, in the IBP_DB command are replaced with the appropriate cube dimensions in the OLAP DB() function.
  • Dimensions are abbreviated to a single letter to represent the parameter for the corresponding dimension:
    • i = for item dimension
    • l = for location
    • s = for scenario
    • p = for period
    • m = for measure
    • ia1 = for item attribute 1 (ia2, etc...)
    • la1 = for location attribute 1 (la2, etc...)

Examples (if two item attributes are used for the expert rule):

A. Set the current scenario to the previously published scenario in the previous (1 prior) cycle period for this cycle, and for all other dimensions:

IBP_DB(cube="%previouscube(1)", s=%previouspublishedscenario)

is converted to:

DB(%previouscube(1), !%items, !%locations, !%periods, %previouspublishedscenario, !%measures, !%itemsA1, !%itemsA2)

B. Set the current period to the value from the previous (1 prior) period, for the same measure and dimensions:

IBP_DB(p="GETATTR(%periods,!%periods,1,'PreviousPeriod')")

is converted to:

DB(%cube, !%items, !%locations, GETATTR(%periods,!%periods,1,'PreviousPeriod'), !%scenarios, !%measures, !%itemsA1, !%itemsA2)

C. Set the current period to the value of the 1st child period, for the same measure and dimensions:

IBP_DB(p="DE.CHILDNAME(%periods, !%periods,1)")

is converted to:

DB(%cube, !%items, !%locations, DE.CHILDNAME(%periods, !%periods,1) ,!%scenarios, !%measures, !%itemsA1, !%itemsA2)

Note: Validation of the generated rule text occurs in OLAP and is reported using the audit log, based on the other expert rules.