2012 Jul 18 5:38 AM
Hi Experts,
I have created a ABAP PI Chart Report With the Function Module 'GRAPH_2D'.
Coding :
DATA: BEGIN OF i_tab OCCURS 0,
name(20) TYPE c,
value TYPE p,
END OF i_tab.
i_tab-name = 'Trucks Ordered'.
i_tab-value = '90'.
APPEND i_tab.
CLEAR i_tab.
i_tab-name = 'Trucks Placed'.
i_tab-value = '30'.
APPEND i_tab.
CLEAR i_tab.
i_tab-name = 'Closing for Balance'.
i_tab-value = '27'.
APPEND i_tab.
CLEAR i_tab.
CALL FUNCTION 'GRAPH_2D'
EXPORTING
type = 'PI'
titl = 'My Graph'
TABLES
data = i_tab
EXCEPTIONS
gui_refuse_graphic = 1
OTHERS = 2.
IF sy-subrc EQ 0.
ENDIF.
The Output I get is, the below Report using Business Graphics,
But, the Output I require i like the report below,
Thanks,
Shankar
2012 Jul 18 6:01 AM
Hi Shankar,
Instead of GRAPH_2D function module pls try with
CALL FUNCTION 'GRAPH_MATRIX_2D'
EXPORTING
TITL = TITLE
VALT = 'DM'
NROW = 2D_ROW
MAIL_ALLOW = 'X'
TABLES
DATA = DATA
OPTS = OPTS
TCOL = TYEAR.
Please Refer the DEMO Program GRBUSG_3 (LINE GRAPHICS) For Better understanding.
Regards,
Ramya R
Hi Shankar,
Instead of GRAPH_2D function module pls try with
CALL FUNCTION 'GRAPH_MATRIX_2D'
EXPORTING
TITL = TITLE
VALT = 'DM'
NROW = 2D_ROW
MAIL_ALLOW = 'X'
TABLES
DATA = DATA
OPTS = OPTS
TCOL = TYEAR.
Please Refer the DEMO Program GRBUSG_3 (LINE GRAPHICS) For Better understanding.
Regards,
Ramya R
2012 Jul 18 6:01 AM
Hi Shankar,
Instead of GRAPH_2D function module pls try with
CALL FUNCTION 'GRAPH_MATRIX_2D'
EXPORTING
TITL = TITLE
VALT = 'DM'
NROW = 2D_ROW
MAIL_ALLOW = 'X'
TABLES
DATA = DATA
OPTS = OPTS
TCOL = TYEAR.
Please Refer the DEMO Program GRBUSG_3 (LINE GRAPHICS) For Better understanding.
Regards,
Ramya R
2012 Jul 18 6:20 AM
Hi Ramya,
Yep, I got it Ramya. But, I get the Ouput as the Bar Char, But, I need it as PI Chart.
Thanks,
Shankar
2012 Jul 18 6:31 AM
Hi Shankar,
Please Refer the DEMO Program GRBUSG_3 (LINE GRAPHICS). In that the sample code is there for your requirement.
Regards,
Ramya R
2012 Jul 18 6:27 AM
http://wiki.sdn.sap.com/wiki/display/Snippets/Creating+charts+in+Simple+ABAP+Programs
This link may be helpful For You.
2012 Jul 18 8:17 AM
Hi Shankar,
Try FM GRAPH_MATRIX_2D
opts-c = 'P2TYPE = PI'.
APPEND opts.
opts-c = 'P2PCNT = X'.
APPEND opts.
CALL FUNCTION 'GRAPH_MATRIX_2D'
EXPORTING
titl = 'My Graph'
TABLES
data = i_tab
opts = opts
tcol = i_tcol
EXCEPTIONS
col_invalid = 1
opt_invalid = 2
OTHERS = 3.
Regards,
Ravi.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |