SAP Function Modules

GRAPH_HIERARCHY SAP Function module - Call up hierarchy graphics







GRAPH_HIERARCHY 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 GRAPH_HIERARCHY into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: HIER
Released Date: 19.01.1995
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM GRAPH_HIERARCHY - GRAPH HIERARCHY





CALL FUNCTION 'GRAPH_HIERARCHY' "Call up hierarchy graphics
* EXPORTING
*   boxln = SPACE               "               Node width
*   col11 = SPACE               "               Color 1 of key figure 1
*   col12 = SPACE               "               Color 2 of key figure 1
*   col13 = SPACE               "               Color 3 of key figure 1
*   col14 = SPACE               "               Color 4 of key figure 1
*   col15 = SPACE               "               Color 5 of key figure 1
*   col16 = SPACE               "               Color 6 of key figure 1
*   col21 = SPACE               "               Color 1 of key figure 2
*   col22 = SPACE               "               Color 2 of key figure 2
*   col23 = SPACE               "               Color 3 of key figure 2
*   col24 = SPACE               "               Color 4 of key figure 2
*   col25 = SPACE               "               Color 5 of key figure 2
*   col26 = SPACE               "               Color 6 of key figure 2
*   col31 = SPACE               "               Color 1 of key figure 3
*   col32 = SPACE               "               Color 2 of key figure 3
*   col33 = SPACE               "               Color 3 of key figure 3
*   col34 = SPACE               "               Color 4 of key figure 3
*   col35 = SPACE               "               Color 5 of key figure 3
*   col36 = SPACE               "               Color 6 of key figure 3
*   col_back = SPACE            "               Background color
*   col_line = SPACE            "               Line color
*   col_node = SPACE            "               Default node color
*   conf = SPACE                "               Demand during manipulation
*   dmode = SPACE               "               Display mode for hierarchy graphic
*   inbuf = SPACE               "               DO NOT USE
*   lmode = SPACE               "               Line type
*   mail_allow = SPACE          "               Allow storage in SAPoffice = 'X'
*   menpos = SPACE              "               Position of the pop-up menu
*   modif = SPACE               "               Activates extended hierarchy processing
*   mtitl = SPACE               "               Menu title
*   ndims = SPACE               "               3-dimensional highlighting of pushbutton
*   nlook = SPACE               "               Color display type
*   nlval = SPACE               "               defines NLOOK = '7'
*   ntext = SPACE               "               Text color on the hierarchy elements
*   ntxhl = SPACE               "               Text color of the selected hierarchy elements
*   order = SPACE               "               Sequence definition
*   pwdid = SPACE               "               Standard dialog parameters
*   region = SPACE              "               Switch on fastpath for menu
*   relboxht = 0                "
*   relboxwd = 0                "
*   relwd_ht = 0                "
*   rmode = SPACE               "               Initial rotation
*   set_focus = 'x'             "               Set focus during reload
*   shape = SPACE               "               Node form
*   smode = SPACE               "               Size of the hierarchy
*   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
*   super = SPACE               "               Dialog parameters
*   tindx = SPACE               "               Node labeling
*   ttext = SPACE               "               Title of the hierarchy graphic
*   usehle = SPACE              "               Display menu as help line
*   u_command = SPACE           "               Single command to hierarchy : Command
*   u_node_2 = SPACE            "               Single command to hierarchy : Node ID 2
*   u_node_id = SPACE           "               Single command to hierarchy : Node ID
*   u_text = SPACE              "               Single command to hierarchy : Node text
*   u_val1 = 0                  "               Single command to hierarchy : key figure 1
*   u_val2 = 0                  "               Single command to hierarchy : key figure 2
*   u_val3 = 0                  "               Single command to hierarchy : key figure 3
*   u_val_count = 0             "               Single command to hierarchy : Number of threshold values
*   val11 = 0                   "               Threshold value 1 of key figure 1
*   val12 = 0                   "               Threshold value 2 of key figure 1
*   val13 = 0                   "               Threshold value 3 of key figure 1
*   val14 = 0                   "               Threshold value 4 of key figure 1
*   val15 = 0                   "               Threshold value 5 of key figure 1
*   val21 = 0                   "               Threshold value 1 of key figure 2
*   val22 = 0                   "               Threshold value 2 of key figure 2
*   val23 = 0                   "               Threshold value 3 of key figure 2
*   val24 = 0                   "               Threshold value 4 of key figure 2
*   val25 = 0                   "               Threshold value 5 of key figure 2
*   val31 = 0                   "               Threshold value 1 of key figure 3
*   val32 = 0                   "               Threshold value 2 of key figure 3
*   val33 = 0                   "               Threshold value 3 of key figure 3
*   val34 = 0                   "               Threshold value 4 of key figure 3
*   val35 = 0                   "               Threshold value 5 of key figure 3
*   vald1 = 0                   "               Minimum value of key figure 1
*   vald2 = 0                   "               Minimum value of key figure 2
*   vald3 = 0                   "               Minimum value of key figure 3
*   valu1 = 100                 "               Maximum value of key figure 1
*   valu2 = 100                 "               Maximum value of key figure 2
*   valu3 = 100                 "               Maximum value of key figure 3
*   vindx = SPACE               "               Active key figure
*   vtxt1 = SPACE               "               Description of key figure 1
*   vtxt2 = SPACE               "               Description of key figure 2
*   vtxt3 = SPACE               "               Description of key figure 3
*   winid = SPACE               "               Dialog parameters
*   winpos = SPACE              "
*   winszx = '50'               "
*   winszy = '50'               "
*   x_opt = SPACE               "               Extended options
*   zoomfac = 0                 "
  IMPORTING
    cua_id =                    "               CUA event
    h_mes =                     "               Hierarchy message : Message type
    h_node_2 =                  "               Hierarchy message : Node ID 2
    h_text =                    "               Hierarchy message : Node text
    h_val1 =                    "               Hierarchy message : key figure 1
    h_val2 =                    "               Hierarchy message : key figure 2
    h_val3 =                    "               Hierarchy message : key figure 3
    h_valcount =                "               Hierarchy message : Number of key figures
    mennr =                     "               Menu number
    m_typ =                     "               Dialog parameters
    nodes =                     "               ID of the selected element
    rbuff =                     "               DO NOT USE
    rwnid =                     "               Dialog parameters
  TABLES
    data =                      "               Internal table of the data
    .  "  GRAPH_HIERARCHY

