SAP CNET_GRAPHIC_HIERARCHY Function Module for Start hierarchy graphics









CNET_GRAPHIC_HIERARCHY is a standard cnet graphic hierarchy SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Start hierarchy graphics processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for cnet graphic hierarchy FM, simply by entering the name CNET_GRAPHIC_HIERARCHY into the relevant SAP transaction such as SE37 or SE38.

Function Group: CNET
Program Name: SAPLCNET
Main Program:
Appliation area: S
Release date: 16-Apr-1997
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CNET_GRAPHIC_HIERARCHY pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CNET_GRAPHIC_HIERARCHY'"Start hierarchy graphics
EXPORTING
* ABAP_CMD = ' ' "Command to graphics
* STATUS_TEXT = ' ' "Status line text
* SUPER = ' ' "Parameter for closing windows
* TITLEBAR = ' ' "Window title
* WAIT_FOR_INPUT = 'X' "
* WINID = ' ' "Window identification
* CONFIRM = ' ' "Indicator: Confirm mode
* PROFILE = 'SAP DEFAULT 0' "Graphics profile
* PWDID = ' ' "Parent window ID
* SET_FOCUS = 'X' "Indicator: Set focus
* SORT = 'X' "Indicator: Sort nodes
* SO_CONTENTS = ' ' "Document title
* SO_SEND = ' ' "Indicator: Send graphic
* STAT = ' ' "Status

IMPORTING
GR_MES = "User command
GR_MODE = "Mode when inserting, duplicating
GR_SEL_FIELD = "Selected field
M_TYP = "Message type
RWNID = "Return window ID
SETTINGS = "Settings

TABLES
* CLUSTERS = "Cluster (currently w/o function)
* CVALS = "Cluster attributes (currently w/o function)
* DELETIONS = "Objects to be deleted
* INODES = "Insertable nodes
* NODES = "Nodes
* NVALS = "Node attributes
* PNODES = "Stack nodes
* POSITIONS = "Node positions
* PVALS = "Stack node attributes

EXCEPTIONS
ERR_IN_PROFILE = 1 INV_PROFILE = 2 INV_WINID = 3 NO_BATCH = 4 FRONTEND_ERROR = 5 INV_COMMUNICATION = 6
.



IMPORTING Parameters details for CNET_GRAPHIC_HIERARCHY

ABAP_CMD - Command to graphics

Data type: NET_GRAPH-ABAP_CMD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

STATUS_TEXT - Status line text

Data type: NET_GRAPH-STATUSTEXT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SUPER - Parameter for closing windows

Data type: NET_GRAPH-SUPER
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TITLEBAR - Window title

Data type: NET_GRAPH-TITLEBAR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

WAIT_FOR_INPUT -

Data type: NET_GRAPH-FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

WINID - Window identification

Data type: NET_GRAPH-WINID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CONFIRM - Indicator: Confirm mode

Data type: NET_SET-CONFIRM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PROFILE - Graphics profile

Data type: NET_PROFIL
Default: 'SAP DEFAULT 0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PWDID - Parent window ID

Data type: NET_GRAPH-PWDID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SET_FOCUS - Indicator: Set focus

Data type: NET_GRAPH-FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SORT - Indicator: Sort nodes

Data type: NET_GRAPH-FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SO_CONTENTS - Document title

Data type: SOS00-S_OBJDES
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SO_SEND - Indicator: Send graphic

Data type: NET_GRAPH-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

STAT - Status

Data type: NET_GRAPH-STAT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CNET_GRAPHIC_HIERARCHY

GR_MES - User command

Data type: NET_GRAPH-GR_MES
Optional: No
Call by Reference: No ( called with pass by value option)

GR_MODE - Mode when inserting, duplicating

Data type: NET_GRAPH-GR_MODE
Optional: No
Call by Reference: No ( called with pass by value option)

GR_SEL_FIELD - Selected field

Data type: NET_GRAPH-SEL_FIELD
Optional: No
Call by Reference: No ( called with pass by value option)

M_TYP - Message type

Data type: NET_GRAPH-M_TYP
Optional: No
Call by Reference: No ( called with pass by value option)

RWNID - Return window ID

Data type: NET_GRAPH-RWNID
Optional: No
Call by Reference: No ( called with pass by value option)

