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

Draw graphics, circles

Former Member
0 Likes
1,285

Hi Guys,

I ahve a question in ABAP using graphics.

can we draw a circle, rectangle(a box) , arrows in ABAP.

My requierment is, we have certain products which we need to link with arrows and there are group of products which I need to put into circle or rectangle.

plz suggest..

regards,

Nazeer

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
987

Hi Nazeer,

use given below code & try to understand. Test run on your server.

DATA: BEGIN OF TAB OCCURS 5,

CLASS(10) TYPE C,

VAL1(2) TYPE I,

VAL2(2) TYPE I,

VAL3(2) TYPE I,

VAL4(2) TYPE I,

VAL5(2) TYPE I,

VAL6(2) TYPE I,

END OF TAB.

DATA: BEGIN OF OPTTAB OCCURS 1,

C(20),

END OF OPTTAB.

MOVE: 'anik' TO TAB-CLASS,

6 TO TAB-VAL1, 7 TO TAB-VAL2, 8 TO TAB-VAL3, 3 TO TAB-VAL4, 5 TO TAB-VAL5, 6 TO TAB-VAL6.

APPEND TAB.

CLEAR TAB.

MOVE: 'narendra' TO TAB-CLASS,

15 TO TAB-VAL1, 10 TO TAB-VAL2, 18 TO TAB-VAL3, 3 TO TAB-VAL4, 5 TO TAB-VAL5, 6 TO TAB-VAL6 .

APPEND TAB.

CLEAR TAB.

MOVE: 'gaurav' TO TAB-CLASS,

17 TO TAB-VAL1, 11 TO TAB-VAL2, 20 TO TAB-VAL3, 3 TO TAB-VAL4, 5 TO TAB-VAL5, 6 TO TAB-VAL6.

APPEND TAB.

CLEAR TAB.

MOVE: 'Kushagra' TO TAB-CLASS,

10 TO TAB-VAL1, 12 TO TAB-VAL2, 15 TO TAB-VAL3, 3 TO TAB-VAL4, 5 TO TAB-VAL5, 6 TO TAB-VAL6.

APPEND TAB.

OPTTAB = 'FIFRST = 3D'. APPEND OPTTAB.

OPTTAB = 'P2TYPE = TO'. APPEND OPTTAB.

OPTTAB = 'P3TYPE = PY'. APPEND OPTTAB.

OPTTAB = 'P3CTYP = RO'. APPEND OPTTAB.

OPTTAB = 'TISIZE = 5'. APPEND OPTTAB.

OPTTAB = 'CLBACK = X'. APPEND OPTTAB.

*CALL FUNCTION 'GRAPH_MATRIX_3D'

    • EXPORTING*

    • COL1 = 'monday'*

    • COL2 = 'tuesday'*

    • COL3 = 'wednesday'*

    • DIM2 = 'employees'*

    • DIM1 = 'months'*

    • TITL = 'Comparison of Employee attendace in different months.'*

    • TABLES*

    • DATA = TAB*

    • OPTS = OPTTAB*

    • EXCEPTIONS*

    • OTHERS = 1.*

CALL FUNCTION 'GRAPH_MATRIX_3D'

EXPORTING

COL1 = 'monday'

COL2 = 'tuesday'

COL3 = 'wednesday'

COL4 = 'thursday'

COL5 = 'friday'

COL6 = 'saturday'

DIM1 = 'week days'

DIM2 = 'employees'

TABLES

DATA = TAB

OPTS = OPTTAB.

LEAVE PROGRAM.

I hope it will help u a lot.

Regards,

Narendra

Hi Guys,

I ahve a question in ABAP using graphics.

can we draw a circle, rectangle(a box) , arrows in ABAP.

My requierment is, we have certain products which we need to link with arrows and there are group of products which I need to put into circle or rectangle.

plz suggest..

regards,

Nazeer

4 REPLIES 4
Read only

Former Member
0 Likes
987

Hi,

Where exactly u r trying to do ,in Reports or Forms or any..