ABAP code example for Function Module GRAPH_HIERARCHY





The ABAP code below is a full code listing to execute function module GRAPH_HIERARCHY 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_h_mes  TYPE STRING ,
ld_h_node_2  TYPE STRING ,
ld_h_text  TYPE STRING ,
ld_h_val1  TYPE STRING ,
ld_h_val2  TYPE STRING ,
ld_h_val3  TYPE STRING ,
ld_h_valcount  TYPE STRING ,
ld_mennr  TYPE STRING ,
ld_m_typ  TYPE STRING ,
ld_nodes  TYPE STRING ,
ld_rbuff  TYPE STRING ,
ld_rwnid  TYPE STRING ,
it_data  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_data  LIKE LINE OF it_data .

DATA(ld_boxln) = 'some text here'.
DATA(ld_col11) = 'some text here'.
DATA(ld_col12) = 'some text here'.
DATA(ld_col13) = 'some text here'.
DATA(ld_col14) = 'some text here'.
DATA(ld_col15) = 'some text here'.
DATA(ld_col16) = 'some text here'.
DATA(ld_col21) = 'some text here'.
DATA(ld_col22) = 'some text here'.
DATA(ld_col23) = 'some text here'.
DATA(ld_col24) = 'some text here'.
DATA(ld_col25) = 'some text here'.
DATA(ld_col26) = 'some text here'.
DATA(ld_col31) = 'some text here'.
DATA(ld_col32) = 'some text here'.
DATA(ld_col33) = 'some text here'.
DATA(ld_col34) = 'some text here'.
DATA(ld_col35) = 'some text here'.
DATA(ld_col36) = 'some text here'.
DATA(ld_col_back) = 'some text here'.
DATA(ld_col_line) = 'some text here'.
DATA(ld_col_node) = 'some text here'.
DATA(ld_conf) = 'some text here'.
DATA(ld_dmode) = 'some text here'.
DATA(ld_inbuf) = 'some text here'.
DATA(ld_lmode) = 'some text here'.
DATA(ld_mail_allow) = 'some text here'.
DATA(ld_menpos) = 'some text here'.
DATA(ld_modif) = 'some text here'.
DATA(ld_mtitl) = 'some text here'.
DATA(ld_ndims) = 'some text here'.
DATA(ld_nlook) = 'some text here'.
DATA(ld_nlval) = 'some text here'.
DATA(ld_ntext) = 'some text here'.
DATA(ld_ntxhl) = 'some text here'.
DATA(ld_order) = 'some text here'.
DATA(ld_pwdid) = 'some text here'.
DATA(ld_region) = 'some text here'.
DATA(ld_relboxht) = 'some text here'.
DATA(ld_relboxwd) = 'some text here'.
DATA(ld_relwd_ht) = 'some text here'.
DATA(ld_rmode) = 'some text here'.
DATA(ld_set_focus) = 'some text here'.
DATA(ld_shape) = 'some text here'.
DATA(ld_smode) = '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_super) = 'some text here'.
DATA(ld_tindx) = 'some text here'.
DATA(ld_ttext) = 'some text here'.
DATA(ld_usehle) = 'some text here'.
DATA(ld_u_command) = 'some text here'.
DATA(ld_u_node_2) = 'some text here'.
DATA(ld_u_node_id) = 'some text here'.
DATA(ld_u_text) = 'some text here'.
DATA(ld_u_val1) = 'some text here'.
DATA(ld_u_val2) = 'some text here'.
DATA(ld_u_val3) = 'some text here'.
DATA(ld_u_val_count) = 'some text here'.
DATA(ld_val11) = 'some text here'.
DATA(ld_val12) = 'some text here'.
DATA(ld_val13) = 'some text here'.
DATA(ld_val14) = 'some text here'.
DATA(ld_val15) = 'some text here'.
DATA(ld_val21) = 'some text here'.
DATA(ld_val22) = 'some text here'.
DATA(ld_val23) = 'some text here'.
DATA(ld_val24) = 'some text here'.
DATA(ld_val25) = 'some text here'.
DATA(ld_val31) = 'some text here'.
DATA(ld_val32) = 'some text here'.
DATA(ld_val33) = 'some text here'.
DATA(ld_val34) = 'some text here'.
DATA(ld_val35) = 'some text here'.
DATA(ld_vald1) = 'some text here'.
DATA(ld_vald2) = 'some text here'.
DATA(ld_vald3) = 'some text here'.
DATA(ld_valu1) = 'some text here'.
DATA(ld_valu2) = 'some text here'.
DATA(ld_valu3) = 'some text here'.
DATA(ld_vindx) = 'some text here'.
DATA(ld_vtxt1) = 'some text here'.
DATA(ld_vtxt2) = 'some text here'.
DATA(ld_vtxt3) = '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_x_opt) = 'some text here'.
DATA(ld_zoomfac) = 'some text here'.

