2007 Nov 28 4:38 AM
Hello friends,
I would like to know the name of standard function modules used to get bar graph and line chart graph on execution of report and both the output in the same page.
Please advice me on this issue.
Regards
Ashish
Hello friends,
I would like to know the name of standard function modules used to get bar graph and line chart graph on execution of report and both the output in the same page.
Please advice me on this issue.
Regards
Ashish
2007 Nov 28 4:41 AM
Hi Ashish,
<b>GRAPH_MATRIX_3D</b> is the function module to draw chart / bar
Check this link for sample code
http://www.sap-img.com/abap/creating-chart-in-abap.htm
Check this link for parameters explanation about the function module
http://help.sap.com/saphelp_nw04/helpdata/en/52/67088e439b11d1896f0000e8322d00/content.htm
Thanks,
Vinay
2007 Nov 28 4:47 AM
Hi,
Use thiese
GRAPH_MATRIX Calling up SAP Business Graphics (2D, 3D and 4D)
GRAPH_MATRIX_2D Calling up the 2D graphics (user-friendly version)
GRAPH_MATRIX_3D Structure of 3D graphics (user-friendly version)
GRAPH_MATRIX_4D Calling up a 3D graphic (4th dimension stacked representation)
Regards,
Prashant
2007 Nov 28 11:47 AM
hi,
REPORT Z_GRAPH.
DATA: BEGIN OF ITAB_DATA OCCURS 0,
DATANAME(15),
QUANTITY1 TYPE I,
QUANTITY2 TYPE I,
QUANTITY3 TYPE I,
END OF ITAB_DATA,
BEGIN OF ITAB_OPTIONS OCCURS 0,
OPTION(20),
END OF ITAB_OPTIONS.
ITAB_DATA-DATANAME = 'Electricity'.
ITAB_DATA-QUANTITY1 = 55.
ITAB_DATA-QUANTITY2 = 62.
ITAB_DATA-QUANTITY3 = 59.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Gas'.
ITAB_DATA-QUANTITY1 = 35.
ITAB_DATA-QUANTITY2 = 52.
ITAB_DATA-QUANTITY3 = 44.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Water'.
ITAB_DATA-QUANTITY1 = 18.
ITAB_DATA-QUANTITY2 = 22.
ITAB_DATA-QUANTITY3 = 19.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
COL1 = 'Jan'
COL2 = 'Feb'
COL3 = 'Mar'
TITL = 'Utility Expenses in Rs.'
TABLES
DATA = ITAB_DATA
OPTS = ITAB_OPTIONS
EXCEPTIONS
OTHERS = 1.
2007 Nov 28 12:00 PM
Hi,
Just copy paste this program and execute, u will be understand easily. After pressing F8 it opens SAP Business Graphics
REPORT Z_GRAPH.
DATA: BEGIN OF ITAB_DATA OCCURS 0,
DATANAME(15),
QUANTITY1 TYPE I,
QUANTITY2 TYPE I,
QUANTITY3 TYPE I,
END OF ITAB_DATA,
BEGIN OF ITAB_OPTIONS OCCURS 0,
OPTION(20),
END OF ITAB_OPTIONS.
ITAB_DATA-DATANAME = 'Electricity'.
ITAB_DATA-QUANTITY1 = 55.
ITAB_DATA-QUANTITY2 = 62.
ITAB_DATA-QUANTITY3 = 59.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Gas'.
ITAB_DATA-QUANTITY1 = 35.
ITAB_DATA-QUANTITY2 = 52.
ITAB_DATA-QUANTITY3 = 44.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Water'.
ITAB_DATA-QUANTITY1 = 18.
ITAB_DATA-QUANTITY2 = 22.
ITAB_DATA-QUANTITY3 = 19.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
COL1 = 'Jan'
COL2 = 'Feb'
COL3 = 'Mar'
TITL = 'Utility Expenses in US$.'
TABLES
DATA = ITAB_DATA
OPTS = ITAB_OPTIONS
EXCEPTIONS
OTHERS = 1.
Reward if helpful.
Regards,
Karthick.
2007 Nov 29 4:20 PM
Hi,
if you want to see the chart as part of the dynpro you should ignore the old GRAPH* function modules and look at the chart engine instead!
Look at the demo report GRAPHICS_GUI_CE_DEMO. And if you are interested in more features of the chart engine just download the SAP Chart Designer from SDN - Downloads - WebAS.
Regards, Kai
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |