Skip to Content
author's profile photo Former Member
Former Member

tree controle using abap oops

Hi,

I need a sample programe on Alv Tree controle using opps

Regards,

Madhu.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 03:50 PM

    CHeck Txn DWDM. This Txn provides severeal examples for GUI Controls ...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 24, 2006 at 03:53 PM

    Hi,

    check thse examples..

    BCALV_TREE_01

    BCALV_TREE_02

    BCALV_TREE_03

    BCALV_TREE_04

    BCALV_TREE_05

    BCALV_TREE_06

    BCALV_TREE_DEMO

    Regards

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 03:54 PM

    have u checked this

    BCALV_TREE_01

    BCALV_TREE_SIMPLE_DEMO

    Message was edited by: Sekhar

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 24, 2006 at 03:55 PM

    Hi,

    Check this link , here you have some tree alv examples.

    http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm

    Regards

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 03:58 PM
    This method does not need a seperate screen but a selection screen is must. 
    
    Data: 
    dock_container type ref to cl_gui_docking_container, 
    tree1 type ref to cl_gui_alv_tree_simple. 
    
    
    *A docking container does not explicitly need a screen for it.It can be 
    *placed on the selection screen itself.Here we are using the screen 
    *which is used for the alvgrid. 
    *First create a docking container with dock at left 
    
    
    if dock_container is initial. 
    
    create object dock_container 
    exporting 
    * PARENT = 
    repid = g_repid 
    dynnr = g_dynnr 
    side = dock_container->dock_at_left 
    extension = 300 
    * STYLE = 
    * LIFETIME = lifetime_default 
    * CAPTION = 'jkhbnjkhk' 
    * METRIC = 4 
    * RATIO = 80 
    * NO_AUTODEF_PROGID_DYNNR = 
    name = 'dockkkkkk' 
    * EXCEPTIONS 
    * CNTL_ERROR = 1 
    * CNTL_SYSTEM_ERROR = 2 
    * CREATE_ERROR = 3 
    * LIFETIME_ERROR = 4 
    * LIFETIME_DYNPRO_DYNPRO_LINK = 5 
    * others = 6 
    . 
    endif. 
    
    *Secondly create the field cat for the alv to be disp in dock container 
    call function 'LVC_FIELDCATALOG_MERGE' 
    exporting 
    * I_BUFFER_ACTIVE = 
    i_structure_name = 'ZC9_STRUCT' 
    * I_CLIENT_NEVER_DISPLAY = 'X' 
    * I_BYPASSING_BUFFER = 
    changing 
    ct_fieldcat = i_fcat[] 
    * EXCEPTIONS 
    * INCONSISTENT_INTERFACE = 1 
    * PROGRAM_ERROR = 2 
    * OTHERS = 3 
    . 
    if tree1 is initial. 
    
    *Thirdly create the tree1 object for the ALV with parent as docking 
    *container 
    create object tree1 
    exporting 
    * I_LIFETIME = 
    i_parent = dock_container 
    * I_SHELLSTYLE = 
    * I_NODE_SELECTION_MODE = 
    *cl_gui_column_Tree=>NODE_SEL_MODE_SINGLE 
    * I_HIDE_SELECTION = 
    * I_ITEM_SELECTION = 'X' 
    * I_NO_TOOLBAR = 
    i_no_html_header = '' 
    * I_PRINT = 
    * EXCEPTIONS 
    * CNTL_ERROR = 1 
    * CNTL_SYSTEM_ERROR = 2 
    * CREATE_ERROR = 3 
    * LIFETIME_ERROR = 4 
    * ILLEGAL_NODE_SELECTION_MODE = 5 
    * FAILED = 6 
    * ILLEGAL_COLUMN_NAME = 7 
    * others = 8 
    . 
    *Finally create a tree with the below method. (Sort table need to be *passed) 
    call method tree1->set_table_for_first_display 
    exporting 
    * I_BYPASSING_BUFFER = 
    * I_BUFFER_ACTIVE = 
    * I_CONSISTENCY_CHECK = 
    i_structure_name = 'ZC9_STRUCT' 
    it_list_commentary = pt_list_commentary 
    i_logo = l_logo 
    * IS_VARIANT = 
    * I_SAVE = 
    * I_DEFAULT = 'X' 
    is_layout = gs_layout_tree 
    * IS_PRINT = 
    * IT_SPECIAL_GROUPS = 
    * IT_TOOLBAR_EXCLUDING = 
    * IT_HYPERLINK = 
    * IT_ALV_GRAPHICS = 
    * IT_EXCEPT_QINFO = 
    changing 
    it_outtab = itab[] 
    * it_fieldcatalog = i_fcat1[] 
    it_sort = gt_sort_grid[]
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.