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_matrix_2d

Former Member
0 Likes
1,166

Hi,

I'm able to display my pie chart using the above FM.....but my requirement is can i have the column name and its value also to be displayed in the pie chart......for eg i've got a data internal table like

name value

x 10

y 20

Now my pie chart has two slices with name x and y.......i want the values of the x and y also to be displayed in the labels along with x and y(not in the pie but as labels for the individual slice.......)..........is it possible????

Please come up with some solution.........

5 REPLIES 5
Read only

Former Member
0 Likes
937

Check this code:

REPORT ytest_pie.

DATA: BEGIN OF data OCCURS 1,

text(36),

feld1 TYPE p,

END OF data,

BEGIN OF opts OCCURS 1,

c(80) TYPE c,

END OF opts,

BEGIN OF tyear OCCURS 1,

c(20) TYPE c,

END OF tyear.

opts-c = 'P2TYPE = PI'.

APPEND opts.

data-text = 'X 10'.

data-feld1 = '10'.

APPEND data.

data-text = 'Y 20'.

data-feld1 = '20'.

APPEND data.

CALL FUNCTION 'GRAPH_MATRIX_2D'

TABLES

data = data

opts = opts

tcol = tyear

EXCEPTIONS

col_invalid = 1

opt_invalid = 2

OTHERS = 3.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Read only

0 Likes
937

Hello together,

i had another qustion. Is it possible to draw more then one chart with GRAPH_MATRIX_2D in one frame. So that the use can choose between an pie or a bar chart.

Read only

0 Likes
937

Hi Gero,

if you want more than one 2d you can try with GRAPH_MATRIX function module. In the same frame you will not get. but you will get the push buttons.

For more things you can refer the demo program

GRBUSG_4

Regards,

Ramya R

Read only

0 Likes
937

Hi Ramya,

Do you mean the GRAPH_MATRIX_2D. Could you gave me an excample how i get the push buttons.....

But i want all the graphs inplace.... that would be the best

That would be awesome

Thanks


Gero

Read only

0 Likes
937

Hi Gero,

By using that function module you will get push buttons automatically.

so if you press 2d push button you will get 2D. if you press 3D you will get 3D frame,

If you press 4D you will get 4D frame display. please pass parameters to that function module

GRAPH_MATRIX , you will come to know. or else please check that demo program which i mentioned in earlier conversation.

regards,

Ramya R