SAP BM_STRUCTURE_READ Function Module for









BM_STRUCTURE_READ is a standard bm structure read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 bm structure read FM, simply by entering the name BM_STRUCTURE_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: SF05
Program Name: SAPLSF05
Main Program: SAPLSF05
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function BM_STRUCTURE_READ 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 'BM_STRUCTURE_READ'"
EXPORTING
STRUCTURE_ID = "GUID for Structure
* IGNORE_SFW_SWITCHES = ' ' "
* NODE_ID = "
* LANGUAGE = SY-LANGU "SAP R/3 System, Current Language
* INSERT_SUBSTRU = "
* TEXT_OF_REFERENCES = "
* CONSTRUCT_TREE = 'X' "
* DO_NOT_READ_DEVCLASS = 'X' "
* DISPLAY_MODE = 'D' "
* SET_REFNODE_ID_FOR_REFS = ' ' "

IMPORTING
STRUCT_HEADER = "Definition Table for Structures
STRUCT_TITLE = "Explanatory text
STRUCT_TADIR = "Directory of Repository Objects

TABLES
* STRUCT_NODES = "Hierarchy Maintenance Tool Node Transfer Interface
* STRUCT_REFS = "List of References to Structure Items
* STRUCT_TEXTS = "General Structure Repository Node Text
* STRUCT_OCCS = "List of Occurrence Filters for Nodes
* STRUCT_PARAMS = "Application-defined additional structure data
* I_INCL_SUBSTRU_TYPES = "Structure/filter type
* I_EXCL_SUBSTRU_TYPES = "Structure/filter type

EXCEPTIONS
ERROR_OCCURRED = 1
.



IMPORTING Parameters details for BM_STRUCTURE_READ

STRUCTURE_ID - GUID for Structure

Data type: TTREE-ID
Optional: No
Call by Reference: No ( called with pass by value option)

IGNORE_SFW_SWITCHES -

Data type: CHAR1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NODE_ID -

Data type: TTREE-NODE_ID
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE - SAP R/3 System, Current Language

Data type: SY-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

INSERT_SUBSTRU -

Data type: UFFLAG
Optional: Yes
Call by Reference: No ( called with pass by value option)

TEXT_OF_REFERENCES -

Data type: UFFLAG
Optional: Yes
Call by Reference: No ( called with pass by value option)

CONSTRUCT_TREE -

Data type: UFFLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

DO_NOT_READ_DEVCLASS -

Data type: UFFLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISPLAY_MODE -

Data type: CHAR1
Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SET_REFNODE_ID_FOR_REFS -

Data type: CHAR1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BM_STRUCTURE_READ

STRUCT_HEADER - Definition Table for Structures

Data type: TTREE
Optional: No
Call by Reference: Yes

STRUCT_TITLE - Explanatory text

Data type: TTREET-TEXT
Optional: No
Call by Reference: Yes

STRUCT_TADIR - Directory of Repository Objects

Data type: TADIR
Optional: No
Call by Reference: Yes

TABLES Parameters details for BM_STRUCTURE_READ

STRUCT_NODES - Hierarchy Maintenance Tool Node Transfer Interface

Data type: HIER_IFACE
Optional: Yes
Call by Reference: Yes

STRUCT_REFS - List of References to Structure Items

Data type: HIER_REF
Optional: Yes
Call by Reference: Yes

STRUCT_TEXTS - General Structure Repository Node Text

Data type: HIER_TEXTS
Optional: Yes
Call by Reference: Yes

STRUCT_OCCS - List of Occurrence Filters for Nodes

Data type: HIER_OCC
Optional: Yes
Call by Reference: Yes

STRUCT_PARAMS - Application-defined additional structure data

Data type: TTREE_APPL
Optional: Yes
Call by Reference: Yes

I_INCL_SUBSTRU_TYPES - Structure/filter type

Data type: BAPIBETYP
Optional: Yes
Call by Reference: Yes

I_EXCL_SUBSTRU_TYPES - Structure/filter type

