‎2012 Dec 18 9:02 AM
HI every one..
i need to know how to create a graph in report program.
i tried FM graph 2d and 3d but all the graphs are displayed in a different screen popping out.
i want my graph in the report program itself,any answers would be really helpful.
‎2012 Dec 18 9:32 AM
‎2012 Dec 18 11:30 AM
Thanks a lot for your reply..
i checked out the program,but cant figure it out.
any other ways??
Thanks.,
Askar
‎2012 Dec 18 9:49 AM
hi ,
Check the following program it works,
*&---------------------------------------------------------------------*
*& Report ZS34
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZS34.
TYPES:
BEGIN OF ty_data,
reg_code(10) TYPE c,
val1 TYPE i,
val2 TYPE i,
val3 TYPE i,
END OF ty_data,
BEGIN OF ty_options,
options(30) TYPE c,
END OF ty_options.
*******************************************************************************
* D A T A D E C L A R A T I O N S *
*******************************************************************************
DATA: t_data TYPE STANDARD TABLE OF ty_data,
r_data TYPE ty_data.DATA : t_opt TYPE STANDARD TABLE OF ty_options,
r_opt TYPE ty_options.
*******************************************************************************
* S T A R T O F S E L E C T I O N *
*******************************************************************************
START-OF-SELECTION.
REFRESH : t_opt, t_data.
CLEAR : r_data, r_opt."* Populate the Data into the Core Data Tables (t_data)
r_data-reg_code = 'Asia Pacific'.
r_data-val1 = 55.
r_data-val2 = 65.
r_data-val3 = 75.
APPEND r_data TO t_data.
CLEAR r_data.
r_data-reg_code = 'Australia'.
r_data-val1 = 75.
r_data-val2 = 75.
r_data-val3 = 90.
APPEND r_data TO t_data.
CLEAR r_data.
r_data-reg_code = 'North America'.
r_data-val1 = 88.
r_data-val2 = 71.
r_data-val3 = 96.
APPEND r_data TO t_data.
*********************************************************************************
* O P T I O N S T A B L E *
* This parameter contains a table of display options. Setting the OPTS parameter*
* allows the ABAP program to determine the appearance of the generated graph. *
* Setting options in this table only determines the initial appearance of the *
* display. The online user is still free to reset these options once the display*
* appears on the monitor screen. *
* *
* Each element in the OPTS table is a string with the format: *
* OptionKey = Value *
*********************************************************************************
r_opt-options = 'P3TYPE = PY'. "PY Pyramids
APPEND r_opt TO t_opt.
r_opt-options = 'P2TYPE = VB'. "VB Vertical Bars
APPEND r_opt TO t_opt.
r_opt-options = 'TISIZE = 3'. "Main Title Size
APPEND r_opt TO t_opt.
* The function module GRAPH_MATRIX_3D calls a 3-dimensional SAP business graphic.
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
col1 = 'FY - Q1'
col2 = 'FY - Q2'
col3 = 'FY - Q3'
dim1 = 'In Percentage%'
set_focus = 'X'
titl = 'Region Wise Performances'
TABLES
data = t_data
opts = t_opt
EXCEPTIONS
OTHERS = 1.
hope it helps,
Vinoth
‎2012 Dec 18 11:19 AM
Thanks for your replies..
but,vinoth..when i execute dis program am not getting the chart on the report program,its being popped out in 'SAP business Graphics'.
that's what i don't want it to be..
any other solution??
‎2012 Dec 18 11:25 AM
hi askar,
Since the fm 'GRAPH_MATRIX_3D' is relatied to the BO it will get displayed in the popup.
There is no other way to bring graph in the report program Or module pool.
note : since the graph object is not the still image . it will be changing by input .
Hope it helps.
Vinoth .
‎2012 Dec 18 11:38 AM
‎2012 Dec 18 11:49 AM
yeah,thanks..
actually i have gone through that before,
since am at an early stage can't get through it..
Sorry..
any other ways??