Skip to Content

Use of Interpret result as Boolean Value (True=1;False=0) in formula variable with an example

Scenario :

With this document i will be showing the functionality of  “Interpret result as Boolean Value (True=1;False=0)” in formula variable with a simple example .

The scenario is like below :

Requirement : To show in the output of the BEx report only paid invoices.

DSO Data :

ZINV_NO – Invoice No


ZINV_NO Master data :

As we can see below from the master data of “ZINV_NO” , there is a Paid indicator (display attribute of ZINV_NO) which tells us whether its an “open invoice” (with a blank space ” ” ) or a “paid invoice” (with the value “X”).


Follow the below steps to get only paid invoices amount in the output of BEx report based on the Paid Indicator(ZPAID):

STEP : 1

In the BEx query designer make a New formula(For Ex : Paid Amounts) and in that make a new formula variable with the following settings in the general tab :

Processing Type : Replacement Path

Reference characteristics : ZINV_NO


STEP : 2

Go to the replacement path tab and maintain the following settings:

Replace variable with : InfoObject

Replace with : Attrib. Value

Attribute : ZPAID

And select the checkbox “Interpret Result as Boolean Value(True=1; False=0)


STEP : 3

Now multiply this formula variable with the amount keyfigure from the infoprovider :



Just to check what this formula variable is bringing, make a separate NEW FORMULA ( For ex: Check) and just place this formula variable and also maintain AMOUNT keyfigure in the columns also just to get a better clarity of what is happening :


STEP : 5

Finally your BEx Query designer should look like this :


STEP : 6

Execute the report to see the output.


Explanation :

The formula variable : ZFOR_VAR_BOOL internally checks for the attribute “ZPAID” of “ZINV_NO”. The value of the formula variable is 0 when it does not find value(i.e. blank) for the attribute ZPAID and the value of the formula variable is 1 when it finds value(i.e. “X” in this case) for the attribute ZPAID.

Hope the above explanation was useful.

All comments and suggestion are welcome !!

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