Set SAP ALV tree table for first display and user interaction

The following ABAP code and information shows you how to initiate an ALV Tree report ready for it's first display using the example ALVtree report. Simply follow the below instructions and copy and paste the ABAP code into the appropriate includes(PBO and FORM include).


* Add following code to 'STATUS_0100'(PBO module)
*------------------------------------------------*
* Create empty ALVtree control ready for first display
  PERFORM create_empty_alvtree_control.
* Add following code to 'Z......F01' INCLUDE
*-------------------------------------------*
*&-------------------------------------------------------------*
*&      Form  CREATE_EMPTY_ALVTREE_CONTROL
*&-------------------------------------------------------------*
*       Create empty tree control
*--------------------------------------------------------------*
FORM create_empty_alvtree_control.
* Create emty tree-control
  CLEAR: it_emptytab.
  REFRESH: it_emptytab.
  CALL METHOD gd_tree->set_table_for_first_display
     EXPORTING
               is_hierarchy_header  = gd_hierarchy_header
               it_list_commentary   = gd_report_title
               i_logo               = gd_logo
*               i_background_id      = 'ALV_BACKGROUND'
               i_save               = 'A'
               is_variant            = gd_variant
     CHANGING
               it_outtab            =  it_emptytab      "Must be empty
               it_fieldcatalog      =  gd_fieldcat.
ENDFORM.                    " CREATE_EMPTY_ALVTREE_CONTROL
  

Now set ALV tree object for first display ready for user interaction.
or return to full list of instruction on how to create an example ALVtree report


Related Articles

Activate user interaction within SAP ALV tree
Add button to SAP ALV tree toolbar using ABAP code
ABAP ALV Tree tutorial to create a fully working ALVTree Control SAP dynpro program
Create ALV Tree Custom control and add to sap dynpro screen
Final ABAP code for the ALV Tree PBO(..O01) and FORM(..F01) includes
Create SAP ALV Tree Container in ABAP dynpro screen container
Create Container and Object
Create ALV tree main program including Data & Event declaration
SAP ALV Tree fieldcatalog creation
Build SAP ALV tree Hierarchy
Build SAP ALV tree Hierarchy Header
Add alv tree already exists check to pbo module
Create all includes required for the ALV tree report
Full ABAP code listing of main ALV tree program
Module creation screen
Create SAP ALV Tree object within ABAP dynpro screen container/H1>
Create ok code to store ALV tree user interaction
Example Output from ALV tree display
Create screen control
Create Screen along with PBO and PAI modules
Create Pf-status(screen menu functionality)
Refresh ALVtree
Build Report Header(Title)
ALVtree toolbar processing
Implement user defined buttons to ALVtree toolbar
ALVtree user interaction processing
Implement ALVtree user interaction processing
Setup ALVtree variant
Main Steps to create ALV simple Tree(Using Objects)
Create Add Custom control to screen
Final code for the PBO(..O01) and FORM(..F01) includes
Create Container and Object
Create and register events for user interaction
Create ALVtree Hierarchy
Add already exists check!
Create Includes for ALVtree report
Full ABAP code listing of main program
Create Container and Object
Create screen control
Example Output from ALV simple tree display
Create screen control
Create Screen along with PBO and PAI modules
Create Pf-status(screen menu functionality)