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

How to represent data in graphical form?

Former Member
0 Likes
725

Hello,

I am having some data in my table i want to represent that data in graphical form. please help me to achieve this.

Helpful answers will be rewarded with points.

Thks

Hello,

I am having some data in my table i want to represent that data in graphical form. please help me to achieve this.

Helpful answers will be rewarded with points.

Thks

4 REPLIES 4
Read only

Former Member
0 Likes
666

use FM GRAPH_MATRIX_3D / GRAPH_MATRIX_2D

to get graphs ... Pass your internal table values accordingly

to the FM..

Read only

Former Member
0 Likes
666
Read only

GauthamV
Active Contributor
0 Likes
666

hi,

check this sample program.copy paste in se38 and execute.

&----


*& Report ZGM_ALV_GRAPH *

*& *

&----


*& *

*& *

&----


REPORT ZGM_ALV_GRAPH .

*structure declaration for performance measurement

TYPES: BEGIN OF ty_performance,

COMPANY(15) TYPE C,

Q1 TYPE I,

Q2 TYPE I,

Q3 TYPE I,

Q4 TYPE I,

END OF TY_PERFORMANCE.

*STRUCTURE DECLARATION FOR OPTIONS TABLE

TYPES : BEGIN OF TY_OPTTABLE,

OPTIONS(30) TYPE C,

END OF TY_OPTTABLE.

*INTERNAL TABLE AND WORK AREA DECLARATIONS

DATA : IT_PERFORMANCE TYPE STANDARD TABLE OF TY_PERFORMANCE,

WA_PERFORMANCE TYPE TY_PERFORMANCE.

DATA : IT_OPTTABLE TYPE STANDARD TABLE OF TY_OPTTABLE,

WA_OPTTABLE TYPE TY_OPTTABLE.

*INITIALIZATION EVENT

INITIALIZATION.

*START OF SELECTION EVENT

START-OF-SELECTION.

*CLEARING THE WORK AREAS

CLEAR WA_PERFORMANCE.

CLEAR WA_OPTTABLE.

*APPENDING VALUES INTO THE PERFORMANCE INTERNAL TABLE

WA_PERFORMANCE-COMPANY = 'Company A'.

WA_PERFORMANCE-Q1 = 78.

WA_PERFORMANCE-Q2 = 68.

WA_PERFORMANCE-Q3 = 79.

WA_PERFORMANCE-Q4 = 80.

APPEND WA_PERFORMANCE TO IT_PERFORMANCE.

WA_PERFORMANCE-COMPANY = 'Company B'.

WA_PERFORMANCE-Q1 = 48.

WA_PERFORMANCE-Q2 = 68.

WA_PERFORMANCE-Q3 = 69.

WA_PERFORMANCE-Q4 = 70.

APPEND WA_PERFORMANCE TO IT_PERFORMANCE.

WA_PERFORMANCE-COMPANY = 'Company C'.

WA_PERFORMANCE-Q1 = 78.

WA_PERFORMANCE-Q2 = 48.

WA_PERFORMANCE-Q3 = 79.

WA_PERFORMANCE-Q4 = 85.

APPEND WA_PERFORMANCE TO IT_PERFORMANCE.

*APPENDING VALUES INTO THE OPTIONS INTERNAL TABLE

WA_OPTTABLE-OPTIONS = 'P3TYPE = TO'.

APPEND WA_OPTTABLE TO IT_OPTTABLE.

WA_OPTTABLE-OPTIONS = 'P2TYPE = VB'.

APPEND WA_OPTTABLE TO IT_OPTTABLE.

WA_OPTTABLE-OPTIONS = 'TISIZE = 1'.

APPEND WA_OPTTABLE TO IT_OPTTABLE.

*CALLING THE GRAPH FUNCTION MODULE

CALL FUNCTION 'GRAPH_MATRIX_3D'

EXPORTING

COL1 = 'Quarter 1'

COL2 = 'Quarter 2'

COL3 = 'Quarter 3'

COL4 = 'Quarter 4'

DIM1 = 'In Percentage%'

SET_FOCUS = 'X'

TITL = 'Company Performances'

TABLES

DATA = IT_PERFORMANCE

OPTS = IT_OPTTABLE

EXCEPTIONS

OTHERS = 1.

Read only

Former Member
0 Likes
666

Hello Gautam,

Thks for responding. I as i have mentioned in my above post i know how to present the data in graphical form when i am giving my data with in the program but here my requirement is I HAVE TO FETCH THE DATA FROM THE TABLE AND THAT DATA HAS TO BE REPRESENTED IN GRAPHICAL FORM NOT LIKE TAKING DATA WITH IN PROGRAM.

If you know how to fetch the data from the table and from the tht i have to display in graphical format. Waiting for your reply.

Thks