ABAP/4 Example Code: How to generate graph 3D by ABAP/4

We can generate graph 3D by applying function module ’GRAPH_3D’.

Example

DATA: BEGIN OF itab OCCURS 0,
        text(20) TYPE C,
        value1 TYPE i,
        value2 TYPE i,
        value3 TYPE i,
      END OF itab.
START-OF-SELECTION.
  itab-text = ’COL1’.
  itab-value1 = ’20’.
  itab-value2 = ’5’.
  itab-value3 = ’10’.
  APPEND itab.


itab-text = ’COL2’.
  itab-value1 = ’5’.
  itab-value2 = ’15’.
  itab-value3 = ’30’.
  APPEND itab.

itab-text = ’COL3’.
  itab-value1 = ’80’.
  itab-value2 = ’50’.
  itab-value3 = ’40’.
  APPEND itab.

itab-text = ’COL4’.
  itab-value1 = ’35’.
  itab-value2 = ’15’.
  itab-value3 = ’5’.
  APPEND itab.


CALL FUNCTION ’GRAPH_3D’
    EXPORTING
*     AUTO_CMD_1         = ’ ’
*     AUTO_CMD_2         = ’ ’
*     DIM1               = ’ ’
*     DIM2               = ’ ’
*     TYPE               = ’ ’
*     DISPLAY_TYPE       = ’ ’
*     INBUF              = ’ ’
*     INFORM             = ’ ’
*     MAIL_ALLOW         = ’ ’
*     PWDID              = ’ ’
*     SET_FOCUS          = ’x’
*     SO_CONTENTS        = ’ ’
*     SO_RECEIVER        = ’ ’
*     SO_SEND            = ’ ’
*     SO_TITLE           = ’ ’
*     STAT               = ’ ’
*     SUPER              = ’ ’
*     TIMER              = ’ ’
      TITL               = ’Testing graph 3D’
*     VALT               = ’ ’
*     WDID               = ’ ’
*     WINID              = ’ ’
*     WINPOS             = ’ ’
*     WINSZX             = ’50’
*     WINSZY             = ’50’
*     X_OPT              = ’ ’
*     NOTIFY             = ’ ’
*   IMPORTING
*     B_KEY              =
*     B_TYP              =
*     CUA_ID             =
*     MOD_COL            =
*     MOD_ROW            =
*     MOD_VAL            =
*     M_TYP              =
*     RBUFF              =
*     RWNID              =
    TABLES
      DATA               = itab
            .

The output is
img54

Post new comment