Dynamically changing Amount format based on Currency Type in SAP Web Intelligence 4.2 Support Package 5
There are certain conditions where we would need to adjust the decimal places dynamically for the Amount field based upon the Currency type. I have discussed the solution for this problem in this blog post.
As per the requirement of my customer I had been asked to dynamically change the Decimal Places of Amount field displayed in a report based upon the Currency Type. By default, for all currency types the amount is displayed with two decimal places. But for the Currency type OMR, the amount needs to be displayed with three decimal places. I have attached the Screenshot of my problem below:
I have mentioned the solution for this problem in the below steps:
- Open the WEBI report in Design mode. Go to ‘Analysis’ tab → ‘Conditional’ sub tab → ‘New Rule…’. It will open the Formatting Rule Editor.
2. In Formatting Rule Editor, enter the Name, Description and select the Variable for which the Condition needs to be applied and enter the Condition.
3. Now click on format to give the formatting rule for the above condition. Click on Custom in Display option of Formatting Rules Dialog Box.
4. Now, enter the Three decimal Custom format, click Add and select OK.
5. Select the column ‘Amount’ on which the formatting rule is to be applied. In Formatting Rules select the rule to be applied.
6. Now Amount is displayed with the required decimal places depending on currency type.
Thus, the problem is rectified.
So, from this blog post you could have got an idea on how to format amount to the required decimal places for the respective currency type dynamically. Kindly post your comments and feedback about this blog post.
- ‘Conditional Formatting’ from the link provided below: https://wiki.scn.sap.com/wiki/display/BOBJ/Conditional+Formatting
Nice use case and useful information.