Application Development 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: 

Graphs in ABAP

Former Member
0 Kudos

Hi

All

I have one requirement that i have to plott two curves in one GRAPH .

One curve shows standard baby growth in months on X-axis and height on Y-axis.On the same graph

i have to show particular baby growth on the same X-axis and height on Y-axis in another curve.

Please help me regarding this.

Thanks and regards

Venkateswar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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 = 'Rice'.

ITAB_DATA-QUANTITY1 = 55.

ITAB_DATA-QUANTITY2 = 62.

ITAB_DATA-QUANTITY3 = 59.

APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Wheat'.

ITAB_DATA-QUANTITY1 = 35.

ITAB_DATA-QUANTITY2 = 52.

ITAB_DATA-QUANTITY3 = 44.

APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Sugar'.

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 = 'Quantity Consumed In KG.'

TABLES

DATA = ITAB_DATA

OPTS = ITAB_OPTIONS

EXCEPTIONS

OTHERS = 1.

7 REPLIES 7

Former Member
0 Kudos

Hi Venkat,

Check these documents:

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESGRA/BCFESGRA.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESGRA2/BCFESGRA2.pdf

Regards,

Chandra Sekhar

Edited by: Chandrasekhar Gandla on Sep 11, 2008 10:51 AM

GauthamV
Active Contributor
0 Kudos

hi,

use GRAL transaction.

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hi Venkatesh ,

Go though this link.

Regards

Former Member
0 Kudos

Hi,

We can go for Webdynpro ABAP or BSP for these graphs.

Go to SE80-> Webdynpro Interface-> create a New one.

Check out the standard applicaiton WDR_TEST_UI_ELEMENTS in SE80.

If you are using any table for this table or If you want to use the BAPI then make a service call for this BAPI.

To have a graph we use the Business Graphic UI element, Where category node is given as the X axis and Series is given as Y-Axis.

Check out his link -

http://help.sap.com/saphelp_nw70/helpdata/EN/42/e61cd068dc3ee4e10000000a1553f7/frameset.htm

Regards

Lekha

Former Member
0 Kudos

Hi

All

Actually i get one baby from selection-screen.Based on that selection screen baby i have to plot graph.

In that i have to plot two curves in one GRAPH .

One curve shows standard baby growth in months on X-axis and height on Y-axis.On the same graph

i have to show particular baby growth on the same X-axis and height on Y-axis in another curve.

Please help me regarding this.If any sample code is there please forward me .

Thanks and regards

Venkateswar

Former Member
0 Kudos

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 = 'Rice'.

ITAB_DATA-QUANTITY1 = 55.

ITAB_DATA-QUANTITY2 = 62.

ITAB_DATA-QUANTITY3 = 59.

APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Wheat'.

ITAB_DATA-QUANTITY1 = 35.

ITAB_DATA-QUANTITY2 = 52.

ITAB_DATA-QUANTITY3 = 44.

APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Sugar'.

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 = 'Quantity Consumed In KG.'

TABLES

DATA = ITAB_DATA

OPTS = ITAB_OPTIONS

EXCEPTIONS

OTHERS = 1.

Former Member
0 Kudos

Hi,

plz look into below code :

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 = 'Student1'.

ITAB_DATA-QUANTITY1 = 78.

ITAB_DATA-QUANTITY2 = 62.

ITAB_DATA-QUANTITY3 = 81.

APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Student2'.

ITAB_DATA-QUANTITY1 = 88.

ITAB_DATA-QUANTITY2 = 52.

ITAB_DATA-QUANTITY3 = 75.

APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Student3'.

ITAB_DATA-QUANTITY1 = 35.

ITAB_DATA-QUANTITY2 = 91.

ITAB_DATA-QUANTITY3 = 77.

APPEND ITAB_DATA.

CALL FUNCTION 'GRAPH_MATRIX_3D'

EXPORTING

COL1 = 'Jan'

COL2 = 'Feb'

COL3 = 'Mar'

TITL = 'Results of Class Xth.'

TABLES

DATA = ITAB_DATA

OPTS = ITAB_OPTIONS

EXCEPTIONS

OTHERS = 1.

thanx.