STAT_GRAPH is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name STAT_GRAPH into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
STAT
Released Date:
19.01.1995
Processing type: Normal fucntion module
CALL FUNCTION 'STAT_GRAPH' "Call SAP Statistical Graphics
* EXPORTING
* agrid = SPACE " DO NOT USE
* auto_cmd_1 = SPACE " DO NOT USE
* auto_cmd_2 = SPACE " DO NOT USE
* clr_bgrd = SPACE " Color
* clr_fgrd = SPACE " Color
* clr_frame = SPACE " Color
* clr_grid = SPACE " Color
* clr_kord = SPACE " Color
* clr_lgdbgrd = SPACE " Color
* clr_lgdfgrd = SPACE " Color
* clr_lgdfram = SPACE " Color
* clr_lgdtext = SPACE " Color
* clr_text = SPACE " Color
* dmode = SPACE " Display mode (only for ATYPE: VAL and TIME)
* griddens = SPACE " Grid option : rough / fine
* griddisp = SPACE " Grid option : Line type
* gridtype = SPACE " Grid option : Grid type
* inbuf = SPACE " DO NOT USE
* inform = SPACE " Allows the selection of curves and points
* mail_allow = SPACE " Allow storage in SAPoffice = 'X'
* pwdid = SPACE " Dialog parameters
* scale = SPACE " Scaling mode
* set_focus = 'x' " Set focus during reload
* so_contents = SPACE " Subtitle of generated SAPoffice document
* so_receiver = SPACE " Recipient of generated SAPoffice object
* so_send = SPACE " Graphic storage in SAPoffice instead of display
* so_title = SPACE " Title of the generated SAPoffice document
* stat = SPACE " Dialog parameters
* stepx = SPACE " Increment for labeling the X axis
* stepy = SPACE " Increment for labeling the Y-axis
* super = SPACE " Dialog parameters
* taxis = SPACE " Text for the reference axis
* title = SPACE " Window title
* ttext = SPACE " Heading
* utext = SPACE " Heading subtitle
* valt = SPACE " Axis name
* winid = SPACE " Dialog parameters
* winpos = SPACE " Position of the statistics window (1..9)
* winszx = '50' " Size of the output window in X-direction (%)
* winszy = '50' " Size of the output window in Y-direction (%)
* xdecs = SPACE " Places behind the decimal point for labeling X-axis
* xrngl = 0 " Lower range for X-axis
* xrngu = 0 " Upper range for X-axis
* xtcks = SPACE " Number of subdivisions on the X-axis
* xyaxe = SPACE " Selection of the reference axis
* x_art = SPACE " Scaling type on the X-axis
* x_opt = SPACE " INTERNAL USE ONLY
* ydecs = SPACE " Places behind the decimal point for Y-axis labeling
* yrngl = 0 " Lower range for Y-axis
* yrngu = 0 " Upper range for Y-axis
* ytcks = SPACE " Number of subdivisions on the Y-axis
* y_art = SPACE " see X_ART
* zeroline = '1' " Switch zero line on/off
* zmode = SPACE " Reference axis subdivision
* y2rngl = 0 " Lower range for Y-axis / curve 2
* y2rngu = 0 " Upper range for Y-axis / curve 2
* y2tcks = SPACE " Number of intervals in Y-axis / curve 2
IMPORTING
cua_id = " CUA event
index = " selected curve point
kurve = " Selected curve
m_typ = " Dialog parameters
new_val = " New value during modification
rbuff = " DO NOT USE
rwnid = " Dialog parameters
s_typ = " Statistics message type
TABLES
data = " Data table
opts = " Options table
EXCEPTIONS
OUT_OF_RANGE = 1 "
. " STAT_GRAPH
The ABAP code below is a full code listing to execute function module STAT_GRAPH including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
| ld_cua_id | TYPE STRING , |
| ld_index | TYPE STRING , |
| ld_kurve | TYPE STRING , |
| ld_m_typ | TYPE STRING , |
| ld_new_val | TYPE STRING , |
| ld_rbuff | TYPE STRING , |
| ld_rwnid | TYPE STRING , |
| ld_s_typ | TYPE STRING , |
| it_data | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_data | LIKE LINE OF it_data , |
| it_opts | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_opts | LIKE LINE OF it_opts . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_cua_id | TYPE STRING , |
| ld_agrid | TYPE STRING , |
| it_data | TYPE STANDARD TABLE OF STRING , |
| wa_data | LIKE LINE OF it_data, |
| ld_index | TYPE STRING , |
| ld_auto_cmd_1 | TYPE STRING , |
| it_opts | TYPE STANDARD TABLE OF STRING , |
| wa_opts | LIKE LINE OF it_opts, |
| ld_kurve | TYPE STRING , |
| ld_auto_cmd_2 | TYPE STRING , |
| ld_m_typ | TYPE STRING , |
| ld_clr_bgrd | TYPE STRING , |
| ld_new_val | TYPE STRING , |
| ld_clr_fgrd | TYPE STRING , |
| ld_rbuff | TYPE STRING , |
| ld_clr_frame | TYPE STRING , |
| ld_rwnid | TYPE STRING , |
| ld_clr_grid | TYPE STRING , |
| ld_s_typ | TYPE STRING , |
| ld_clr_kord | TYPE STRING , |
| ld_clr_lgdbgrd | TYPE STRING , |
| ld_clr_lgdfgrd | TYPE STRING , |
| ld_clr_lgdfram | TYPE STRING , |
| ld_clr_lgdtext | TYPE STRING , |
| ld_clr_text | TYPE STRING , |
| ld_dmode | TYPE STRING , |
| ld_griddens | TYPE STRING , |
| ld_griddisp | TYPE STRING , |
| ld_gridtype | TYPE STRING , |
| ld_inbuf | TYPE STRING , |
| ld_inform | TYPE STRING , |
| ld_mail_allow | TYPE STRING , |
| ld_pwdid | TYPE STRING , |
| ld_scale | TYPE STRING , |
| ld_set_focus | TYPE STRING , |
| ld_so_contents | TYPE STRING , |
| ld_so_receiver | TYPE STRING , |
| ld_so_send | TYPE STRING , |
| ld_so_title | TYPE STRING , |
| ld_stat | TYPE STRING , |
| ld_stepx | TYPE STRING , |
| ld_stepy | TYPE STRING , |
| ld_super | TYPE STRING , |
| ld_taxis | TYPE STRING , |
| ld_title | TYPE STRING , |
| ld_ttext | TYPE STRING , |
| ld_utext | TYPE STRING , |
| ld_valt | TYPE STRING , |
| ld_winid | TYPE STRING , |
| ld_winpos | TYPE STRING , |
| ld_winszx | TYPE STRING , |
| ld_winszy | TYPE STRING , |
| ld_xdecs | TYPE STRING , |
| ld_xrngl | TYPE STRING , |
| ld_xrngu | TYPE STRING , |
| ld_xtcks | TYPE STRING , |
| ld_xyaxe | TYPE STRING , |
| ld_x_art | TYPE STRING , |
| ld_x_opt | TYPE STRING , |
| ld_ydecs | TYPE STRING , |
| ld_yrngl | TYPE STRING , |
| ld_yrngu | TYPE STRING , |
| ld_ytcks | TYPE STRING , |
| ld_y_art | TYPE STRING , |
| ld_zeroline | TYPE STRING , |
| ld_zmode | TYPE STRING , |
| ld_y2rngl | TYPE STRING , |
| ld_y2rngu | TYPE STRING , |
| ld_y2tcks | TYPE STRING . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name STAT_GRAPH or its description.