SETTINGS - Settings

Data type: NET_SET
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CNET_GRAPHIC_HIERARCHY

CLUSTERS - Cluster (currently w/o function)

Data type: CNG_CLUSTR
Optional: Yes
Call by Reference: No ( called with pass by value option)

CVALS - Cluster attributes (currently w/o function)

Data type: NET_CVALS
Optional: Yes
Call by Reference: No ( called with pass by value option)

DELETIONS - Objects to be deleted

Data type: NET_DELETE
Optional: Yes
Call by Reference: No ( called with pass by value option)

INODES - Insertable nodes

Data type: CNG_INODES
Optional: Yes
Call by Reference: No ( called with pass by value option)

NODES - Nodes

Data type: CHG_NODES
Optional: Yes
Call by Reference: No ( called with pass by value option)

NVALS - Node attributes

Data type: NET_NVALS
Optional: Yes
Call by Reference: No ( called with pass by value option)

PNODES - Stack nodes

Data type: CNG_PNODES
Optional: Yes
Call by Reference: No ( called with pass by value option)

POSITIONS - Node positions

Data type: NET_POS
Optional: Yes
Call by Reference: No ( called with pass by value option)

PVALS - Stack node attributes

Data type: NET_NVALS
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ERR_IN_PROFILE - Error in the graphics profile

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INV_PROFILE - Incorrect graphics profile

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INV_WINID - Incorrect window ID

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_BATCH - No batch processing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FRONTEND_ERROR - Error in the frontend software

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INV_COMMUNICATION - Internal communication error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CNET_GRAPHIC_HIERARCHY Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_gr_mes  TYPE NET_GRAPH-GR_MES, "   
lv_abap_cmd  TYPE NET_GRAPH-ABAP_CMD, "   SPACE
lt_clusters  TYPE STANDARD TABLE OF CNG_CLUSTR, "   
lv_err_in_profile  TYPE CNG_CLUSTR, "   
lv_status_text  TYPE NET_GRAPH-STATUSTEXT, "   SPACE
lv_super  TYPE NET_GRAPH-SUPER, "   SPACE
lv_titlebar  TYPE NET_GRAPH-TITLEBAR, "   SPACE
lv_wait_for_input  TYPE NET_GRAPH-FLAG, "   'X'
lv_winid  TYPE NET_GRAPH-WINID, "   SPACE
lt_cvals  TYPE STANDARD TABLE OF NET_CVALS, "   
lv_confirm  TYPE NET_SET-CONFIRM, "   SPACE
lv_gr_mode  TYPE NET_GRAPH-GR_MODE, "   
lv_inv_profile  TYPE NET_GRAPH, "   
lv_profile  TYPE NET_PROFIL, "   'SAP DEFAULT 0'
lt_deletions  TYPE STANDARD TABLE OF NET_DELETE, "   
lv_inv_winid  TYPE NET_DELETE, "   
lv_gr_sel_field  TYPE NET_GRAPH-SEL_FIELD, "   
lv_m_typ  TYPE NET_GRAPH-M_TYP, "   
lv_pwdid  TYPE NET_GRAPH-PWDID, "   SPACE
lt_inodes  TYPE STANDARD TABLE OF CNG_INODES, "   
lv_no_batch  TYPE CNG_INODES, "   
lt_nodes  TYPE STANDARD TABLE OF CHG_NODES, "   
lv_rwnid  TYPE NET_GRAPH-RWNID, "   
lv_set_focus  TYPE NET_GRAPH-FLAG, "   'X'
lv_frontend_error  TYPE NET_GRAPH, "   
lv_sort  TYPE NET_GRAPH-FLAG, "   'X'
lt_nvals  TYPE STANDARD TABLE OF NET_NVALS, "   
lv_settings  TYPE NET_SET, "   
lv_inv_communication  TYPE NET_SET, "   
lt_pnodes  TYPE STANDARD TABLE OF CNG_PNODES, "   
lv_so_contents  TYPE SOS00-S_OBJDES, "   SPACE
lv_so_send  TYPE NET_GRAPH-FLAG, "   SPACE
lt_positions  TYPE STANDARD TABLE OF NET_POS, "   
lv_stat  TYPE NET_GRAPH-STAT, "   SPACE
lt_pvals  TYPE STANDARD TABLE OF NET_NVALS. "   

  CALL FUNCTION 'CNET_GRAPHIC_HIERARCHY'  "Start hierarchy graphics
    EXPORTING
         ABAP_CMD = lv_abap_cmd
         STATUS_TEXT = lv_status_text
         SUPER = lv_super
         TITLEBAR = lv_titlebar
         WAIT_FOR_INPUT = lv_wait_for_input
         WINID = lv_winid
         CONFIRM = lv_confirm
         PROFILE = lv_profile
         PWDID = lv_pwdid
         SET_FOCUS = lv_set_focus
         SORT = lv_sort
         SO_CONTENTS = lv_so_contents
         SO_SEND = lv_so_send
         STAT = lv_stat
    IMPORTING
         GR_MES = lv_gr_mes
         GR_MODE = lv_gr_mode
         GR_SEL_FIELD = lv_gr_sel_field
         M_TYP = lv_m_typ
         RWNID = lv_rwnid
         SETTINGS = lv_settings
    TABLES
         CLUSTERS = lt_clusters
         CVALS = lt_cvals
         DELETIONS = lt_deletions
         INODES = lt_inodes
         NODES = lt_nodes
         NVALS = lt_nvals
         PNODES = lt_pnodes
         POSITIONS = lt_positions
         PVALS = lt_pvals
    EXCEPTIONS
        ERR_IN_PROFILE = 1
        INV_PROFILE = 2
        INV_WINID = 3
        NO_BATCH = 4
        FRONTEND_ERROR = 5
        INV_COMMUNICATION = 6
