SAP Function Modules

BM_STREE_NODE_BUILD SAP Function module







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

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


Pattern for FM BM_STREE_NODE_BUILD - BM STREE NODE BUILD





CALL FUNCTION 'BM_STREE_NODE_BUILD' "
* EXPORTING
*   node_type =                 " hier_iface-node_type  Valid Node Types in Structure Repository
*   node_id = SPACE             " hier_iface-node_id  Unique ID - 32 Characters
*   refobj_type =               " hier_ref-ref_type  Valid Reference Types in Structure Repository
*   refobj_id =                 " hier_ref-ref_object  Referenced Object for Node
*   reftree_id =                " hier_iface-refnode_id  Unique ID - 32 Characters
*   refnode_id =                " hier_iface-refnode_id  Unique ID - 32 Characters
*   w_subnodes = 'X'            " hier_iface-w_subnodes  Flag with Values ' ' and 'X'
*   node_level =                " hier_iface-node_level  Node level
*   node_text =                 " c
*   structure_id =              " hier_iface-tree_id  Unique ID - 32 Characters
*   extension =                 " hier_iface-extension  Structure enhancement ID
*   component = SPACE           " hier_iface-component  Software Component
*   delete_lock = SPACE         " char1         Single-Character Flag
*   language = SY-LANGU         " sy-langu      SAP R/3 System, Current Language
  IMPORTING
    stree_node =                " hier_iface
    stree_ref =                 " hier_ref
    stree_text =                " hier_texts
  EXCEPTIONS
    ERROR_OCCURRED = 1          "
    .  "  BM_STREE_NODE_BUILD

ABAP code example for Function Module BM_STREE_NODE_BUILD





The ABAP code below is a full code listing to execute function module BM_STREE_NODE_BUILD 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_stree_node  TYPE HIER_IFACE ,
ld_stree_ref  TYPE HIER_REF ,
ld_stree_text  TYPE HIER_TEXTS .


DATA(ld_node_type) = some text here

DATA(ld_node_id) = some text here

DATA(ld_refobj_type) = some text here

DATA(ld_refobj_id) = some text here

DATA(ld_reftree_id) = some text here

DATA(ld_refnode_id) = some text here

DATA(ld_w_subnodes) = some text here

DATA(ld_node_level) = Check type of data required
DATA(ld_node_text) = 'Check type of data required'.

DATA(ld_structure_id) = some text here

DATA(ld_extension) = some text here

DATA(ld_component) = some text here
DATA(ld_delete_lock) = 'Check type of data required'.
DATA(ld_language) = 'Check type of data required'. . CALL FUNCTION 'BM_STREE_NODE_BUILD' * EXPORTING * node_type = ld_node_type * node_id = ld_node_id * refobj_type = ld_refobj_type * refobj_id = ld_refobj_id * reftree_id = ld_reftree_id * refnode_id = ld_refnode_id * w_subnodes = ld_w_subnodes * node_level = ld_node_level * node_text = ld_node_text * structure_id = ld_structure_id * extension = ld_extension * component = ld_component * delete_lock = ld_delete_lock * language = ld_language IMPORTING stree_node = ld_stree_node stree_ref = ld_stree_ref stree_text = ld_stree_text EXCEPTIONS ERROR_OCCURRED = 1 . " BM_STREE_NODE_BUILD
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_stree_node  TYPE HIER_IFACE ,
ld_node_type  TYPE HIER_IFACE-NODE_TYPE ,
ld_stree_ref  TYPE HIER_REF ,
ld_node_id  TYPE HIER_IFACE-NODE_ID ,
ld_stree_text  TYPE HIER_TEXTS ,
ld_refobj_type  TYPE HIER_REF-REF_TYPE ,
ld_refobj_id  TYPE HIER_REF-REF_OBJECT ,
ld_reftree_id  TYPE HIER_IFACE-REFNODE_ID ,
ld_refnode_id  TYPE HIER_IFACE-REFNODE_ID ,
ld_w_subnodes  TYPE HIER_IFACE-W_SUBNODES ,
ld_node_level  TYPE HIER_IFACE-NODE_LEVEL ,
ld_node_text  TYPE C ,
ld_structure_id  TYPE HIER_IFACE-TREE_ID ,
ld_extension  TYPE HIER_IFACE-EXTENSION ,
ld_component  TYPE HIER_IFACE-COMPONENT ,
ld_delete_lock  TYPE CHAR1 ,
ld_language  TYPE SY-LANGU .


ld_node_type = some text here

ld_node_id = some text here

ld_refobj_type = some text here

ld_refobj_id = some text here

ld_reftree_id = some text here

ld_refnode_id = some text here

ld_w_subnodes = some text here

ld_node_level = Check type of data required
ld_node_text = 'Check type of data required'.

ld_structure_id = some text here

ld_extension = some text here

ld_component = some text here
ld_delete_lock = 'Check type of data required'.
ld_language = '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 BM_STREE_NODE_BUILD or its description.