SAP Function Modules

WRF_CHECK_ENDING_NODE SAP Function module - Check Whether Node Is End Point in Hierarchy







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

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


Pattern for FM WRF_CHECK_ENDING_NODE - WRF CHECK ENDING NODE





CALL FUNCTION 'WRF_CHECK_ENDING_NODE' "Check Whether Node Is End Point in Hierarchy
  EXPORTING
    hierid =                    " wrf_matgrp_sku-hier_id  Hierarchy ID
*   node =                      " wrf_matgrp_sku-node  Hierarchy Node
*   hier_date =                 " wrf_date      Validity of Assignment in Article Hierarchy
  IMPORTING
    ending_node =               " char1         Einstelliges Kennzeichen; hat Wert 'X', wenn Endknoten vorliegt
* CHANGING
*   it_matgrp_struc =           " wrf_node_attr_tty  Category Structure
*   it_not_ending_node =        " wrf_node_attr_tty  Tabelle, die alle Nicht-Endknoten enthält
  EXCEPTIONS
    WRONG_CALL = 1              "               Invalid Call
    .  "  WRF_CHECK_ENDING_NODE

ABAP code example for Function Module WRF_CHECK_ENDING_NODE





The ABAP code below is a full code listing to execute function module WRF_CHECK_ENDING_NODE 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_ending_node  TYPE CHAR1 .

DATA(ld_it_matgrp_struc) = 'Check type of data required'.
DATA(ld_it_not_ending_node) = 'Check type of data required'.

SELECT single HIER_ID
FROM WRF_MATGRP_SKU
INTO @DATA(ld_hierid).


SELECT single NODE
FROM WRF_MATGRP_SKU
INTO @DATA(ld_node).

DATA(ld_hier_date) = 'Check type of data required'. . CALL FUNCTION 'WRF_CHECK_ENDING_NODE' EXPORTING hierid = ld_hierid * node = ld_node * hier_date = ld_hier_date IMPORTING ending_node = ld_ending_node * CHANGING * it_matgrp_struc = ld_it_matgrp_struc * it_not_ending_node = ld_it_not_ending_node EXCEPTIONS WRONG_CALL = 1 . " WRF_CHECK_ENDING_NODE
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_it_matgrp_struc  TYPE WRF_NODE_ATTR_TTY ,
ld_ending_node  TYPE CHAR1 ,
ld_hierid  TYPE WRF_MATGRP_SKU-HIER_ID ,
ld_it_not_ending_node  TYPE WRF_NODE_ATTR_TTY ,
ld_node  TYPE WRF_MATGRP_SKU-NODE ,
ld_hier_date  TYPE WRF_DATE .

ld_it_matgrp_struc = 'Check type of data required'.

SELECT single HIER_ID
FROM WRF_MATGRP_SKU
INTO ld_hierid.

ld_it_not_ending_node = 'Check type of data required'.

SELECT single NODE
FROM WRF_MATGRP_SKU
INTO ld_node.

ld_hier_date = '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 WRF_CHECK_ENDING_NODE or its description.