SAP Function Modules

STAT_GRAPH SAP Function module - Call SAP Statistical Graphics







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
Normal function module settings


Pattern for FM STAT_GRAPH - STAT GRAPH





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

ABAP code example for Function Module 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).

DATA:
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 .

DATA(ld_agrid) = 'some text here'.
DATA(ld_auto_cmd_1) = 'some text here'.
DATA(ld_auto_cmd_2) = 'some text here'.
DATA(ld_clr_bgrd) = 'some text here'.
DATA(ld_clr_fgrd) = 'some text here'.
DATA(ld_clr_frame) = 'some text here'.
DATA(ld_clr_grid) = 'some text here'.
DATA(ld_clr_kord) = 'some text here'.
DATA(ld_clr_lgdbgrd) = 'some text here'.
DATA(ld_clr_lgdfgrd) = 'some text here'.
DATA(ld_clr_lgdfram) = 'some text here'.
DATA(ld_clr_lgdtext) = 'some text here'.
DATA(ld_clr_text) = 'some text here'.
DATA(ld_dmode) = 'some text here'.
DATA(ld_griddens) = 'some text here'.
DATA(ld_griddisp) = 'some text here'.
DATA(ld_gridtype) = 'some text here'.
DATA(ld_inbuf) = 'some text here'.
DATA(ld_inform) = 'some text here'.
DATA(ld_mail_allow) = 'some text here'.
DATA(ld_pwdid) = 'some text here'.
DATA(ld_scale) = 'some text here'.
DATA(ld_set_focus) = 'some text here'.
DATA(ld_so_contents) = 'some text here'.
DATA(ld_so_receiver) = 'some text here'.
DATA(ld_so_send) = 'some text here'.
DATA(ld_so_title) = 'some text here'.
DATA(ld_stat) = 'some text here'.
DATA(ld_stepx) = 'some text here'.
DATA(ld_stepy) = 'some text here'.
DATA(ld_super) = 'some text here'.
DATA(ld_taxis) = 'some text here'.
DATA(ld_title) = 'some text here'.
DATA(ld_ttext) = 'some text here'.
DATA(ld_utext) = 'some text here'.
DATA(ld_valt) = 'some text here'.
DATA(ld_winid) = 'some text here'.
DATA(ld_winpos) = 'some text here'.
DATA(ld_winszx) = 'some text here'.
DATA(ld_winszy) = 'some text here'.
DATA(ld_xdecs) = 'some text here'.
DATA(ld_xrngl) = 'some text here'.
DATA(ld_xrngu) = 'some text here'.
DATA(ld_xtcks) = 'some text here'.
DATA(ld_xyaxe) = 'some text here'.
DATA(ld_x_art) = 'some text here'.
DATA(ld_x_opt) = 'some text here'.
DATA(ld_ydecs) = 'some text here'.
DATA(ld_yrngl) = 'some text here'.
DATA(ld_yrngu) = 'some text here'.
DATA(ld_ytcks) = 'some text here'.
DATA(ld_y_art) = 'some text here'.
DATA(ld_zeroline) = 'some text here'.
DATA(ld_zmode) = 'some text here'.
DATA(ld_y2rngl) = 'some text here'.
DATA(ld_y2rngu) = 'some text here'.
DATA(ld_y2tcks) = 'some text here'.

"populate fields of struture and append to itab
append wa_data to it_data.

