ABAP-3D graphs with SAP

Source: Internet
Author: User

In the ABAP design, programmers often need to use graphs to display the statistical results of reports. We can use the function graph_matrix_3d to display graphs.
Graph_matrix_3d functions have many parameters, but only three parameters must be input:
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 shoshould 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.

Sample Code:

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 '.
The ITAB_MAIN-QUANTITY1 = 52.
ITAB_MAIN-QUANTITY2 = 66.
ITAB_MAIN-QUANTITY3 = 0.
The ITAB_MAIN-QUANTITY4 = 93.
Append itab_main.

ITAB_MAIN-DATANAME = 'atomicity '.
ITAB_MAIN-QUANTITY1 = 18.
The ITAB_MAIN-QUANTITY2 = 22.
ITAB_MAIN-QUANTITY3 = 19.
The ITAB_MAIN-QUANTITY4 = 92.
Append itab_main.

ITAB_MAIN-DATANAME = 'fuel '.
ITAB_MAIN-QUANTITY1 = 50.
ITAB_MAIN-QUANTITY2 = 65.
ITAB_MAIN-QUANTITY3 = 59.
The ITAB_MAIN-QUANTITY4 = 99.
Append itab_main.

Call function 'graph _ matrix_3d'
Exporting
Col1 = '000000'
Col2 = '000000'
Col3 = '20140901'
Col4 = '000000'
Titl = 'expenses-India (INR ).'
Tables
Data = itab_main
Opts = itab_options
Exceptions
Others = 1.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.