SAP SDU_MARK_TREE_FETCH Function Module for









SDU_MARK_TREE_FETCH is a standard sdu mark tree fetch 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 sdu mark tree fetch FM, simply by entering the name SDU_MARK_TREE_FETCH into the relevant SAP transaction such as SE37 or SE38.

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



Function SDU_MARK_TREE_FETCH 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 'SDU_MARK_TREE_FETCH'"
EXPORTING
* LANGU = SY-LANGU "
* LEVEL = '*' "Read to hierarchy level;*=everything
* WITH_TEXT = 'X' "Objects with or without long text; 'X' = with text
* ONLY_STANDARD_VIEW = ' ' "

TABLES
* ENTITIES = "Entities read
* HIERARCHY = "Assignments read
* MODELS = "Data models read
OBJECT_LIST = "Objects to be read

EXCEPTIONS
NOT_FILLED = 1 NOT_FOUND = 2 WRONG_TYPE = 3
.



IMPORTING Parameters details for SDU_MARK_TREE_FETCH

LANGU -

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

LEVEL - Read to hierarchy level;*=everything

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

WITH_TEXT - Objects with or without long text; 'X' = with text

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

ONLY_STANDARD_VIEW -

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

TABLES Parameters details for SDU_MARK_TREE_FETCH

ENTITIES - Entities read

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

HIERARCHY - Assignments read

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

MODELS - Data models read

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

OBJECT_LIST - Objects to be read

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

EXCEPTIONS details

NOT_FILLED - Table OBJECT_LIST is empty

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

NOT_FOUND - No selection made

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

WRONG_TYPE - Incorrect type entered in OBJECT_LIST

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

Copy and paste ABAP code example for SDU_MARK_TREE_FETCH 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_langu  TYPE STRING, "   SY-LANGU
lt_entities  TYPE STANDARD TABLE OF DM02V, "   
lv_not_filled  TYPE DM02V, "   
lv_level  TYPE DM02V, "   '*'
lt_hierarchy  TYPE STANDARD TABLE OF DM41S, "   
lv_not_found  TYPE DM41S, "   
lt_models  TYPE STANDARD TABLE OF DM40V, "   
lv_with_text  TYPE DM40V, "   'X'
lv_wrong_type  TYPE DM40V, "   
lt_object_list  TYPE STANDARD TABLE OF DMOBJECT, "   
lv_only_standard_view  TYPE SY-INPUT. "   SPACE

  CALL FUNCTION 'SDU_MARK_TREE_FETCH'  "
    EXPORTING
         LANGU = lv_langu
         LEVEL = lv_level
         WITH_TEXT = lv_with_text
         ONLY_STANDARD_VIEW = lv_only_standard_view
    TABLES
         ENTITIES = lt_entities
         HIERARCHY = lt_hierarchy
         MODELS = lt_models
         OBJECT_LIST = lt_object_list
    EXCEPTIONS
        NOT_FILLED = 1
        NOT_FOUND = 2
        WRONG_TYPE = 3
. " SDU_MARK_TREE_FETCH




ABAP code using 7.40 inline data declarations to call FM SDU_MARK_TREE_FETCH

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.

DATA(ld_langu) = SY-LANGU.
 
 
 
DATA(ld_level) = '*'.
 
 
 
 
DATA(ld_with_text) = 'X'.
 
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_only_standard_view).
DATA(ld_only_standard_view) = ' '.
 


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!