"populate fields of struture and append to itab
append wa_opts to it_opts. . CALL FUNCTION 'STAT_GRAPH' * EXPORTING * agrid = ld_agrid * auto_cmd_1 = ld_auto_cmd_1 * auto_cmd_2 = ld_auto_cmd_2 * clr_bgrd = ld_clr_bgrd * clr_fgrd = ld_clr_fgrd * clr_frame = ld_clr_frame * clr_grid = ld_clr_grid * clr_kord = ld_clr_kord * clr_lgdbgrd = ld_clr_lgdbgrd * clr_lgdfgrd = ld_clr_lgdfgrd * clr_lgdfram = ld_clr_lgdfram * clr_lgdtext = ld_clr_lgdtext * clr_text = ld_clr_text * dmode = ld_dmode * griddens = ld_griddens * griddisp = ld_griddisp * gridtype = ld_gridtype * inbuf = ld_inbuf * inform = ld_inform * mail_allow = ld_mail_allow * pwdid = ld_pwdid * scale = ld_scale * set_focus = ld_set_focus * so_contents = ld_so_contents * so_receiver = ld_so_receiver * so_send = ld_so_send * so_title = ld_so_title * stat = ld_stat * stepx = ld_stepx * stepy = ld_stepy * super = ld_super * taxis = ld_taxis * title = ld_title * ttext = ld_ttext * utext = ld_utext * valt = ld_valt * winid = ld_winid * winpos = ld_winpos * winszx = ld_winszx * winszy = ld_winszy * xdecs = ld_xdecs * xrngl = ld_xrngl * xrngu = ld_xrngu * xtcks = ld_xtcks * xyaxe = ld_xyaxe * x_art = ld_x_art * x_opt = ld_x_opt * ydecs = ld_ydecs * yrngl = ld_yrngl * yrngu = ld_yrngu * ytcks = ld_ytcks * y_art = ld_y_art * zeroline = ld_zeroline * zmode = ld_zmode * y2rngl = ld_y2rngl * y2rngu = ld_y2rngu * y2tcks = ld_y2tcks IMPORTING cua_id = ld_cua_id index = ld_index kurve = ld_kurve m_typ = ld_m_typ new_val = ld_new_val rbuff = ld_rbuff rwnid = ld_rwnid s_typ = ld_s_typ TABLES data = it_data opts = it_opts EXCEPTIONS OUT_OF_RANGE = 1 . " STAT_GRAPH
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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 .

ld_agrid = 'some text here'.

"populate fields of struture and append to itab
append wa_data to it_data.
ld_auto_cmd_1 = 'some text here'.

"populate fields of struture and append to itab
append wa_opts to it_opts.
ld_auto_cmd_2 = 'some text here'.
ld_clr_bgrd = 'some text here'.
ld_clr_fgrd = 'some text here'.
ld_clr_frame = 'some text here'.
ld_clr_grid = 'some text here'.
ld_clr_kord = 'some text here'.
ld_clr_lgdbgrd = 'some text here'.
ld_clr_lgdfgrd = 'some text here'.
ld_clr_lgdfram = 'some text here'.
ld_clr_lgdtext = 'some text here'.
ld_clr_text = 'some text here'.
ld_dmode = 'some text here'.
ld_griddens = 'some text here'.
ld_griddisp = 'some text here'.
ld_gridtype = 'some text here'.
ld_inbuf = 'some text here'.
ld_inform = 'some text here'.
ld_mail_allow = 'some text here'.
ld_pwdid = 'some text here'.
ld_scale = 'some text here'.
ld_set_focus = 'some text here'.
ld_so_contents = 'some text here'.
ld_so_receiver = 'some text here'.
ld_so_send = 'some text here'.
ld_so_title = 'some text here'.
ld_stat = 'some text here'.
ld_stepx = 'some text here'.
ld_stepy = 'some text here'.
ld_super = 'some text here'.
ld_taxis = 'some text here'.
ld_title = 'some text here'.
ld_ttext = 'some text here'.
ld_utext = 'some text here'.
ld_valt = 'some text here'.
ld_winid = 'some text here'.
ld_winpos = 'some text here'.
ld_winszx = 'some text here'.
ld_winszy = 'some text here'.
ld_xdecs = 'some text here'.
ld_xrngl = 'some text here'.
ld_xrngu = 'some text here'.
ld_xtcks = 'some text here'.
ld_xyaxe = 'some text here'.
ld_x_art = 'some text here'.
ld_x_opt = 'some text here'.
ld_ydecs = 'some text here'.
ld_yrngl = 'some text here'.
ld_yrngu = 'some text here'.
ld_ytcks = 'some text here'.
ld_y_art = 'some text here'.
ld_zeroline = 'some text here'.
ld_zmode = 'some text here'.
ld_y2rngl = 'some text here'.
ld_y2rngu = 'some text here'.
ld_y2tcks = 'some text here'.

Contribute (Add Comments)

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.