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

graph

kesavadas_thekkillath
Active Contributor
0 Likes
844

is there any FM to get a linear chart graph.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
817

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
Read only

Former Member
0 Likes
817

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

Read only

Former Member
0 Likes
818

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

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
817

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

Read only

0 Likes
817

Try FM GFW_PRES_SHOW

Regards,

Atish

Read only

0 Likes
817

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

Read only

Former Member
0 Likes
817

Hi,

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

Regards,

Harini.S