Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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........

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Hi Ravi,

Please check this standard program

<b>BCALV_TREE_DEMO</b>. Hope this will help you.

Thanks & Regards,

Siri.

0 Kudos

Hi Ravi,

Here is a list of demo programs for tree

BCALV_TREE_01

BCALV_TREE_02

BCALV_TREE_03

BCALV_TREE_04

BCALV_TREE_05

BCALV_TREE_06

BCALV_TREE_DEMO

BCALV_TREE_DND

hope this helps.

Regards,

kinshuk

Former Member
0 Kudos

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

Former Member
0 Kudos

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>

Former Member
0 Kudos

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.