-2

I want to draw comparative curve graphs

Oct 27, 2017 at 05:17 PM

69

Former Member

I want to draw comparative curve graphs using ABAP given in below format

graph.png (9.0 kB)

Sandra Rossi Oct 28, 2017 at 08:01 PM
1

With STAT_GRAPH_REF, each "curve" must have the same number of points. So, it's impossible to achieve your goal using this function module.

Instead, use STAT_GRAPH, which allows any number of points in each curve.

Show 3 Share
Former Member

Hi Sandra,

Is it possible to draw comparison curve graph using STAT_GRAPH as I have to draw actual curve and planned curve graph.

Former Member

I thought that my answer was clearly Yes.

So, to be more clear, if you want something like:

Then use a code like this one:

```DATA: OPTS TYPE TABLE OF char80,
BEGIN OF DATA OCCURS 1,
X TYPE I,
Y TYPE I,
END OF DATA.
APPEND '\$2     ' TO opts. " the 1st curve has 2 points
APPEND 'COLOR=5' TO opts. " MAGENTA
APPEND '\$3     ' TO opts. " the 2nd curve has 3 points
APPEND 'COLOR=4' TO opts. " GREEN
" the 1st curve has 2 points
data-x = 2. data-y = 4. APPEND data.
data-x = 4. data-y = 5. APPEND data.
" the 2nd curve has 3 points
data-x = 1. data-y = 8. APPEND data.
data-x = 3. data-y = 7. APPEND data.
data-x = 5. data-y = 4. APPEND data.
CALL FUNCTION 'STAT_GRAPH'
TABLES
opts = opts
data = data.```
rvmoi.png (14.8 kB)
Former Member