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

Plot a Graph(Curve) based on values

Former Member
0 Likes
421

Hi all,

Below is my requirement.

In X-axis i have Year (Jan,Feb,.......Dec).

In Y-axis 3 different kind of values like below for each month.

No of error messages = 100

No of warning messages = 110

No of information messages = 200

Based on the above X & Y axis values, i need to plot a graph (3 curves, one for each message type).

Can someone help me.

Regards,

Venkat

2 REPLIES 2
Read only

Former Member
0 Likes
389

Hi ,

Please try this code

TYPES: BEGIN OF ty_graph,

company(15) TYPE c,

jan TYPE i,

feb TYPE i,

march TYPE i,

april TYPE i,

END OF ty_graph.

TYPES : BEGIN OF ty_opttable,

options(30) TYPE c,

END OF ty_opttable.

DATA: t_graph TYPE STANDARD TABLE OF ty_graph,

x_graph TYPE ty_graph.

DATA : t_opttable TYPE STANDARD TABLE OF ty_opttable,

x_opttable TYPE ty_opttable.

INITIALIZATION.

START-OF-SELECTION.

CLEAR x_graph.

CLEAR x_opttable.

x_graph-company = 'Error'.

x_graph-jan = 78.

x_graph-feb = 68.

x_graph-march = 79.

x_graph-april = 80.

APPEND x_graph TO t_graph.

x_graph-company = 'Warning'.

x_graph-jan = 48.

x_graph-feb = 68.

x_graph-march = 69.

x_graph-april = 70.

APPEND x_graph TO t_graph.

x_graph-company = 'Information'.

x_graph-jan = 78.

x_graph-feb = 48.

x_graph-march = 79.

x_graph-april = 85.

APPEND x_graph TO t_graph.

x_opttable-options = 'P2TYPE = TO'.

APPEND x_opttable TO t_opttable.

x_opttable-options = 'P2TYPE = VB'.

APPEND x_opttable TO t_opttable.

x_opttable-options = 'TISIZE = 1'.

APPEND x_opttable TO t_opttable.

CALL FUNCTION 'GRAPH_MATRIX_3D'

EXPORTING

col1 = 'January'

col2 = 'February'

col3 = 'March'

col4 = 'April'

dim1 = 'No in Percentage%'

set_focus = 'X'

titl = 'Quick Review of Messages'

TABLES

data = t_graph

opts = t_opttable

EXCEPTIONS

OTHERS = 1.

Read only

0 Likes
389

Hi Rahul,

Thanks. It's helpful.