在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.
样例代码:
REPORT ZPR_Graphs.
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.
分享到:
相关推荐
ABAP - Keyword Documentation This documentation describes the syntax and meaning of the keywords of the ABAP language and its object-oriented part ABAP Objects. Alongside this, language frameworks ...
SAP方丈-ABAP-SAP增强应用实例
SAP方丈-ABAP-SAP增强应用实例.docx
简单来讲,SAPLINK就是用来导入和导出ABAP程序,等开发对象的一个开源分享项目的产物. 1.上载前置工具程序 导入SAPLINK需要使用ZSAPLINK_INSTALLER程序进行导入. TCode:SE38,新建名为ZSAPLINK_INSTALLER的程序. 2....
SAP-ABAP-OO-实现-CL-SALV-TABLE
SAP-ABAP-Certification-Review.pdf
ABAP-SAP的几种(代)出口类型 Web_dynpro-关于WEBDYNPRO的编程开发(一) ABAP-FOR ALL ENTRIES IN 注意点 ABAP-根据T-CODE找BADI ABAP-根据T-CODE找BAPI ABAP-UPLOAD文件时常用的数据转换 关于using和changing ...
ABAP-培训教材附录 ABAP-培训教材ABAP-培训教材ABAP-培训教材ABAP-培训教材
似乎是系统有Bug,或是其他原因,采购申请中的发布标识,在取消审批后,不能复原。
CD260-ABAP-in-Eclipse-开发-CN CD260-ABAP-in-Eclipse-开发-CNCD260-ABAP-in-Eclipse-开发-CNCD260-ABAP-in-Eclipse-开发-CN
CD262-调准你的定制化ABAP代码-–-为SAP-HANA做准备
SAP初探之ABAP-数据库对象 解释说明 在ABAP里面 面向对象的概念
eclipse-abap-keywordcolors eclipse-abap-关键字颜色
SAP资料集有ABAP-PP-MM-RFC-BAPI-JCO等.rar
SAP的开发工具ABAP-4学习资料. 主要是SAP的一些关键字的用法!
SAP中文教材全系列之:ABAP中文标准教材-BC400_ZH_Col63_FV_Part_A4 陆续更新中。
ABAP-exercises:在SAP ABAP开发环境中进行编程
1、解压后,支持直接导入ABAP 2、支持文本编辑器打开 3、如有不解之处,可以查阅文章:《金色传说:SAP-ABAP-IW21/IW22通知单保存增强:保存通知单时根据特殊条件创建新的事故通知单》或搜索公众号:SAPABAP金色传说
SAP ABAP-Dictionary_查询表结构和内容 实战技术
SAP-ABAP-IDOC使用材料资料.pdf