SAP CNET_LOGIC_HIERARCHY Function Module for Example for administration of hierarchy logic
CNET_LOGIC_HIERARCHY is a standard cnet logic 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 Example for administration of hierarchy logic 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 logic hierarchy FM, simply by entering the name CNET_LOGIC_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_LOGIC_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_LOGIC_HIERARCHY'"Example for administration of hierarchy logic.
EXPORTING
* CONFIRM = ' ' "Indicator: Confirm mode
* LG_MES = ' ' "Command
* LG_MODE = ' ' "Mode for inserting, duplicating
TABLES
ALL_NODES = "All nodes
ALL_NVALS = "Attributes of all nodes
DELETIONS = "Objects to be deleted
NODES = "Nodes
NVALS = "Node attributes
IMPORTING Parameters details for CNET_LOGIC_HIERARCHY
CONFIRM - Indicator: Confirm mode
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LG_MES - Command
Data type: NET_GRAPH-GR_MESDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LG_MODE - Mode for inserting, duplicating
Data type: NET_GRAPH-GR_MODEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CNET_LOGIC_HIERARCHY
ALL_NODES - All nodes
Data type: CHG_INODESOptional: No
Call by Reference: No ( called with pass by value option)
ALL_NVALS - Attributes of all nodes
Data type: NET_NVALSOptional: No
Call by Reference: No ( called with pass by value option)
DELETIONS - Objects to be deleted
Data type: NET_DELETEOptional: No
Call by Reference: No ( called with pass by value option)
NODES - Nodes
Data type: CHG_NODESOptional: No
Call by Reference: No ( called with pass by value option)
NVALS - Node attributes
Data type: NET_NVALSOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CNET_LOGIC_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_confirm | TYPE STRING, " SPACE | |||
| lt_all_nodes | TYPE STANDARD TABLE OF CHG_INODES, " | |||
| lv_lg_mes | TYPE NET_GRAPH-GR_MES, " SPACE | |||
| lt_all_nvals | TYPE STANDARD TABLE OF NET_NVALS, " | |||
| lv_lg_mode | TYPE NET_GRAPH-GR_MODE, " SPACE | |||
| lt_deletions | TYPE STANDARD TABLE OF NET_DELETE, " | |||
| lt_nodes | TYPE STANDARD TABLE OF CHG_NODES, " | |||
| lt_nvals | TYPE STANDARD TABLE OF NET_NVALS. " |
|   CALL FUNCTION 'CNET_LOGIC_HIERARCHY' "Example for administration of hierarchy logic |
| EXPORTING | ||
| CONFIRM | = lv_confirm | |
| LG_MES | = lv_lg_mes | |
| LG_MODE | = lv_lg_mode | |
| TABLES | ||
| ALL_NODES | = lt_all_nodes | |
| ALL_NVALS | = lt_all_nvals | |
| DELETIONS | = lt_deletions | |
| NODES | = lt_nodes | |
| NVALS | = lt_nvals | |
| . " CNET_LOGIC_HIERARCHY | ||
ABAP code using 7.40 inline data declarations to call FM CNET_LOGIC_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.| DATA(ld_confirm) | = ' '. | |||
| "SELECT single GR_MES FROM NET_GRAPH INTO @DATA(ld_lg_mes). | ||||
| DATA(ld_lg_mes) | = ' '. | |||
| "SELECT single GR_MODE FROM NET_GRAPH INTO @DATA(ld_lg_mode). | ||||
| DATA(ld_lg_mode) | = ' '. | |||
Search for further information about these or an SAP related objects