“I would like to explain about a simple report program to display graphics. The SAP Graphics can be used for various business purposes”.
In this article I am explaining about a simple Sales analysis on a yearly basis.
*&---------------------------------------------------------------------*
*& Report ZGRAPH_TEST
*&
*&---------------------------------------------------------------------*
REPORT ZGRAPH_TEST.
DATA: BEGIN OF TAB OCCURS 5,
CLASS(5) TYPE C,
VAL1(2) TYPE I,
VAL2(2) TYPE I,
VAL3(2) TYPE I,
END OF TAB.
DATA: BEGIN OF OPTTAB OCCURS 1,
C(20),
END OF OPTTAB.
MOVE: 'fan' TO TAB-CLASS,
12 TO TAB-VAL1, 8 TO TAB-VAL2, 15 TO TAB-VAL3.
APPEND TAB.
CLEAR TAB.
MOVE: 'cool' TO TAB-CLASS,
15 TO TAB-VAL1, 10 TO TAB-VAL2, 18 TO TAB-VAL3.
APPEND TAB.
CLEAR TAB.
MOVE: 'DA' TO TAB-CLASS,
17 TO TAB-VAL1, 11 TO TAB-VAL2, 20 TO TAB-VAL3.
APPEND TAB.
CLEAR TAB.
OPTTAB = 'FIFRST = 3D'. APPEND OPTTAB. "// Grafik-Typ
OPTTAB = 'P3TYPE = TO'. APPEND OPTTAB. "// Objektart
OPTTAB = 'P3CTYP = RO'. APPEND OPTTAB. "// Farben der Objekte
OPTTAB = 'TISIZE = 2'. APPEND OPTTAB. "// Haupttitelgröße
OPTTAB = 'CLBACK = X'. APPEND OPTTAB. "// Background Color
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
COL1 = '1997'
COL2 = '1998'
COL3 = '1999'
DIM2 = 'Products'
DIM1 = 'Years'
TITL = 'Sales In Rs. Crores'
TABLES
DATA = TAB
OPTS = OPTTAB
EXCEPTIONS
OTHERS = 1.
LEAVE PROGRAM.
Results :
Click on Overview for detailed view.
To display more detail view.
No comments:
Post a Comment