"populate fields of struture and append to itab
append wa_data to it_data. . CALL FUNCTION 'GRAPH_HIERARCHY' * EXPORTING * boxln = ld_boxln * col11 = ld_col11 * col12 = ld_col12 * col13 = ld_col13 * col14 = ld_col14 * col15 = ld_col15 * col16 = ld_col16 * col21 = ld_col21 * col22 = ld_col22 * col23 = ld_col23 * col24 = ld_col24 * col25 = ld_col25 * col26 = ld_col26 * col31 = ld_col31 * col32 = ld_col32 * col33 = ld_col33 * col34 = ld_col34 * col35 = ld_col35 * col36 = ld_col36 * col_back = ld_col_back * col_line = ld_col_line * col_node = ld_col_node * conf = ld_conf * dmode = ld_dmode * inbuf = ld_inbuf * lmode = ld_lmode * mail_allow = ld_mail_allow * menpos = ld_menpos * modif = ld_modif * mtitl = ld_mtitl * ndims = ld_ndims * nlook = ld_nlook * nlval = ld_nlval * ntext = ld_ntext * ntxhl = ld_ntxhl * order = ld_order * pwdid = ld_pwdid * region = ld_region * relboxht = ld_relboxht * relboxwd = ld_relboxwd * relwd_ht = ld_relwd_ht * rmode = ld_rmode * set_focus = ld_set_focus * shape = ld_shape * smode = ld_smode * so_contents = ld_so_contents * so_receiver = ld_so_receiver * so_send = ld_so_send * so_title = ld_so_title * stat = ld_stat * super = ld_super * tindx = ld_tindx * ttext = ld_ttext * usehle = ld_usehle * u_command = ld_u_command * u_node_2 = ld_u_node_2 * u_node_id = ld_u_node_id * u_text = ld_u_text * u_val1 = ld_u_val1 * u_val2 = ld_u_val2 * u_val3 = ld_u_val3 * u_val_count = ld_u_val_count * val11 = ld_val11 * val12 = ld_val12 * val13 = ld_val13 * val14 = ld_val14 * val15 = ld_val15 * val21 = ld_val21 * val22 = ld_val22 * val23 = ld_val23 * val24 = ld_val24 * val25 = ld_val25 * val31 = ld_val31 * val32 = ld_val32 * val33 = ld_val33 * val34 = ld_val34 * val35 = ld_val35 * vald1 = ld_vald1 * vald2 = ld_vald2 * vald3 = ld_vald3 * valu1 = ld_valu1 * valu2 = ld_valu2 * valu3 = ld_valu3 * vindx = ld_vindx * vtxt1 = ld_vtxt1 * vtxt2 = ld_vtxt2 * vtxt3 = ld_vtxt3 * winid = ld_winid * winpos = ld_winpos * winszx = ld_winszx * winszy = ld_winszy * x_opt = ld_x_opt * zoomfac = ld_zoomfac IMPORTING cua_id = ld_cua_id h_mes = ld_h_mes h_node_2 = ld_h_node_2 h_text = ld_h_text h_val1 = ld_h_val1 h_val2 = ld_h_val2 h_val3 = ld_h_val3 h_valcount = ld_h_valcount mennr = ld_mennr m_typ = ld_m_typ nodes = ld_nodes rbuff = ld_rbuff rwnid = ld_rwnid TABLES data = it_data . " GRAPH_HIERARCHY
IF SY-SUBRC EQ 0. "All OK 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:
it_data  TYPE STANDARD TABLE OF STRING ,
wa_data  LIKE LINE OF it_data,
ld_boxln  TYPE STRING ,
ld_cua_id  TYPE STRING ,
ld_col11  TYPE STRING ,
ld_h_mes  TYPE STRING ,
ld_h_node_2  TYPE STRING ,
ld_col12  TYPE STRING ,
ld_h_text  TYPE STRING ,
ld_col13  TYPE STRING ,
ld_h_val1  TYPE STRING ,
ld_col14  TYPE STRING ,
ld_col15  TYPE STRING ,
ld_h_val2  TYPE STRING ,
ld_h_val3  TYPE STRING ,
ld_col16  TYPE STRING ,
ld_h_valcount  TYPE STRING ,
ld_col21  TYPE STRING ,
ld_mennr  TYPE STRING ,
ld_col22  TYPE STRING ,
ld_m_typ  TYPE STRING ,
ld_col23  TYPE STRING ,
ld_nodes  TYPE STRING ,
ld_col24  TYPE STRING ,
ld_rbuff  TYPE STRING ,
ld_col25  TYPE STRING ,
ld_rwnid  TYPE STRING ,
ld_col26  TYPE STRING ,
ld_col31  TYPE STRING ,
ld_col32  TYPE STRING ,
ld_col33  TYPE STRING ,
ld_col34  TYPE STRING ,
ld_col35  TYPE STRING ,
ld_col36  TYPE STRING ,
ld_col_back  TYPE STRING ,
ld_col_line  TYPE STRING ,
ld_col_node  TYPE STRING ,
ld_conf  TYPE STRING ,
ld_dmode  TYPE STRING ,
ld_inbuf  TYPE STRING ,
ld_lmode  TYPE STRING ,
ld_mail_allow  TYPE STRING ,
ld_menpos  TYPE STRING ,
ld_modif  TYPE STRING ,
ld_mtitl  TYPE STRING ,
ld_ndims  TYPE STRING ,
ld_nlook  TYPE STRING ,
ld_nlval  TYPE STRING ,
ld_ntext  TYPE STRING ,
ld_ntxhl  TYPE STRING ,
ld_order  TYPE STRING ,
ld_pwdid  TYPE STRING ,
ld_region  TYPE STRING ,
ld_relboxht  TYPE STRING ,
ld_relboxwd  TYPE STRING ,
ld_relwd_ht  TYPE STRING ,
ld_rmode  TYPE STRING ,
ld_set_focus  TYPE STRING ,
ld_shape  TYPE STRING ,
ld_smode  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_super  TYPE STRING ,
ld_tindx  TYPE STRING ,
ld_ttext  TYPE STRING ,
ld_usehle  TYPE STRING ,
ld_u_command  TYPE STRING ,
ld_u_node_2  TYPE STRING ,
ld_u_node_id  TYPE STRING ,
ld_u_text  TYPE STRING ,
ld_u_val1  TYPE STRING ,
ld_u_val2  TYPE STRING ,
ld_u_val3  TYPE STRING ,
ld_u_val_count  TYPE STRING ,
ld_val11  TYPE STRING ,
ld_val12  TYPE STRING ,
ld_val13  TYPE STRING ,
ld_val14  TYPE STRING ,
ld_val15  TYPE STRING ,
ld_val21  TYPE STRING ,
ld_val22  TYPE STRING ,
ld_val23  TYPE STRING ,
ld_val24  TYPE STRING ,
ld_val25  TYPE STRING ,
ld_val31  TYPE STRING ,
ld_val32  TYPE STRING ,
ld_val33  TYPE STRING ,
ld_val34  TYPE STRING ,
ld_val35  TYPE STRING ,
ld_vald1  TYPE STRING ,
ld_vald2  TYPE STRING ,
ld_vald3  TYPE STRING ,
ld_valu1  TYPE STRING ,
ld_valu2  TYPE STRING ,
ld_valu3  TYPE STRING ,
ld_vindx  TYPE STRING ,
ld_vtxt1  TYPE STRING ,
ld_vtxt2  TYPE STRING ,
ld_vtxt3  TYPE STRING ,
ld_winid  TYPE STRING ,
ld_winpos  TYPE STRING ,
ld_winszx  TYPE STRING ,
ld_winszy  TYPE STRING ,
ld_x_opt  TYPE STRING ,
ld_zoomfac  TYPE STRING .


