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

SAP graph using GRAPH_MATRIX_2D or GRAPH_2D

Former Member
0 Likes
1,152

Hi all,

I have created a basic 2D graph using GRAPH_MATRIX_2D but could just have easily used GRAPH_2D as I have not used any of the additional functionality. The graph is almost exactly apart from that i would like to change some of the columns to be a differnet colur. i.e. if the value is over a certain percentage i want them to be red instead of blue! Is this possible using this family of function modules or am i going to have to call apon a differnt technique altogether. Any ideas?

Regards

Mart

4 REPLIES 4
Read only

Former Member
0 Likes
878

If it is not possible using this method what method would people recoment to best develop this solution?

Regards

Mart

Read only

0 Likes
878

You can get lot of examples about SAP graphics using GRAL transaction.

Read only

Former Member
0 Likes
878

REPORT  ZGRAPHS_3D.
TYPES: BEGIN OF ttab_data,
        dataname(15),
        quantity1 TYPE i,
        quantity2 TYPE i,
        quantity3 TYPE i,
       END OF ttab_data.

TYPES: BEGIN OF ttab_options,
        option(20),
       END OF ttab_options.

DATA: itab_data TYPE TABLE OF ttab_data,
      xtab_data LIKE LINE OF itab_data.

DATA: itab_options TYPE TABLE OF ttab_options,
      xtab_options LIKE LINE OF itab_options.

xtab_data-dataname = 'Screws'.
xtab_data-quantity1 = 5500.
xtab_data-quantity2 = 6200.
xtab_data-quantity3 = 5900.
APPEND xtab_data TO itab_data.

xtab_data-dataname = 'Nails'.
xtab_data-quantity1 = 3500.
xtab_data-quantity2 = 5200.
xtab_data-quantity3 = 4400.
APPEND xtab_data TO itab_data.

xtab_data-dataname = 'Nuts'.
xtab_data-quantity1 = 1800.
xtab_data-quantity2 = 2200.
xtab_data-quantity3 = 1900.
APPEND xtab_data TO itab_data.

xtab_data-dataname = 'Fastners'.
xtab_data-quantity1 = 5500.
xtab_data-quantity2 = 6200.
xtab_data-quantity3 = 5900.
APPEND xtab_data TO itab_data.

xtab_data-dataname = 'Bolts'.
xtab_data-quantity1 = 3500.
xtab_data-quantity2 = 5200.
xtab_data-quantity3 = 4400.
APPEND xtab_data TO itab_data.

xtab_data-dataname = 'Clamps'.
xtab_data-quantity1 = 1800.
xtab_data-quantity2 = 2200.
xtab_data-quantity3 = 1900.
APPEND xtab_data TO itab_data.

xtab_data-dataname = 'Hand Tools'.
xtab_data-quantity1 = 5500.
xtab_data-quantity2 = 6200.
xtab_data-quantity3 = 5900.
APPEND xtab_data TO itab_data.

xtab_data-dataname = 'Saws'.
xtab_data-quantity1 = 3500.
xtab_data-quantity2 = 5200.
xtab_data-quantity3 = 4400.
APPEND xtab_data TO itab_data.

xtab_data-dataname = 'Jigs'.
xtab_data-quantity1 = 1800.
xtab_data-quantity2 = 2200.
xtab_data-quantity3 = 1900.
APPEND xtab_data TO itab_data.


CALL FUNCTION 'GRAPH_MATRIX_3D'
  EXPORTING
    titl = 'Usage in $'
    col1 = 'Materials'
  TABLES
    data = itab_data
    opts = itab_options.


Read only

0 Likes
878

Thanks for the code and the transaction but unfortunately neither of these show me how to specifically set the colour of an individual row. I.e to have the first 2 blue then the last 3 red etc.

Regards

Mart