zoukankan      html  css  js  c++  java
  • ABAP

    在ABAP设计中,程序员经常需要用图形显示报表的统计结果,我们可以使用函数:GRAPH_MATRIX_3D来达到图形显示。
    GRAPH_MATRIX_3D函数参数很多,但只有三个参数必须需要输入:
    Table DATA
    The first field of table DATA must be a C field of any length. The number values must then be passed in one or more numeric fields. These fields can have type P or F.
    Table OPTS
    Table OPTS is used to pass all the options which can be changed interactively. Table OPTS must always be passed to the function module, but you can pass an empty table. In this case the default settings are used.
    One of the parameters COL1 to COL6
    Parameters COL1 to COL6 are used to pass column titles and they also define whether the corresponding table columns should be represented graphically. If a value which is not equal to SPACE is passed, then the corresponding column is represented.
    Make sure that at least one of these parameters is passed. A maximum of 6 columns can be represented.
    All other paramters are optional.

    样例代码:

    DATA: BEGIN OF itab_main OCCURS 0,
          dataname(15),
          quantity1 TYPE i,
          quantity2 TYPE i,
          quantity3 TYPE i,
          quantity4 TYPE i,
       END OF itab_main,
       BEGIN OF itab_options OCCURS 0,
          option(20),
       END OF itab_options.
    
    itab_main-dataname = 'Gas'.
    itab_main-quantity1 = 52.
    itab_main-quantity2 = 66.
    itab_main-quantity3 = 0.
    itab_main-quantity4 = 93.
    APPEND itab_main.
    
    itab_main-dataname = 'Electricity'.
    itab_main-quantity1 = 18.
    itab_main-quantity2 = 22.
    itab_main-quantity3 = 19.
    itab_main-quantity4 = 92.
    APPEND itab_main.
    
    itab_main-dataname = 'Fuel'.
    itab_main-quantity1 = 50.
    itab_main-quantity2 = 65.
    itab_main-quantity3 = 59.
    itab_main-quantity4 = 99.
    APPEND itab_main.
    
    CALL FUNCTION 'GRAPH_MATRIX_3D'
      EXPORTING
        col1   = '2001'
        col2   = '2002'
        col3   = '2003'
        col4   = '2004'
        titl   = 'Expenses - India(INR).'
      TABLES
        data   = itab_main
        opts   = itab_options
      EXCEPTIONS
        OTHERS = 1.

     通过测试,满不错的。通过函数,找到相应的函数组的其他函数,举一反三了如图。

  • 相关阅读:
    BZOJ_1002_[FJOI2007]_轮状病毒_(递推+高精)
    BZOJ_1001_狼抓兔子_(平面图求最小割+对偶图求最短路)
    BZOJ_1588_&_Codevs_1296_[HNOI2002]_营业额统计(平衡树/set)
    hdu3873 有约束条件的最短路
    尺取法 poj3061 poj3320
    费马小定理与欧拉公式
    uva 571 素数的性质
    uva10791 uva10780(分解质因数)
    勾股数组及其应用uva106
    hdu3501
  • 原文地址:https://www.cnblogs.com/ruingy/p/3453451.html
Copyright © 2011-2022 走看看