"populate fields of struture and append to itab
append wa_data to it_data.
ld_boxln = 'some text here'.
ld_col11 = 'some text here'.
ld_col12 = 'some text here'.
ld_col13 = 'some text here'.
ld_col14 = 'some text here'.
ld_col15 = 'some text here'.
ld_col16 = 'some text here'.
ld_col21 = 'some text here'.
ld_col22 = 'some text here'.
ld_col23 = 'some text here'.
ld_col24 = 'some text here'.
ld_col25 = 'some text here'.
ld_col26 = 'some text here'.
ld_col31 = 'some text here'.
ld_col32 = 'some text here'.
ld_col33 = 'some text here'.
ld_col34 = 'some text here'.
ld_col35 = 'some text here'.
ld_col36 = 'some text here'.
ld_col_back = 'some text here'.
ld_col_line = 'some text here'.
ld_col_node = 'some text here'.
ld_conf = 'some text here'.
ld_dmode = 'some text here'.
ld_inbuf = 'some text here'.
ld_lmode = 'some text here'.
ld_mail_allow = 'some text here'.
ld_menpos = 'some text here'.
ld_modif = 'some text here'.
ld_mtitl = 'some text here'.
ld_ndims = 'some text here'.
ld_nlook = 'some text here'.
ld_nlval = 'some text here'.
ld_ntext = 'some text here'.
ld_ntxhl = 'some text here'.
ld_order = 'some text here'.
ld_pwdid = 'some text here'.
ld_region = 'some text here'.
ld_relboxht = 'some text here'.
ld_relboxwd = 'some text here'.
ld_relwd_ht = 'some text here'.
ld_rmode = 'some text here'.
ld_set_focus = 'some text here'.
ld_shape = 'some text here'.
ld_smode = '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_super = 'some text here'.
ld_tindx = 'some text here'.
ld_ttext = 'some text here'.
ld_usehle = 'some text here'.
ld_u_command = 'some text here'.
ld_u_node_2 = 'some text here'.
ld_u_node_id = 'some text here'.
ld_u_text = 'some text here'.
ld_u_val1 = 'some text here'.
ld_u_val2 = 'some text here'.
ld_u_val3 = 'some text here'.
ld_u_val_count = 'some text here'.
ld_val11 = 'some text here'.
ld_val12 = 'some text here'.
ld_val13 = 'some text here'.
ld_val14 = 'some text here'.
ld_val15 = 'some text here'.
ld_val21 = 'some text here'.
ld_val22 = 'some text here'.
ld_val23 = 'some text here'.
ld_val24 = 'some text here'.
ld_val25 = 'some text here'.
ld_val31 = 'some text here'.
ld_val32 = 'some text here'.
ld_val33 = 'some text here'.
ld_val34 = 'some text here'.
ld_val35 = 'some text here'.
ld_vald1 = 'some text here'.
ld_vald2 = 'some text here'.
ld_vald3 = 'some text here'.
ld_valu1 = 'some text here'.
ld_valu2 = 'some text here'.
ld_valu3 = 'some text here'.
ld_vindx = 'some text here'.
ld_vtxt1 = 'some text here'.
ld_vtxt2 = 'some text here'.
ld_vtxt3 = 'some text here'.
ld_winid = 'some text here'.
ld_winpos = 'some text here'.
ld_winszx = 'some text here'.
ld_winszy = 'some text here'.
ld_x_opt = 'some text here'.
ld_zoomfac = '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 GRAPH_HIERARCHY or its description.