SAP Function Modules

STREE_REFERENCE_TYPE_READ SAP Function module - Read link type data







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

Associated Function Group: SHI2
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM STREE_REFERENCE_TYPE_READ - STREE REFERENCE TYPE READ





CALL FUNCTION 'STREE_REFERENCE_TYPE_READ' "Read link type data
* EXPORTING
*   read_all_reference_types = ' '  " hier_types-char1
*   display_lang_only =         " trtypeh-active
  IMPORTING
    message =                   " hier_mess
* TABLES
*   i_reference_types =         " trtypeh
*   e_reference_types =         " trtypeh
*   e_reference_types_text =    " trtypet
    .  "  STREE_REFERENCE_TYPE_READ

ABAP code example for Function Module STREE_REFERENCE_TYPE_READ





The ABAP code below is a full code listing to execute function module STREE_REFERENCE_TYPE_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_message  TYPE HIER_MESS ,
it_i_reference_types  TYPE STANDARD TABLE OF TRTYPEH,"TABLES PARAM
wa_i_reference_types  LIKE LINE OF it_i_reference_types ,
it_e_reference_types  TYPE STANDARD TABLE OF TRTYPEH,"TABLES PARAM
wa_e_reference_types  LIKE LINE OF it_e_reference_types ,
it_e_reference_types_text  TYPE STANDARD TABLE OF TRTYPET,"TABLES PARAM
wa_e_reference_types_text  LIKE LINE OF it_e_reference_types_text .


DATA(ld_read_all_reference_types) = some text here

SELECT single ACTIVE
FROM TRTYPEH
INTO @DATA(ld_display_lang_only).


"populate fields of struture and append to itab
append wa_i_reference_types to it_i_reference_types.

"populate fields of struture and append to itab
append wa_e_reference_types to it_e_reference_types.

"populate fields of struture and append to itab
append wa_e_reference_types_text to it_e_reference_types_text. . CALL FUNCTION 'STREE_REFERENCE_TYPE_READ' * EXPORTING * read_all_reference_types = ld_read_all_reference_types * display_lang_only = ld_display_lang_only IMPORTING message = ld_message * TABLES * i_reference_types = it_i_reference_types * e_reference_types = it_e_reference_types * e_reference_types_text = it_e_reference_types_text . " STREE_REFERENCE_TYPE_READ
IF SY-SUBRC EQ 0. "All OK 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_message  TYPE HIER_MESS ,
ld_read_all_reference_types  TYPE HIER_TYPES-CHAR1 ,
it_i_reference_types  TYPE STANDARD TABLE OF TRTYPEH ,
wa_i_reference_types  LIKE LINE OF it_i_reference_types,
ld_display_lang_only  TYPE TRTYPEH-ACTIVE ,
it_e_reference_types  TYPE STANDARD TABLE OF TRTYPEH ,
wa_e_reference_types  LIKE LINE OF it_e_reference_types,
it_e_reference_types_text  TYPE STANDARD TABLE OF TRTYPET ,
wa_e_reference_types_text  LIKE LINE OF it_e_reference_types_text.


ld_read_all_reference_types = some text here

"populate fields of struture and append to itab
append wa_i_reference_types to it_i_reference_types.

SELECT single ACTIVE
FROM TRTYPEH
INTO ld_display_lang_only.


"populate fields of struture and append to itab
append wa_e_reference_types to it_e_reference_types.

"populate fields of struture and append to itab
append wa_e_reference_types_text to it_e_reference_types_text.

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