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: 

graph

kesavadas_thekkillath
Active Contributor
0 Kudos

is there any FM to get a linear chart graph.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

check this samle code it may be useful for you


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 = 255.
ITAB_DATA-QUANTITY2 = 262.
ITAB_DATA-QUANTITY3 = 259.
APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'House rent'.
ITAB_DATA-QUANTITY1 = 635.
ITAB_DATA-QUANTITY2 = 652.
ITAB_DATA-QUANTITY3 = 644.
APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Water'.
ITAB_DATA-QUANTITY1 = 78.
ITAB_DATA-QUANTITY2 = 82.
ITAB_DATA-QUANTITY3 = 89.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
     EXPORTING
          COL1        = 'Jan'
          COL2        = 'Feb'
          COL3        = 'Mar'
          TITL        = 'Expenses in INR'
     TABLES
          DATA        = ITAB_DATA
          OPTS        = ITAB_OPTIONS
     EXCEPTIONS
          OTHERS      = 1.

regards

shiba dutta

7 REPLIES 7

Former Member
0 Kudos

Hi,

check this link for a sample code using classes and methods

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-998...

Thanks

Naren

Former Member
0 Kudos

check this samle code it may be useful for you


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 = 255.
ITAB_DATA-QUANTITY2 = 262.
ITAB_DATA-QUANTITY3 = 259.
APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'House rent'.
ITAB_DATA-QUANTITY1 = 635.
ITAB_DATA-QUANTITY2 = 652.
ITAB_DATA-QUANTITY3 = 644.
APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Water'.
ITAB_DATA-QUANTITY1 = 78.
ITAB_DATA-QUANTITY2 = 82.
ITAB_DATA-QUANTITY3 = 89.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
     EXPORTING
          COL1        = 'Jan'
          COL2        = 'Feb'
          COL3        = 'Mar'
          TITL        = 'Expenses in INR'
     TABLES
          DATA        = ITAB_DATA
          OPTS        = ITAB_OPTIONS
     EXCEPTIONS
          OTHERS      = 1.

regards

shiba dutta

kesavadas_thekkillath
Active Contributor
0 Kudos

but i want a linear graph...for ex: cricket runrate display type....:-)

0 Kudos

Try FM GFW_PRES_SHOW

Regards,

Atish

0 Kudos

after running the program you can choose the option menu. There choose 2D option . You can see lot of things there just check with lines and stepped lines option may be useful.

regards

shiba dutta

Former Member
0 Kudos

Hi,

Check the Tcode GRAL here you will have the entire list of graphs.

Regards,

Harini.S