Data type: BAPIBETYP
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ERROR_OCCURRED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for BM_STRUCTURE_READ 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_structure_id  TYPE TTREE-ID, "   
lt_struct_nodes  TYPE STANDARD TABLE OF HIER_IFACE, "   
lv_struct_header  TYPE TTREE, "   
lv_error_occurred  TYPE TTREE, "   
lv_ignore_sfw_switches  TYPE CHAR1, "   SPACE
lv_node_id  TYPE TTREE-NODE_ID, "   
lt_struct_refs  TYPE STANDARD TABLE OF HIER_REF, "   
lv_struct_title  TYPE TTREET-TEXT, "   
lv_language  TYPE SY-LANGU, "   SY-LANGU
lv_struct_tadir  TYPE TADIR, "   
lt_struct_texts  TYPE STANDARD TABLE OF HIER_TEXTS, "   
lt_struct_occs  TYPE STANDARD TABLE OF HIER_OCC, "   
lv_insert_substru  TYPE UFFLAG, "   
lt_struct_params  TYPE STANDARD TABLE OF TTREE_APPL, "   
lv_text_of_references  TYPE UFFLAG, "   
lv_construct_tree  TYPE UFFLAG, "   'X'
lt_i_incl_substru_types  TYPE STANDARD TABLE OF BAPIBETYP, "   
lv_do_not_read_devclass  TYPE UFFLAG, "   'X'
lt_i_excl_substru_types  TYPE STANDARD TABLE OF BAPIBETYP, "   
lv_display_mode  TYPE CHAR1, "   'D'
lv_set_refnode_id_for_refs  TYPE CHAR1. "   SPACE

  CALL FUNCTION 'BM_STRUCTURE_READ'  "
    EXPORTING
         STRUCTURE_ID = lv_structure_id
         IGNORE_SFW_SWITCHES = lv_ignore_sfw_switches
         NODE_ID = lv_node_id
         LANGUAGE = lv_language
         INSERT_SUBSTRU = lv_insert_substru
         TEXT_OF_REFERENCES = lv_text_of_references
         CONSTRUCT_TREE = lv_construct_tree
         DO_NOT_READ_DEVCLASS = lv_do_not_read_devclass
         DISPLAY_MODE = lv_display_mode
         SET_REFNODE_ID_FOR_REFS = lv_set_refnode_id_for_refs
    IMPORTING
         STRUCT_HEADER = lv_struct_header
         STRUCT_TITLE = lv_struct_title
         STRUCT_TADIR = lv_struct_tadir
    TABLES
         STRUCT_NODES = lt_struct_nodes
         STRUCT_REFS = lt_struct_refs
         STRUCT_TEXTS = lt_struct_texts
         STRUCT_OCCS = lt_struct_occs
         STRUCT_PARAMS = lt_struct_params
         I_INCL_SUBSTRU_TYPES = lt_i_incl_substru_types
         I_EXCL_SUBSTRU_TYPES = lt_i_excl_substru_types
    EXCEPTIONS
        ERROR_OCCURRED = 1
. " BM_STRUCTURE_READ




ABAP code using 7.40 inline data declarations to call FM BM_STRUCTURE_READ

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.

"SELECT single ID FROM TTREE INTO @DATA(ld_structure_id).
 
 
 
 
DATA(ld_ignore_sfw_switches) = ' '.
 
"SELECT single NODE_ID FROM TTREE INTO @DATA(ld_node_id).
 
 
"SELECT single TEXT FROM TTREET INTO @DATA(ld_struct_title).
 
"SELECT single LANGU FROM SY INTO @DATA(ld_language).
DATA(ld_language) = SY-LANGU.
 
 
 
 
 
 
 
DATA(ld_construct_tree) = 'X'.
 
 
DATA(ld_do_not_read_devclass) = 'X'.
 
 
DATA(ld_display_mode) = 'D'.
 
DATA(ld_set_refnode_id_for_refs) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!