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

Program to add node / delete node in the tree control via abap object

Hi all,

i am new to abap objects.

Can anyone help me out to give program about add node , delete node at

a particular point in tree hierarchy.

folder1 -- level 1

  • subfolder1 -- level 2

*********subfolder1 -- level 3

*********subfolder2 -- level 3

  • subfolder2 -- level 2

folder2 -- level 1

if i select level3 and click on ADD button .....i get a facility to add new node

at level 3 and and same thing can happen at level1 and level2 ............ if i select

and folder at level3 and click on delete button ....it should delete that folder...

if you do not have such program ........then guide me how to achieve this target via object oriented because i have to split the screen also and have to show some alve display in that.

just guide me how to add and delete node at a particular level in tree structure....

thanks in advance........

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2007 at 12:24 PM

    Hi Ravi,

    you can do the same by updating the internal table which you are passing to the method and refresh the tree.

    the steps are:

    1. select the node and click add/delete

    2. when the event is raised or if you are handling the function in PAI then

    a) Get the selected node

    b) call method to delete node depending upon the class you use

    3. refresh the tree

    Hope this help.

    get back to me for further questions

    Regards,

    kinshuk

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2007 at 12:46 PM

    Hi,

    U can Acheive this By calling the following Methods whenever u want to add the Node use method "EXPAND_NODE" and for deleting the node "TREE_DELETE_NODE".

    Call the above methods in PAI of the Main Screen Based on the Delete or Add Function Selected.

    Regards,

    Ranjit Thakur.

    <b>Please Mark The Helpful Answer.</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2007 at 12:37 PM

    dear Kinshuk

    can u please give me any program regarding this tree to add and delete node.

    i want to do it like it happend in redifmail or any email as to add and delete your folder.

    i am new to abap objects.

    i am using CL_GUI_ALV_TREE .....or you can give me of CL_GUI_ALV_TREE_SIMPLE also..........

    i have set this as my target to learn abap object concepts.

    i know c++ but not grip on abap objects till now.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2007 at 12:41 PM

    Hello Ravi,

    Try this demo program:

    <b>BCALV_TREE_01</b>

    <b>BCALV_TREE_DEMO</b>

    BCALV_TREE_SIMPLE_DEMO

    Also try:

    BCALV_TREE_02

    BCALV_TREE_03

    BCALV_TREE_04

    BCALV_TREE_05

    BCALV_TREE_06

    regards,

    Beejal

    **reward if this helps

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 05:18 AM

    if anyone has already done this .....can u plz send me the abap object code ...to add node and delete node at a particular leve in tree hierarchy.

    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.