. " CNET_GRAPHIC_HIERARCHY




ABAP code using 7.40 inline data declarations to call FM CNET_GRAPHIC_HIERARCHY

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single GR_MES FROM NET_GRAPH INTO @DATA(ld_gr_mes).
 
"SELECT single ABAP_CMD FROM NET_GRAPH INTO @DATA(ld_abap_cmd).
DATA(ld_abap_cmd) = ' '.
 
 
 
"SELECT single STATUSTEXT FROM NET_GRAPH INTO @DATA(ld_status_text).
DATA(ld_status_text) = ' '.
 
"SELECT single SUPER FROM NET_GRAPH INTO @DATA(ld_super).
DATA(ld_super) = ' '.
 
"SELECT single TITLEBAR FROM NET_GRAPH INTO @DATA(ld_titlebar).
DATA(ld_titlebar) = ' '.
 
"SELECT single FLAG FROM NET_GRAPH INTO @DATA(ld_wait_for_input).
DATA(ld_wait_for_input) = 'X'.
 
"SELECT single WINID FROM NET_GRAPH INTO @DATA(ld_winid).
DATA(ld_winid) = ' '.
 
 
"SELECT single CONFIRM FROM NET_SET INTO @DATA(ld_confirm).
DATA(ld_confirm) = ' '.
 
"SELECT single GR_MODE FROM NET_GRAPH INTO @DATA(ld_gr_mode).
 
 
DATA(ld_profile) = 'SAP DEFAULT 0'.
 
 
 
"SELECT single SEL_FIELD FROM NET_GRAPH INTO @DATA(ld_gr_sel_field).
 
"SELECT single M_TYP FROM NET_GRAPH INTO @DATA(ld_m_typ).
 
"SELECT single PWDID FROM NET_GRAPH INTO @DATA(ld_pwdid).
DATA(ld_pwdid) = ' '.
 
 
 
 
"SELECT single RWNID FROM NET_GRAPH INTO @DATA(ld_rwnid).
 
"SELECT single FLAG FROM NET_GRAPH INTO @DATA(ld_set_focus).
DATA(ld_set_focus) = 'X'.
 
 
"SELECT single FLAG FROM NET_GRAPH INTO @DATA(ld_sort).
DATA(ld_sort) = 'X'.
 
 
 
 
 
"SELECT single S_OBJDES FROM SOS00 INTO @DATA(ld_so_contents).
DATA(ld_so_contents) = ' '.
 
"SELECT single FLAG FROM NET_GRAPH INTO @DATA(ld_so_send).
DATA(ld_so_send) = ' '.
 
 
"SELECT single STAT FROM NET_GRAPH INTO @DATA(ld_stat).
DATA(ld_stat) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!