Wednesday, May 4

WD4A-Format the Values appearing on value Axis of Business Graphic

Web Dynpro ABAP has a great feature  of displaying data in a graph. This is possible by using the Business Graphic UI element of web dynpro ABAP. There are various types of graphs possible. Some of them are bar, area, portfolio, point, column diagram, histogram etc. one beatifully created graph is shown in the image below.
There are mainly two things a developer has to know while creating a business graph. The series and the category. What appears on the X axis is called category and the what appears on the Y axis is called the series. There are two types of series in web dynpro ABAP viz simple series and complex series. When the developer knows what all values need to be plotted and exactly how many series will be required at the design time, simple series is used. In this post I will discuss simple series mainly.
The above shown graph is a stacked graph. There are various ways in a chart type can be represented. One important thing to notice in the above graph is the format of the Y Axis values. There is a property called format in the Y Axis or the value axis. When we specify a particular format, all values displayed on the Y axis are displayed in that format. How do we specify a format. To specify a format, there is a syntax. Ideally, Y Axis would have numbers. But due to specific requirements, text can be appended before and after the number.

This is how it can be done.
Put the free text in inverted commas. If you want to create space between the free text and the other text or the number, put spaces in the inverted commas after the free text. For example :

$Abs$Sep10" USD" gives the label 1234.5689 USD for a value of 1,234.56.


“The percentage value is “$Percent0.“ %“ gives the label The percentage value is 25 %.


Related Articles :

Basics of Web Dynpro ABAP
ABAP Data Types and Objects
ABAP Statements
WD4A - Topics to be covered in the upcoming posts
WD4A - Introduction
WDA - SAP Logon Procedures
WD4A-Navigate from one view to another and back to previous view
WD4A - How to Calculate next 12 months from current month in web dynpro ABAP
WD4A - Validate Inputs in a web dynpro ABAP Application

1 comment:

You are welcome to express your views here...