SAP Function Modules

BUPA_HIERARCHY_BW_READ SAP Function module - Read Partner Hierarchy







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

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


Pattern for FM BUPA_HIERARCHY_BW_READ - BUPA HIERARCHY BW READ





CALL FUNCTION 'BUPA_HIERARCHY_BW_READ' "Read Partner Hierarchy
  EXPORTING
    i_tree_search_term =        " bu_tree_search_term  Hierarchy Tree ID
*   i_valid_from = '10000101'   " dats          Hierarchy Node Valid From
*   i_valid_to = '99991231 '    " dats          Hierarchy Node Valid To
*   i_flg_no_leaves = ' '       " xfeld         Indicator: Do Not Select Any Leaves
  IMPORTING
    et_hier_tree =              " bus_hier_tree_t  Table Type for Table BUT_HIER_TREE
    et_hier_tree_d =            " bus_hier_tree_d_t  Table Type for Table BUT_HIER_TREE_D
    et_hier_node =              " bupa_hier_node_bw_t  Hierarchy Node Table BW
    et_hier_struct =            " bus_hier_struct_t  Table Type for Table BUT_HIER_STRUCT
    et_hier_node_bp =           " bupa_hier_node_bp_bw_t  Table Type for Table BUT_HIER_NODE_BP
  EXCEPTIONS
    HIERARCHY_NOT_FOUND = 1     "               Hierarchy Not Found
    .  "  BUPA_HIERARCHY_BW_READ

ABAP code example for Function Module BUPA_HIERARCHY_BW_READ





The ABAP code below is a full code listing to execute function module BUPA_HIERARCHY_BW_READ 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_et_hier_tree  TYPE BUS_HIER_TREE_T ,
ld_et_hier_tree_d  TYPE BUS_HIER_TREE_D_T ,
ld_et_hier_node  TYPE BUPA_HIER_NODE_BW_T ,
ld_et_hier_struct  TYPE BUS_HIER_STRUCT_T ,
ld_et_hier_node_bp  TYPE BUPA_HIER_NODE_BP_BW_T .

DATA(ld_i_tree_search_term) = 'Check type of data required'.
DATA(ld_i_valid_from) = 'Check type of data required'.
DATA(ld_i_valid_to) = 'Check type of data required'.
DATA(ld_i_flg_no_leaves) = 'Check type of data required'. . CALL FUNCTION 'BUPA_HIERARCHY_BW_READ' EXPORTING i_tree_search_term = ld_i_tree_search_term * i_valid_from = ld_i_valid_from * i_valid_to = ld_i_valid_to * i_flg_no_leaves = ld_i_flg_no_leaves IMPORTING et_hier_tree = ld_et_hier_tree et_hier_tree_d = ld_et_hier_tree_d et_hier_node = ld_et_hier_node et_hier_struct = ld_et_hier_struct et_hier_node_bp = ld_et_hier_node_bp EXCEPTIONS HIERARCHY_NOT_FOUND = 1 . " BUPA_HIERARCHY_BW_READ
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_et_hier_tree  TYPE BUS_HIER_TREE_T ,
ld_i_tree_search_term  TYPE BU_TREE_SEARCH_TERM ,
ld_et_hier_tree_d  TYPE BUS_HIER_TREE_D_T ,
ld_i_valid_from  TYPE DATS ,
ld_et_hier_node  TYPE BUPA_HIER_NODE_BW_T ,
ld_i_valid_to  TYPE DATS ,
ld_et_hier_struct  TYPE BUS_HIER_STRUCT_T ,
ld_i_flg_no_leaves  TYPE XFELD ,
ld_et_hier_node_bp  TYPE BUPA_HIER_NODE_BP_BW_T .

ld_i_tree_search_term = 'Check type of data required'.
ld_i_valid_from = 'Check type of data required'.
ld_i_valid_to = 'Check type of data required'.
ld_i_flg_no_leaves = '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 BUPA_HIERARCHY_BW_READ or its description.