SAP Function Modules

CS_X4_NODE_DETERMINATION SAP Function module







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

Associated Function Group: CSX4
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CS_X4_NODE_DETERMINATION - CS X4 NODE DETERMINATION





CALL FUNCTION 'CS_X4_NODE_DETERMINATION' "
  EXPORTING
    i_stlty_w =                 " stpf-stlty_w
    i_stlnr_w =                 " stpf-stlnr_w
    i_stlal_w =                 " stpf-stlal_w
*   i_flg_create_nodes = SPACE  " c
*   i_flg_node_for_class = 'X'  " c
*   i_flg_check_node = SPACE    " c
*   i_flg_special_class = SPACE  " c
*   i_flg_node_for_assem = SPACE  " c
*   i_flg_calc_path2 = 'X'      " c
*   i_flg_calc_path4 = SPACE    " c
  TABLES
    stb =                       " stpox
  EXCEPTIONS
    WRONG_INITIALIZATION = 1    "
    FOREIGN_LOCK = 2            "
    SYSTEM_FAILURE = 3          "
    STB_INCONSISTENT = 4        "
    STVKN_NOT_INITIALIZED = 5   "
    .  "  CS_X4_NODE_DETERMINATION

ABAP code example for Function Module CS_X4_NODE_DETERMINATION





The ABAP code below is a full code listing to execute function module CS_X4_NODE_DETERMINATION 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:
it_stb  TYPE STANDARD TABLE OF STPOX,"TABLES PARAM
wa_stb  LIKE LINE OF it_stb .


SELECT single STLTY_W
FROM STPF
INTO @DATA(ld_i_stlty_w).


SELECT single STLNR_W
FROM STPF
INTO @DATA(ld_i_stlnr_w).


SELECT single STLAL_W
FROM STPF
INTO @DATA(ld_i_stlal_w).

DATA(ld_i_flg_create_nodes) = 'Check type of data required'.
DATA(ld_i_flg_node_for_class) = 'Check type of data required'.
DATA(ld_i_flg_check_node) = 'Check type of data required'.
DATA(ld_i_flg_special_class) = 'Check type of data required'.
DATA(ld_i_flg_node_for_assem) = 'Check type of data required'.
DATA(ld_i_flg_calc_path2) = 'Check type of data required'.
DATA(ld_i_flg_calc_path4) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_stb to it_stb. . CALL FUNCTION 'CS_X4_NODE_DETERMINATION' EXPORTING i_stlty_w = ld_i_stlty_w i_stlnr_w = ld_i_stlnr_w i_stlal_w = ld_i_stlal_w * i_flg_create_nodes = ld_i_flg_create_nodes * i_flg_node_for_class = ld_i_flg_node_for_class * i_flg_check_node = ld_i_flg_check_node * i_flg_special_class = ld_i_flg_special_class * i_flg_node_for_assem = ld_i_flg_node_for_assem * i_flg_calc_path2 = ld_i_flg_calc_path2 * i_flg_calc_path4 = ld_i_flg_calc_path4 TABLES stb = it_stb EXCEPTIONS WRONG_INITIALIZATION = 1 FOREIGN_LOCK = 2 SYSTEM_FAILURE = 3 STB_INCONSISTENT = 4 STVKN_NOT_INITIALIZED = 5 . " CS_X4_NODE_DETERMINATION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "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_i_stlty_w  TYPE STPF-STLTY_W ,
it_stb  TYPE STANDARD TABLE OF STPOX ,
wa_stb  LIKE LINE OF it_stb,
ld_i_stlnr_w  TYPE STPF-STLNR_W ,
ld_i_stlal_w  TYPE STPF-STLAL_W ,
ld_i_flg_create_nodes  TYPE C ,
ld_i_flg_node_for_class  TYPE C ,
ld_i_flg_check_node  TYPE C ,
ld_i_flg_special_class  TYPE C ,
ld_i_flg_node_for_assem  TYPE C ,
ld_i_flg_calc_path2  TYPE C ,
ld_i_flg_calc_path4  TYPE C .


SELECT single STLTY_W
FROM STPF
INTO ld_i_stlty_w.


"populate fields of struture and append to itab
append wa_stb to it_stb.

SELECT single STLNR_W
FROM STPF
INTO ld_i_stlnr_w.


SELECT single STLAL_W
FROM STPF
INTO ld_i_stlal_w.

ld_i_flg_create_nodes = 'Check type of data required'.
ld_i_flg_node_for_class = 'Check type of data required'.
ld_i_flg_check_node = 'Check type of data required'.
ld_i_flg_special_class = 'Check type of data required'.
ld_i_flg_node_for_assem = 'Check type of data required'.
ld_i_flg_calc_path2 = 'Check type of data required'.
ld_i_flg_calc_path4 = 'Check type of data required'.

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 CS_X4_NODE_DETERMINATION or its description.