Embedding a table in a tree structure in an in WebDynpro application
Hi All,
I need an application that displays a table dynamically in a tree structure as it's child node.
Can any one suggest me how to approach ?
Hi SMI SAP Project Team,
Please check the code for loop and lead selection when you setting the values.
for( f = 0; f < e; f++)
Refer to below documents:
initializing AbstractList Model in Custom Controller
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/761eba66-0401-0010-b982-d5f5bd9e8f90?quicklink=index&overridelayout=true
Hope it will helps
Regards
Arun
Similar Messages
-
Tree Structure-context-TableUI
I have created a tree structure and I populate the values from tree structure to a table and I have edit button in table if i click edit i can change the value populated from tree structure and my question is how can i get the changed value from table back to tree structure context. can you provide the programming I'm new to java development.
Thanks,
MeenuHi Meenu,
first step you need to copy the diaply ttable node to avlue node, then you need to the modifications in the table data, then you need to have a update table node,in as a tables parameter in your bapi, so that you can update the data in the nackend also,
create seprate methods for everymethod returning bapi.
every bpi of rfc a have disply the data and save the data or update the data methods, if it is related to modification of data, please abseve the bapi funcationality to develop the appl;ication.
may be it will help you,
Cheers,
Apparao -
How to create a form on a tree structured table
Hi,
I have a table that is designed to do a tree structure like:
Table Name: test
Fields:
ID
ParentID
Description
I created a browser (IR) (page 1) that calls a form (page 2)
The form has the editing fields and at the bottom layer I have a reports region where I display the children records using a query like:
select * from test where ParentID = :P2_ID
I need at the region level to add a button to call a form to edit the child record (which is the same table) and when done, to return to the form again but to the parent record.
How can I do that successfully? Is there any example:?
Thank youMaybe this can help:
http://apex.oracle.com/pls/otn/f?p=31517:157
using instead of trigger on a view.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Integration of a Tree Structure in a Web Dynpro Table
Hi,
I am implementing an Integration of a Tree Structure in a Web Dynpro Table.
The Tree-Table os working as required, but I can not work with the OnLeadSelect Action of the table.
The Action does not work as required, meanning, it returns all the time the first row and not the "lead select".
As far as I read I should add some code to the wdDoModifyView method, but I did not figure out exactly what...
Thanks in advance,
Aviadcheck this URL:
/people/valery.silaev/blog/2005/06/20/master-of-columns-part-ii -
How to Integration of a tree Structure in a table CE 7.1 (not in 2004s)
Hi Experts,
I couldn't find any column type like "MasterColumn of the type TreeByNestingTableColumn".
I am able creation application in 2004s not in CE 7.1.
Please any one help me to solve this problem.
Regards,
Satya.Hi
what erectly the problem is ?
Things are same in CE 7.1 also.
Check this [thread|Help on WebDynpro - Tree Structure in a Table;
BR
Satish Kumar
Edited by: satish jhariya on Mar 3, 2009 11:35 AM -
How do I implement Tree structure in table in JSP?
Hi
how do I implement Tree structure in table in JSP? any body suggest?
Thanks
sivaIf you're using JSP+JSTL, use the JSTL's c:forEach tag. If you're using JSP+JSF, use the Tomahawk's t:tree tag.
-
How to create a tree structure using forms.
Hi,
How do i create a tree structure using oracle forms,i have a table named Functions and a specific column 'Function Name' should be displayed in the tree nodes.Can anyone help me out on how to create a tree structure and populating the nodes??
thanks in advance
Regards
KarthikThe FTree package provides functions to populate the tree - look for the topic "Manipulating a hierarchical tree at runtime
" in the online help this point to all the functions and triggers -
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 use ONE query to find out tree structure?
ID------------upperID----------Name------------------------isFolder
1------------ 0---------- Folder
1------------------------------------1
2------------ 1------------ Folder 1- Sub
Folder--------------------1
3------------ 2------------
Folder1-Item1-A--------------------------0
4------------ 1------------ Folder 1- Sub
Item-----------------------0
Hi all, if I have a table like above to demonstrate the
folders and item relationship. This structure allows the user to
create unlimited folders and items.
Now I would like to use one query to find out the tree
structure of this table, how could I do the query.
Any help on this will be highly appreciated!
Thanks,
ezAlso, see this thread:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=12 55788&enterthread=y -
How to create Tree structure in Visual Composer
Hi All,
I need to develop tree structure in my VC application. Can any one of you please suggest me the steps to do it.Its very urgent please can any one help me out in this.
Regards,
LakshmiHi Nutan,
if you want to solve it with webdynpro it depends on your skills in java and abap. There are books available to start with webdynpro and there are examples for building tree structures with Webdynpro.
[Java Webdynpro|http://www.sappress.com/product.cfm?account=&product=H983]
[ABAP Webdynpro|http://www.sappress.com/product.cfm?account=&product=H1916]
If you want to do it in VC you have to write e.g. an ABAP rfc function module, which returns you the tree with the information about childnode, parentnode and so on, so that you can display it in the table. But if the users click on sort then the tree is "destroyed". You can also display only a few levels of your tree and when you select a certain node a drill down is done by calling a rfc which returns the child nodes of the corresponding node.
But I think the solution with VC is not the best. Use webdynpro for this requirements.
Best Regards,
Marcel -
How to get the folder name of selected subitem in tree structure?
Hi All,
I created a tree structure like below.
->Folder1-- 1
2
3
->Folder2-----1
2
3
i.e i have two folders & each folder having the values like above.Now i want to perform some action by clicking on the any of the values.Suppose if i click value 2,i want to do some action.the actions need to perform is varies from floder to to folder.
So How can i get the folder name of clicked Value?
Regards,
RaviHi Kumar ,
the below code should help you.
Register the below action for the leaf node for which u need the subfolder's name above it.
Worked fine in my system ...hope it does in ur scenario too
method ONACTIONGET_PATH .
data : lr_element TYPE REF TO if_wd_context_element,
lr_node TYPE REF TO if_wd_context_node,
ls_path type string,
ls_path_node TYPE string,
lt_string type TABLE OF string,
l_lines type i,
l_lines_1 TYPE i.
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
**-> getting the path of the node/leaf
*which u had clicked and from that getting the node above it
ls_path = lr_element->get_path( ).
SPLIT ls_path at '.' into table lt_string.
-> remove the first 2 entries as they will contain the view name
DELETE lt_string FROM 1 to 2.
l_lines = LINES( lt_String ).
l_lines_1 = l_lines - 1.
-> remove the last 2 entries as they will contain the element in the path
DELETE lt_string from l_lines_1 to l_lines.
LOOP AT lt_string into ls_path.
CONCATENATE LINES OF LT_STRING into ls_path_node SEPARATED BY '.'.
ENDLOOP.
**-> getting access to the node above the leaf element
LR_NODE = WD_CONTEXT->PATH_GET_NODE( path = ls_path_node ).
lr_element = lr_node->get_element( ).
**-> Getting the name of the folder...
*here path is the attribute in my context which stores the name of the folder
lr_element->get_attribute( EXPORTING name = 'PATH' IMPORTING value = ls_path ).
endmethod. -
Display Tree structure using EVS or OVS
Hi All,
Here we have a requirement like display tree structure when I press F4. currently the sample application (using Object Value Selector or Extended Value Selector) is displaying the values in table, instead of table here we have to display it in tree.
If it is not possible using either OVS or EVS please tell me what is the other way to solve the problem.
Please give me any suggestion.
Regards
SureshSuresh,
You can emulate the behaviour by having a separate view for the tree structure.
1.) Create a new view and put your tree structure UI + related logic in that view.
2.) Create an input field and a linkToAction / button (with the text "Search".) aligned side by side.
3.) On click of the search button, show the view containing tree as pop-up.
You may develop upon this hint to meet your requirement.
~ Bala -
Tree Structure - Is it possible to Open a Pop up/external window on select
Is it possible to Open a Pop up/external window on select of any Leafe node or a parent node?
My requirement is to create a webdynpro screen which depicts the transaction :
ooqa in sap R/3.
Is it possible to do that in tree structure?
Thanks & Regards,
Sirisha.RSHi Ayyaparaj,
Thanks for ur reply.
but i cant use a table here. I just need a tree structure..
I guess Its posible by writing a code for a external window open in the onselect method itself.
Thanks & regards,
Sirisha.Rs -
JPA - tree structure mapping with toplink essential
I'll try to explain it correctly.
I store a tree structure in a database. I have just two tables:
Node which contain a id , and some other info.
Tree which contain a parent and child
parent and child are ids from node.
Since each node can have several childs, and each node can have several parents, I had try a @ManyToMany relationship without sucess.
Here one small example of my tries :
@Entity
@Table(name="node")
public class Node {
@Id private int id;
private List<Node> childs;
private List<Node> parents;
@ManyToMany
@JoinTable(name="Tree")
public List<Node> getParents(){
return parents;
@ManyToMany(mappedBy="parents")
public List<Node> getChilds(){
return childs;
}But I always got several error.
Anyone have a working example that look like mine ?
Even after googling for several hours I still find nothing.
If it helps, I use toplink essential for my persistance layer.Please see http://www.oracle.com/technetwork/middleware/toplink/index-085257.html for information on TopLink JPA support.
So as of TopLink 11, you will need to use EclipseLink's org.eclipse.persistence.jpa.PersistenceProvider as the provider class for JPA support, which is in the eclipselink.jar.
Best Regards,
Chris -
Query for spesific children in a tree structure
Hi,
My data is organized in a tree structure.
I need a sql statement that returns a parent that
have a set of children corresponding to some demands.
I provide a very simplified description of my data, but it covers my problem.
Can anyone please help me write a select statement that gives me all featureids
that have a GID attribute with children GNR=123 AND BNR=456?
Regards
gv
create table attributetype( id number, name varchar2(8), parentid number );
insert into attributetype( id, name ) values ( 1, 'GIDLIST' );
insert into attributetype( id, name, parentid ) values ( 2, 'GID', 1 );
insert into attributetype( id, name, parentid ) values( 3, 'GNR', 2 );
insert into attributetype( id, name, parentid ) values ( 4, 'BNR', 2 );
create table attribute( featureid number, id number, parentid number, atttypeid number, intvalue number );
--attributes for feature1
insert into attribute( featureid, id, parentid, atttypeid ) values( 1, 1, 0, 1 );
insert into attribute( featureid, id, parentid, atttypeid ) values( 1, 2, 1, 2 );
insert into attribute( featureid, id, parentid, atttypeid, intvalue ) values( 1, 3, 2, 3, 123 );
insert into attribute( featureid, id, parentid, atttypeid, intvalue ) values( 1, 4, 2, 4, 456 );
insert into attribute( featureid, id, parentid, atttypeid ) values( 1, 5, 1, 2 );
insert into attribute( featureid, id, parentid, atttypeid, intvalue ) values( 1, 6, 5, 3, 12 );
insert into attribute( featureid, id, parentid, atttypeid, intvalue ) values( 1, 7, 5, 4, 456 );
--attributes for feature 2
insert into attribute( featureid, id, parentid, atttypeid ) values( 2, 8, 0, 1 );
insert into attribute( featureid, id, parentid, atttypeid ) values( 2, 9, 8, 2 );
insert into attribute( featureid, id, parentid, atttypeid, intvalue ) values( 2, 10, 9, 3, 678 );
insert into attribute( featureid, id, parentid, atttypeid, intvalue ) values( 2, 11, 9, 4, 456 );
insert into attribute( featureid, id, parentid, atttypeid ) values( 2, 12, 8, 2 );
insert into attribute( featureid, id, parentid, atttypeid, intvalue ) values( 2, 13, 12, 3, 876 );
insert into attribute( featureid, id, parentid, atttypeid, intvalue ) values( 2, 14, 12, 4, 456 );
commit;
column name format a15
select a.featureid featureid, lpad(' ', (level - 1) * 2) || b.name name, a.id attid, a.parentid parentid, a.intvalue
from attribute a, attributetype b
where a.atttypeid=b.id
connect by prior a.id=a.parentid
start with a.parentid=0;
FEATUREID NAME ATTID PARENTID INTVALUE
1 GIDLIST 1 0
1 GID 2 1
1 GNR 3 2 123
1 BNR 4 2 456
1 GID 5 1
1 GNR 6 5 12
1 BNR 7 5 456
2 GIDLIST 8 0
2 GID 12 8
2 GNR 13 12 876
2 BNR 14 12 456
2 GID 9 8
2 GNR 10 9 678
2 BNR 11 9 456Hi,
Thanks for providing the CREATE TABLE and INSERT statements; that helps a lot.
You want featureids that meet three criteria:
(1) there is a GID attribute
(2) the GID attribute has a GNR child with intvalue=123
(3) the GID attribute has a BNR child with intvalue=456
Since you're looking for immediate children, not distant descendants, it's easiest to do this with a non-hierarrchical query that finds one of these criteria, and does EXISTS sub-queries to test for the other two.
For example:
WITH aat AS
( -- Begin aat: join of attribute and attributetype
SELECT a.featureid
, a.id
, a.parentid
, a.intvalue
, t.name
FROM attribute a
JOIN attributetype t ON a.atttypeid = t.id
) -- End aat: join of attribute and attributetype
SELECT DISTINCT featureid
FROM aat m -- m for main
WHERE name = 'GID'
AND EXISTS ( -- Begin EXISTS sub-query for GNR=123
SELECT NULL
FROM aat
WHERE parentid = m.id
AND name = 'GNR'
AND intvalue = 123
) -- End EXISTS sub-query for GNR=123
AND EXISTS ( -- Begin EXISTS sub-query for BNR=456
SELECT NULL
FROM aat
WHERE parentid = m.id
AND name = 'BNR'
AND intvalue = 456
) -- End EXISTS sub-query for BNR=456
;Alternatively, you could do a three-way self join, and skip the EXISTS sub-queries.
If you were looking for GNR and BNR descendants, any number of levels below the same GID node, it's easy to modify the query above. Just re-write the EXISTS sub-queries to CONNECT BY queries that "START WITH parentid = m.id".
It looks like this application will have a lot of use for a view like aat, above. If you don't already have a permanent view like that, you should create one.
Maybe you are looking for
-
A couple years ago I made a custom cable to go from the dock connector on my iPod to my car stereo. This utilized the line-out signal from the dock connector, which is the right level for input to the stereo (and higher quality, as it bypasses the he
-
Hi All, I am new to SAP Adobe Forms and have a quick question. I need to create the output for order confirmation and invoice in Adobe Form. Does SAP provide any standard Adobe Forms out of the box in ECC 6.0 for these outputs. I will greatly a
-
Hi all, My problem is like this: I have received the GR from XYZ Vendor. The entries was posted correctly with GR/IR Clearing. and made the PO for the same with no 1234. Now my user using the PO 1234 and changed the invoicing party in MIRO as ABC. Th
-
I'm trying to delete a plug-in for Aperture. I read a couple of post already... All refering to the "Library/Application Support/Aperture" folder. This may sound funny but I can't find any Aperture folder on my hard drive. I see aperture in my Applic
-
I get the following additional instance of Firefox almost every time I click on a link
Every time I click on a link in any Firefox window, one or two more Firefox windows pop open. Sometimes, it's a blank screen, other times I get 4 tabs with garbage. Tab 1 has the following address: http://www.^þ!"Þ•øÀŽÑµo%1f'¬æ%28Ñ.ªgô/%C3%BDF%C3%