Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Graphs in ABAP

Former Member
0 Likes
1,036

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

5 REPLIES 5
Read only

Former Member
0 Likes
854

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

Read only

former_member386202
Active Contributor
0 Likes
854

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

Read only

Former Member
0 Likes
854

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.

Read only

Former Member
0 Likes
854

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.

Read only

kai_gutenkunst
Product and Topic Expert
Product and Topic Expert
0 Likes
854

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