Inserting Charts
Inserting Charts
It's a known fact that customers are very sensitive to the appeal of
charts. Creating graphical charts (bar, pie char, lines graphs) in
ABAP is simple. There are two main methods for creating charts in
ABAP
Using the class CL_GFW
Using the function module GFW_PRES_SHOW
There are also other classes and function modules derived from
these ones. Use transaction GRAL to explore all possibilities
provided by this class and this FM.
The following are two short examples of the huge potential of
function module GFW_PRES_SHOW :
* Contain the constants for the graph type
TYPE-POOLS: GFW.
DATA: VALUES
TYPE TABLE OF GPRVAL WITH HEADER LINE,
COLUMN_TEXTS TYPE TABLE OF GPRTXT WITH HEADER LINE.
REFRESH VALUES.
REFRESH COLUMN_TEXTS.
VALUES-ROWTXT = 'Salary'.
VALUES-VAL1 = 50000.
VALUES-VAL2 = 51000.
APPEND VALUES.
VALUES-ROWTXT = 'Life cost'.
VALUES-VAL1 = 49000.
VALUES-VAL2 = 51200.
APPEND VALUES.
COLUMN_TEXTS-COLTXT = '2003'.
APPEND COLUMN_TEXTS.
COLUMN_TEXTS-COLTXT = '2004'.
APPEND COLUMN_TEXTS.
* Call a chart into a standard container, this function could be used
for many
*
*
*
*
*
*
*
'Fun'.
'Cars'.
'House'.
'Services'.
'Others'.