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 :
STEP :4
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 !!
Good piece of information..Great explanation with proper scenario.
Thanks for sharing..
Keep up the good work!
Regards,
AL
Thx Anshu.
Will keep up the good work !!
Hi Ashutosh,
Its really helpful, thanks for sharing with screen shots.
Regards,
Giri
Hey Giri
Thx for the valuable comments.
I am glad that its helpful for you.
hi ashutosh,
thank for sharing your idea.
🙂
regards
Sandeep
Hey Sandeep,
Thanks.
Will post more interesting and useful documents.
Nice piece of Information Ashutosh..
Keep Exploring.
Hey Abdullah,
Thanks for your valuable comments and yes I will keep exploring.
Regards,
Ashu
Thank you Ashutosh. .That was some useful piece of information. I always wanted to know what this option did but never cared to try it out myself. 😛
Benedict
Hey Benedict,
Thx for the valuable comments.
And I am glad that you now know this piece of information through my document.
Will keep posting more useful information.
Regards,
Ashu
Hi Ashutosh,
Very neatly explained,,
Thanks for sharing.
BR
Prabhith
Thx prabhit for your kind words !!
Hi Ashutosh,
Very good explanation.
Please keep sharing and keep doing good work.
Bookmarked it.
Thanks
Hi Kamal,
Thanks for the appreciation. I will keep sharing new ideas with you guys.
Regards,
Ashu
Small and informative.
Thx
sree
Thanks sree for the valuable comments !!