Regards

Kumar

Read only

0 Likes
987

Hello Kumar,

It can be report or modulepool..

actually we are currently using Java for linking products ( eg: old product replaced by new prodcut, so link p1---> p2 ).

we need to remove java and use abap to link the products..

I need to know whether drawing circle , arrows possible in ABAP (can be a report , modulepoool program)

I see lot of posts in SDN using graphics methods in abap to draw bar charts etc. Is drawing circles, arrows possible in ABAP?

?

regards,

Nazeer

Read only

0 Likes
987

Hello Nazeer,

I have a similar requirement to that of yours,I tried many methods but could'nt find a suitable one.Can you please let me know the solution adapted by you.

Read only

Former Member
0 Likes
988

Hi Nazeer,

use given below code & try to understand. Test run on your server.

DATA: BEGIN OF TAB OCCURS 5,

CLASS(10) TYPE C,

VAL1(2) TYPE I,

VAL2(2) TYPE I,

VAL3(2) TYPE I,

VAL4(2) TYPE I,

VAL5(2) TYPE I,

VAL6(2) TYPE I,

END OF TAB.

DATA: BEGIN OF OPTTAB OCCURS 1,

C(20),

END OF OPTTAB.

MOVE: 'anik' TO TAB-CLASS,

6 TO TAB-VAL1, 7 TO TAB-VAL2, 8 TO TAB-VAL3, 3 TO TAB-VAL4, 5 TO TAB-VAL5, 6 TO TAB-VAL6.

APPEND TAB.

CLEAR TAB.

MOVE: 'narendra' TO TAB-CLASS,

15 TO TAB-VAL1, 10 TO TAB-VAL2, 18 TO TAB-VAL3, 3 TO TAB-VAL4, 5 TO TAB-VAL5, 6 TO TAB-VAL6 .

APPEND TAB.

CLEAR TAB.

MOVE: 'gaurav' TO TAB-CLASS,

17 TO TAB-VAL1, 11 TO TAB-VAL2, 20 TO TAB-VAL3, 3 TO TAB-VAL4, 5 TO TAB-VAL5, 6 TO TAB-VAL6.

APPEND TAB.

CLEAR TAB.

MOVE: 'Kushagra' TO TAB-CLASS,

10 TO TAB-VAL1, 12 TO TAB-VAL2, 15 TO TAB-VAL3, 3 TO TAB-VAL4, 5 TO TAB-VAL5, 6 TO TAB-VAL6.

APPEND TAB.

OPTTAB = 'FIFRST = 3D'. APPEND OPTTAB.

OPTTAB = 'P2TYPE = TO'. APPEND OPTTAB.

OPTTAB = 'P3TYPE = PY'. APPEND OPTTAB.

OPTTAB = 'P3CTYP = RO'. APPEND OPTTAB.

OPTTAB = 'TISIZE = 5'. APPEND OPTTAB.

OPTTAB = 'CLBACK = X'. APPEND OPTTAB.

*CALL FUNCTION 'GRAPH_MATRIX_3D'

    • EXPORTING*

    • COL1 = 'monday'*

    • COL2 = 'tuesday'*

    • COL3 = 'wednesday'*

    • DIM2 = 'employees'*

    • DIM1 = 'months'*

    • TITL = 'Comparison of Employee attendace in different months.'*

    • TABLES*

    • DATA = TAB*

    • OPTS = OPTTAB*

    • EXCEPTIONS*

    • OTHERS = 1.*

CALL FUNCTION 'GRAPH_MATRIX_3D'

EXPORTING

COL1 = 'monday'

COL2 = 'tuesday'

COL3 = 'wednesday'

COL4 = 'thursday'

COL5 = 'friday'

COL6 = 'saturday'

DIM1 = 'week days'

DIM2 = 'employees'

TABLES

DATA = TAB

OPTS = OPTTAB.

LEAVE PROGRAM.

I hope it will help u a lot.

Regards,

Narendra