How to create a Child node in Tree object
Hi All,
I have a thought to create a tree with a child object, that the child can able to create through by right click the parent tree having the options to create or delete the child objects.Please Suggest me if there is an possible way.
Thanks
Gopinath
Look at sample programm BCALV_TREE_DEMO,
and especially at the methods ADD_NODE or DELETE_SUBTREE of class CL_GUI_ALV_TREE.
For implementing the context menu, consider event ITEM_CONTEXT_MENU_REQUEST.
Regards,
Ulrich
Similar Messages
-
How to add child node in Tree table programmetically
Jdev Version 11.1.1.4.0.
I have created tree table programmetically in bean.
I have to add child node to tree table component on button click event on page.
Please let me know how to do this in bean.
Regards,
KiranHow are you creating the tree pro-grammatically?
If you are adding a new node to underlying data structure and refresh the tree - the tree will get updated with the new data.
Thanks,
Navaneeth -
How to create multiple root node in a tree
Hi Experts,
As per my requirement I have two requirements for tree creation:
1) Create a Tree which can display multiple root node.
2) Cretae a Tree which can display data directy without any folder.
I am new in Tree development.
Can any body help me out to get it done.
If it is not possible then also i need a confirmation from experts.
Regards,
Madhuuse method add_node of the class Cl_gui_alv_tree to add a node to the tree.
In case of root node the parameter lv_relat_key is passed as blank.In order to create further child nodes pass the node key of the parent as the relat key of the child and use the method again.
Regards,
Abhi -
How create Nested Child Nodes in XML Forms
Hello All:
I am very new to XML Forms/KM. I am trying to figure out a way to create Nested Child Nodes schema in XML Forms. Is there a way we can do it?
Thanks and Regards,
Vasu.Document document;
NodeList[] dataNodeList=new NodeList[2];
NodeList nodeList=document.getElementsByTagName("MyData");
for(int i=0; i<nodeList.getLength(); i++)
dataNodeList=nodeList.getChildNodes(); -
How to get Text for nodes in Tree Structure
Hi Friends,
How to get Text for nodes in Tree Structure
REPORT YFIIN_REP_TREE_STRUCTURE no standard page heading.
I N I T I A L I Z A T I O N
INITIALIZATION.
AUTHORITY-CHECK OBJECT 'ZPRCHK_NEW' :
ID 'YFIINICD' FIELD SY-TCODE.
IF SY-SUBRC NE 0.
MESSAGE I000(yFI02) with SY-TCODE .
LEAVE PROGRAM.
ENDIF.
class screen_init definition create private.
Public section
public section.
class-methods init_screen.
methods constructor.
Private section
private section.
data: container1 type ref to cl_gui_custom_container,
container2 type ref to cl_gui_custom_container,
tree type ref to cl_gui_simple_tree.
methods: fill_tree.
endclass.
Class for Handling Events
class screen_handler definition.
Public section
public section.
methods: constructor importing container
type ref to cl_gui_custom_container,
handle_node_double_click
for event node_double_click
of cl_gui_simple_tree
importing node_key .
Private section
private section.
endclass.
*& Classes implementation
class screen_init implementation.
*& Method INIT_SCREEN
method init_screen.
data screen type ref to screen_init.
create object screen.
endmethod.
*& Method CONSTRUCTOR
method constructor.
data: events type cntl_simple_events,
event like line of events,
event_handler type ref to screen_handler.
create object: container1 exporting container_name = 'CUSTOM_1',
tree exporting parent = container1
node_selection_mode =
cl_gui_simple_tree=>node_sel_mode_multiple.
create object: container2 exporting container_name = 'CUSTOM_2',
event_handler exporting container = container2.
event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
event-appl_event = ' '. "system event, does not trigger PAI
append event to events.
call method tree->set_registered_events
exporting events = events.
set handler event_handler->handle_node_double_click for tree.
call method: me->fill_tree.
endmethod.
*& Method FILL_TREE
method fill_tree.
data: node_table type table of abdemonode,
node type abdemonode.
types: begin of tree_node,
folder(50) type c,
tcode(60) type c,
tcode1(60) type c,
tcode2(60) type c,
text(60) type c,
text1(60) type c,
text2(60) type c,
end of tree_node.
data: wa_tree_node type tree_node,
t_tree_node type table of tree_node.
wa_tree_node-folder = text-001.
wa_tree_node-tcode = text-002.
wa_tree_node-text = 'Creditors ageing'.
wa_tree_node-tcode1 = text-003.
wa_tree_node-text1 = 'GR/IR aging'.
wa_tree_node-tcode2 = text-004.
wa_tree_node-text2 = 'Bank Balance'.
append wa_tree_node to t_tree_node.
clear wa_tree_node .
wa_tree_node-folder = text-005.
wa_tree_node-tcode = text-006.
wa_tree_node-text = 'Creditors ageing'.
wa_tree_node-tcode1 = text-007.
wa_tree_node-text1 = 'Creditors ageing'.
wa_tree_node-tcode2 = text-008.
wa_tree_node-text2 = 'Creditors ageing'.
append wa_tree_node to t_tree_node.
clear wa_tree_node .
wa_tree_node-folder = text-009.
wa_tree_node-tcode = text-010.
wa_tree_node-text = 'Creditors ageing'.
wa_tree_node-tcode1 = text-011.
wa_tree_node-text1 = 'Creditors ageing'.
wa_tree_node-tcode2 = text-012.
wa_tree_node-text2 = 'Creditors ageing'.
append wa_tree_node to t_tree_node.
clear wa_tree_node .
node-hidden = ' '. " All nodes are visible,
node-disabled = ' '. " selectable,
node-isfolder = 'X'. " a folder,
node-expander = ' '. " have no '+' sign forexpansion.
loop at t_tree_node into wa_tree_node.
at new folder.
node-isfolder = 'X'. " a folder,
node-node_key = wa_tree_node-folder.
clear node-relatkey.
clear node-relatship.
node-text = wa_tree_node-folder.
node-n_image = ' '.
node-exp_image = ' '.
append node to node_table.
endat.
at new tcode .
node-isfolder = ' '. " a folder,
node-n_image = '@CS@'. "AV is the internal code
node-exp_image = '@CS@'. "for an airplane icon
node-node_key = wa_tree_node-tcode.
node-text = wa_tree_node-text .
node-relatkey = wa_tree_node-folder.
node-relatship = cl_gui_simple_tree=>relat_last_child.
endat.
append node to node_table.
at new tcode1 .
node-isfolder = ' '. " a folder,
node-n_image = '@CS@'. "AV is the internal code
node-exp_image = '@CS@'. "for an airplane icon
node-node_key = wa_tree_node-tcode1.
node-relatkey = wa_tree_node-folder.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-text = wa_tree_node-text1.
endat.
append node to node_table.
at new tcode2 .
node-isfolder = ' '. " a folder,
node-n_image = '@CS@'. "AV is the internal code
node-exp_image = '@CS@'. "for an airplane icon
node-node_key = wa_tree_node-tcode2.
node-relatkey = wa_tree_node-folder.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-text = wa_tree_node-text2.
endat.
append node to node_table.
endloop.
call method tree->add_nodes
exporting table_structure_name = 'ABDEMONODE'
node_table = node_table.
endmethod.
endclass.
*& Class implementation
class screen_handler implementation.
*& Method CONSTRUCTOR
method constructor.
create object: HTML_VIEWER exporting PARENT = CONTAINER,
LIST_VIEWER exporting I_PARENT = CONTAINER.
endmethod.
*& Method HANDLE_NODE_DOUBLE_CLICK
method handle_node_double_click.
case node_key(12).
when 'Creditors'.
submit YFIIN_REP_CREADITORS_AGING via selection-screen and return.
when 'Vendor'.
submit YFIIN_REP_VENDOR_OUTSTANDING via selection-screen and return.
when 'Customer'.
submit YFIIN_REP_CUSTOMER_OUTSTANDING via selection-screen and
return.
when 'GR/IR'.
submit YFIIN_REP_GRIR_AGING via selection-screen and return.
when 'Acc_Doc_List'.
submit YFIIN_REP_ACCOUNTINGDOCLIST via selection-screen and return.
when 'Bank Bal'.
submit YFIIN_REP_BANKBALANCE via selection-screen and return.
when 'Ven_Cus_Dtl'.
submit YFIIN_REP_VENDORCUST_DETAIL via selection-screen and return.
when 'G/L_Open_Bal'.
submit YFIIN_REP_OPENINGBALANCE via selection-screen and return.
when 'Usr_Authn'.
submit YFIIN_REP_USERAUTHRIZATION via selection-screen and return.
endcase.
endmethod.
endclass.
Program execution ************************************************
load-of-program.
call screen 9001.
at selection-screen.
Dialog Modules PBO
*& Module STATUS_9001 OUTPUT
text
module status_9001 output.
set pf-status 'SCREEN_9001'.
set titlebar 'TIT_9001'.
call method screen_init=>init_screen.
endmodule. " STATUS_9001 OUTPUT
Dialog Modules PAI
*& Module USER_COMMAND_9001 INPUT
text
module user_command_9001 input.
endmodule. " USER_COMMAND_9001 INPUT
*& Module exit_9001 INPUT
text
module exit_9001 input.
case sy-ucomm.
when 'EXIT'.
set screen 0.
endcase.
endmodule.
exit_9001 INPUTyou can read the table node_table with nody key value which imports when docubble click the the tree node (Double clifk event).
Regards,
Gopi .
Reward points if helpfull. -
How to create a context node for "IBHeader" at the view "BuPaIBaseDetail"?
hi, experts
for the requirement, i have to get data from a root BO-IBHeader in the view of "BuPaIBaseDetail".But the view already has IBHeader's child object-"IBComponent", whose controller class is "CL_CRM_IC_BUPACONTROLLER_CN08", how can i create the context node for "IBHeader"?
angerly wait for the answer. thanks a lotIf you right click on an empty container or a container with an object in it, it has the same available choices to select. However, if you create a blank property node on the block diagram, and wire up the .net object to it, you will see a much different list of properties.
So, the property node created from right clicking a .NET container will be for that container, even if there is an object inside. To create a property node for the object, you must wire the .NET object to an empty property node on the block diagram.
Chris Van Horn
Applications Engineer -
How can provide parent-child nodes relation ships?
how can provide parent-child nodes relation ships?
I was under the impression that scenegraph is like a JTree. But in JavaFX only leaf node rendering in scenegraph. This situation was confusing my mind. In JavaFX CustomNode must be extending and return a group for custom leaf. If we want to a create parent-child node hierarchy we are create CustomNode that return a group and this group contain an another group,etc. So there is maybe only a way. If you learning to JavaFX first time.This way don't look familiar.
-
ABAP MAPPING Querry - How to create Different Target NODE NAME as of Source
Hi,
In abap Mapping
<b>DATA READ FROM SOURCE XML NODE into <u>incode</u></b> ******
data: incode type ref to if_ixml_node_collection.
incode = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
<b>CREATE OUTPUT XML NODE WITH SAME NAME AS <u>'BUSINESS_DAY'</u></b> **
data: outcode type ref to if_ixml_node.
outcode = incode->get_item( index = 0 ).
data irc type i.
irc = msgtype->append_child( outcode ).
*<b>BUT TO CREATE OUTPUT XML NODE WITH <u>DIFFERENT NAME AS 'BUSS_DAY'</u></b>*
data: ws_val type string VALUE 'xyz'.
data: elementsender type ref to if_ixml_element.
elementsender = odocument->create_simple_element(
name = 'BUSS_DAY'
value = ws_val
parent = msgtype ).
<b>Please guide me how I can assign <u>incode</u> value to ws_val.
So that I can generate <u>OUTPUT XML NODE with different name as of SOURCE XML NODE</u></b>
i.e. How to create Different Target NODE NAME as of
Source with same Data
<Note>: I am using "How to... Use ABAP Mapping in XI 3.0 ver.1.00" and to create different NODE name as of source
is not given in it.
Thanks & Regards.Hi ABAPers,
Please Guide Me .....
<u>This is ABAP Mapping problem in XI.</u>
<b>How can I read data from incode into ws_val.</b>
data: <b>ws_val</b> type string
data: <b>incode</b> type ref to if_ixml_node_collection.
<b>incode</b> = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
Best Regards -
How to create Parent Child relationship of Assets
Hi All
can any one provide the solution for the below mention requirment.
Problem Description: How to create Parent Child relationship of Assets in below case.
1. If asset Category of Child assets are different but both parent & child assets are already capitalized.
2. If asset Category of Child assets are same but both parent & child assets are already capitalized.
3. If asset Category of Child assets are same for new assets.Hi All
can any one provide the solution for the below mention requirment.
Problem Description: How to create Parent Child relationship of Assets in below case.
1. If asset Category of Child assets are different but both parent & child assets are already capitalized.
2. If asset Category of Child assets are same but both parent & child assets are already capitalized.
3. If asset Category of Child assets are same for new assets. -
How to fetch the child Nodes using XNode
Hi All,
How to fetch child nodes of XNode object ?
I am moving my code to .net 3.5 so i was replacing XMLNode to XNode , but i could find any ChildNodes() method.
Thanks,
PallaviAs such this is not a SharePoint related question, even though there are many way to parse the XNode object.
One way is,
XNode an all other are derived from XElement, so you can use Linq to get all children by casting it with XElement, below is a snippet
XDocument doc = XDocument.Load(""); //Path
XElement ele = doc.Nodes().First() as XElement;//Just taking the first element as XNode
foreach (var item in ele.Elements())
var v = item;
You can use Full Linq queries to find any node, just for example, below is a snipped to find a node based on a attribute value
ele.Elements().Where(x => x.Attribute("text").Value == "text");
get2pallav
Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you. -
How to create a "Child" page?
Hi there,
I have been watching tutorials on Apple's site and cannot find any help on how to create a Child Page in iWeb. In other words, how to create pages "under" other pages?
Any advices?
Thanks,
PapaChilliWeb doesn't provide the capability to do this natively, but see the +"Drop Down Menus in iWeb"+ section HERE. And you'll find more suggestions by doing THIS.
-
Child nodes as document object
I have a xml document as follows:
<Root>
<Header><Name></Name></Header>
<Message><Type></Type></Message>
</Root>
I can read entire xml file into document object. Now I want to take only <Message> elements (Including Message child nodes) into document object, How can I do that.There's a usable xml parser API in Java core library.
-
How to create authorization in BI 7.0 objects
Dear Friends,
how to create authorization in BI 7.0 objects. Pls any body help. tghjis is morevhelpful for me
Regards
Ramanagive the user name to whom you have to give the authorizations.
maintain user then you can see the roles tab where you can assign the roles for the user.
for these roles you can assign the authorization objects. when you double click on the roles you can get the maintenance of the role where you can edit or give the authorization objects for that role.
some example for the authorization objects are:
S_RS_ADMWB (Datawarehouse workbench-objects), S_RS_IOBJ(Datawarehouse workbench-Infoobject), S_RS_DS(Datawarehouse workbench-Datasoure for release greater than 3.X), S_RS_DTP(Datawarehouse workbench-DTP's) etc
You can edit these authorization objects like providing them display or create or modifying authorizations
Go through the below link:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/659fa0a2-0a01-0010-b39c-8f92b19fbfea -
Re: How to create More two class with one object
haii,
i have small information How to create More two class with one object,
bye
bye
babuHello
I assume you want to create multiple instance of your class.
Assuming that you class is NOT a singleton then simply repeat the CREATE OBJECT statement as many times as you need.
TYPES: begin of ty_s_class.
TYPES: instance TYPE REF TO zcl_myclass.
TYPES: end of ty_s_class.
DATA:
lt_itab TYPE STANDARD TABLE OF ty_s_class
WITH DEFAULT KEY,
ls_record TYPE ty_s_class.
DO 10 TIMES.
CLEAR: ls_record-instance.
CREATE OBJECT ls_record-instance.
APPEND ls_record TO lt_itab.
ENDDO.
Regards
Uwe -
How to retrieve a child node's immediate parent node from a tree table?
Hello
Hi,
I have a category_subcategories table, and I would like to know how to construct a sql and sub-sql for retrieving a child node's immediate parent node.
Here is my first part of the sql, it only returns the node "Flash"'s parent and its grand-parents:
SELECT parent.category_name, node.lft, node.rgt
FROM category_subcategories AS node,
category_subcategories AS parent
WHERE node.lft > parent.lft AND node.lft < parent.rgt
AND node.category_name = 'FLASH'
ORDER BY parent.lft;
| name |
| ELECTRONICS |
| PORTABLE ELECTRONICS |
| MP3 PLAYERS | |
how can I modify this query so that it returns Flash' parent - 'MP3 Players'?
Thanks a lot
SamHi,
This is an Oracle forum. If you're not iusing Oracle, make that clear. Always say what version of your softwate you're using, whether it's Oracle or anything else.
Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data. Explain how you get those results from that data.
It looks like you're using the Nested Sets technique for modeling a tree. To get the parents of given nodes, do something like this:
SELECT parent.category_name
, node.lft
, node.rgt
FROM category_subcategories node -- Can't use AS with table alias in Oracle
, category_subcategories parent
WHERE parent.lft IN (
SELECT MAX (lft)
FROM category_subcategories
WHERE lft < node.lft
AND rgt > node.rgt
AND node.category_name = 'FLASH'
ORDER BY parent.lft; This should work in Oracle 8.1 and up. (I can't actually test it unless you post CREATE TABLE and INSERT statements for some sample data). You may need to modify the syntax a little for your database.
785102 wrote:
Hello,
I tried to implement the solution as follow:
mysql> select parent.*
-> from category_subcategories as parent
-> having parent.lft =
-> (select max(parent.lft) from
-> (SELECT parent.category_name, parent.lft, parent.rgt
-> FROM category_subcategories AS node,
-> category_subcategories AS parent
-> WHERE node.lft > parent.lft AND node.lft < parent.rgt
-> AND node.category_name = 'Sofa'
-> ORDER BY parent.lft
-> )
-> );
ERROR 1248 (42000): Every derived table must have its own alias
mysql>
But I got an error.
What is wrong with it?What does the error message say?
Apparantly, in your system (unlike Oracle), every sub-query must have a name. Try something like this:
select parent.*
from category_subcategories as parent
having parent.lft = (
select max(parent.lft)
from (
SELECT parent.category_name
, parent.lft
, parent.rgt
FROM category_subcategories AS node,
category_subcategories AS parent
WHERE node.lft > parent.lft
AND node.lft < parent.rgt
AND node.category_name = 'Sofa'
ORDER BY parent.lft -- Is this a waste of effort?
) AS got_name_lft_and_rgt
) AS got_lft
;What is the purpose of having the inner sub-query, the one I called got_name_lft_and_rgt?
Also, in Oracle, an ORDER BY clause in a sub-query doesn;t guarantee that any super-queries will keep that order. Why do you have an ORDER BY clause in the sub-query, and not in the main query?
Maybe you are looking for
-
Previewing epub in adobe digital editions, it says "author unknown"
I filled in all the metadata in InDesign (CS5.5), exported to epub, opened to preview in Adobe Digital Editions. All looks good, except it says "author unknown." Does anyone know about this? How to get "author name" to show up?
-
When playing a movie in web gallery I have to wait until the line below the movie slowly crosses to the following side. It is as though the movie is being downloaded before you can play it through. Is this normal, or am I missing out a step before cl
-
I tried updating firefox as well and get message to close firefox first
-
Unable to stop repeated pop-up
The following keeps appearing when I'm using email "Cannot get mail. The connection to the server failed.". Although everything appears to be working fine, something is obviously wrong. It is quite annoying, Anyone have any suggestions as to what is
-
Which audio interface should I pick?
So I recently purchased a brand new MBP, and am pleased to discover that my Tascam US-122 that I have been working with for the past 8 years (and four computers) has finally stopped being compatible with my computer. That, then, gives me the task of