SAP Function Modules

EBA_OBJECT_TREE SAP Function module - INTERN: BOR-Objekt-Liste (als Baum)







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

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


Pattern for FM EBA_OBJECT_TREE - EBA OBJECT TREE





CALL FUNCTION 'EBA_OBJECT_TREE' "INTERN: BOR-Objekt-Liste (als Baum)
* EXPORTING
*   x_prgcontext =              " ebapres-prgcontext  Aufrufkontext - Programm
*   x_subcontext =              " ebapres-subcontext  Aufrufkontext - Subkontext
*   x_type_at_object = 'X'      " ebagen-kennzx  Kennzeichen: Typanzeige auf Objektebene
*   x_add_typenodes =           " ebagen-kennzx  Kennzeichen: Autom. Typknoten beim Typwechsel
*   x_title =                   " ebagen-title  Titelzeile
*   x_popup =                   " ebagen-kennzx  Kennzeichen: Anzeige im Popup
*   x_select_mode = 'D'         " ebagen-selectmode  Auswahlart (Einzel, Mehrfach, nur-Anzeige)
*   x_hotspot =                 " ebagen-kennzx  Kennzeichen: Schlüssel als Hotspot
*   x_callback_program =        " sy-repid      Callback-Programm
*   x_callback_user_command =   " sy-xform      Callback-Routine zur Befehlsbehandlung
*   x_callback_status =         " sy-xform      Callback-Routine zum Setzen des PF-Status
*   x_cua_status =              " sy-pfkey
  IMPORTING
    y_pickobj =                 " swotobjid     ausgewähltes Objekt (bei Einfachauswahl)
  TABLES
    t_objects =                 " ebaobjtree    Liste darzustellender BOR-Objekte
  EXCEPTIONS
    NO_OBJECTS = 1              "               T_OBJECTS ist leer
    .  "  EBA_OBJECT_TREE

ABAP code example for Function Module EBA_OBJECT_TREE





The ABAP code below is a full code listing to execute function module EBA_OBJECT_TREE 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_y_pickobj  TYPE SWOTOBJID ,
it_t_objects  TYPE STANDARD TABLE OF EBAOBJTREE,"TABLES PARAM
wa_t_objects  LIKE LINE OF it_t_objects .


SELECT single PRGCONTEXT
FROM EBAPRES
INTO @DATA(ld_x_prgcontext).


SELECT single SUBCONTEXT
FROM EBAPRES
INTO @DATA(ld_x_subcontext).


DATA(ld_x_type_at_object) = some text here

DATA(ld_x_add_typenodes) = some text here

DATA(ld_x_title) = some text here

DATA(ld_x_popup) = some text here

DATA(ld_x_select_mode) = some text here

DATA(ld_x_hotspot) = some text here
DATA(ld_x_callback_program) = 'some text here'.
DATA(ld_x_callback_user_command) = 'some text here'.
DATA(ld_x_callback_status) = 'some text here'.
DATA(ld_x_cua_status) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_objects to it_t_objects. . CALL FUNCTION 'EBA_OBJECT_TREE' * EXPORTING * x_prgcontext = ld_x_prgcontext * x_subcontext = ld_x_subcontext * x_type_at_object = ld_x_type_at_object * x_add_typenodes = ld_x_add_typenodes * x_title = ld_x_title * x_popup = ld_x_popup * x_select_mode = ld_x_select_mode * x_hotspot = ld_x_hotspot * x_callback_program = ld_x_callback_program * x_callback_user_command = ld_x_callback_user_command * x_callback_status = ld_x_callback_status * x_cua_status = ld_x_cua_status IMPORTING y_pickobj = ld_y_pickobj TABLES t_objects = it_t_objects EXCEPTIONS NO_OBJECTS = 1 . " EBA_OBJECT_TREE
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_y_pickobj  TYPE SWOTOBJID ,
ld_x_prgcontext  TYPE EBAPRES-PRGCONTEXT ,
it_t_objects  TYPE STANDARD TABLE OF EBAOBJTREE ,
wa_t_objects  LIKE LINE OF it_t_objects,
ld_x_subcontext  TYPE EBAPRES-SUBCONTEXT ,
ld_x_type_at_object  TYPE EBAGEN-KENNZX ,
ld_x_add_typenodes  TYPE EBAGEN-KENNZX ,
ld_x_title  TYPE EBAGEN-TITLE ,
ld_x_popup  TYPE EBAGEN-KENNZX ,
ld_x_select_mode  TYPE EBAGEN-SELECTMODE ,
ld_x_hotspot  TYPE EBAGEN-KENNZX ,
ld_x_callback_program  TYPE SY-REPID ,
ld_x_callback_user_command  TYPE SY-XFORM ,
ld_x_callback_status  TYPE SY-XFORM ,
ld_x_cua_status  TYPE SY-PFKEY .


SELECT single PRGCONTEXT
FROM EBAPRES
INTO ld_x_prgcontext.


"populate fields of struture and append to itab
append wa_t_objects to it_t_objects.

SELECT single SUBCONTEXT
FROM EBAPRES
INTO ld_x_subcontext.


ld_x_type_at_object = some text here

ld_x_add_typenodes = some text here

ld_x_title = some text here

ld_x_popup = some text here

ld_x_select_mode = some text here

ld_x_hotspot = some text here
ld_x_callback_program = 'some text here'.
ld_x_callback_user_command = 'some text here'.
ld_x_callback_status = 'some text here'.
ld_x_cua_status = 'some text here'.

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