Multi parent child in a AppModuleDataControl
Hi
I'm trying to create an application that require multiple (5+) level of parent/child relationship in a AppModuleDataControl...
(using the following tutorial as an example: http://docs.oracle.com/cd/E37547_01/tutorials/tut_rich_app/tut_rich_app_2.html)
Is it something that is possible?
Thanks in advance
User, please tell us your jdev version.
Yes, this is possible. Where do you see a problem? If your data mode has this kind of relationship you can build it (or if the foreign keys are setup in the db you get it automatically). a sample up to lever 3: JDeveloper & ADF: Multiple Cascading Tables | JDev & ADF Goodies
Timo
Similar Messages
-
Multi level parent child relationship and datacontrol
I have an existing application with multi-level parent child tables. For example three of the tables in the applications are related as Table 1 ( parent of Table 2) ---> Table 2 ( parent of Table 3 ) --> Table 3. When i create ADF Business components using these tables i see only the nesting between the parent and its immediate child tables. How can i create a nested data control for Table 3 to Table 2 to Table 1?. We have a usecase where we need to access data from the child table to parent to parent in the reverse order. Currently there is no direct relationship defined between Table 1 and Table 3.
Any thoughts?
thanks
SeetharamanHi,
double click the Application Module to open the AM editor. Select the data Model category. On the right hand side you see what is selected for use in an application, on the left hand side is what you have available as View Object. To create T1-->T2-->T3, you
- Select T1 and move it to the right
- Select T2 under T1 on the left and move it to the right under T1
- Select T3 under T2 on the left and move it under T2 in T1 on the right
Frank -
Issue Description:
in Action BC (Table: S_EVT_ACT) we are trying to implement the following organization based parent child picklists/LOVs for Status->Status Reason
[Status] - Activity Status field (col: EVT_STAT_CD)
*Picklist: LOV Type = 'EVENT_STATUS', picklist BC: 'List Of Values Dynamic (REL)'
[LN Status Reason] - customised field/column (Col: X_STATUS_REASON)
*Picklist: LOV Type = 'LN_MISSED_ACTIVITY_REASON', picklist BC: 'PickList Hierarchical'
*Pick Map: [LN Status Reason] = [Value], [Status] = [Parent] (Constraint = Y)
in the Admin-Data LOVs:
Type = EVENT_STATUS, Display Value/LIC = "Not Achieved", Organization = "Org 1"
Type = LN_MISSED_ACTIVITY_REASON
Display Value/LIC = "Reason 1", Parent LIC = "Not Achieved", Organization = "Org 1"
Display Value/LIC = "Reason 2", Parent LIC = "Not Achieved", Organization = "Org 1"
On UI, create new record in Account - Activities, selecting Status = "Not Achieved".
Now when i try to select the Status Reason value, the drop down does not give me any value.
If I set the Organization to blank on "Reason 1", then the "Reason 1" value shows up in the Status Reason drop down under Account - Activities.
In SQL of the log file, for the Status Reason drop down, it always hard code a T1.BU_ID is null in the WHERE clause, this would explain why its blank in the dropdown
Also as a test, If i remove all the pick map constraints for the [LN Status Reason] field (ie the only record in the pick map is [LN Status Reason] = [Value]), then the drop down works correctly (ie displaying both the values with Organization = "Org 1"), and in the SQL of the log file, instead of BU_ID is null, it has BU_ID = ? with variable binding.
Is there a reason why it would hard code the BU_ID is null in the WHERE clause in the SQL, and how to overcome this to achieve my requirement.
Just a further update due to character limit of the original description,
The "Owner Organization Specifier" property on the table S_EVT_ACT is blank (not sure if its related to anything though)
The user i'm using belongs to "Org 1" for both the employee's Organization and its Position's Organization
ThanksThis is exactly what I'm looking for...I just can't make it work. I have 2 tables (database and schema). They are related via a database_id column. My code is below if you are willing to help.
HTML Header
<script>
function get_select_list_xml1(pThis,pSelect){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=CASCADING_SCHEMA',0);
get.add('P7_DATABASE',pThis.value);
gReturn = get.get('XML');
if(gReturn && l_Select){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
l_Opt_Xml.firstChild.nodeValue)
get = null;
function appendToSelect(pSelect, pValue, pContent) {
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);
</script>
Application Process
BEGIN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<select>');
HTP.prn ('<option value="' || 0 || '">' || '- All Schemas -'
|| '</option>'
FOR c IN (SELECT schema, schema_id
FROM (SELECT schema, schema_id, database_id
FROM schema_lookup
WHERE database_id = :cascading_selectlist_item_1)
LOOP
HTP.prn ('<option value="' || c.schema_id || '">' || c.schema || '</option>');
END LOOP;
HTP.prn ('</select>');
END;
P7_DATABASE_ID Form Element Attribute
onchange="get_select_list_xml1(this,'P7_SCHEMA_ID');
P7_SCHEMA_ID LOV
select SCHEMA d, SCHEMA_ID v from SCHEMA_LOOKUP
where DATABASE_ID = :P7_DATABASE_ID
order by 1 -
Need hierarchical chart that support multi-parent multi-child for each node
I'm looking for a charting solution to display the parent-child relationships between jobs in our job schedule. A given job may have 0 or more parent jobs and may have 0 or more child jobs. Similar to org chart but allowing child node(s) to link to more than 1 parent node. Any ideas...?
Correct; our job scheduler is InControl and I can pull the schedule data from there into our database for reporting. Ultimately my goal is to get the data from InControl into our database for reporting/visualization, and build an Apex application that will allow us to make changes to the schedule (add/remove/modify jobs and their dependencies) and then generate a report to serve as the job documentation for our team and for the schedulers to make the corresponding changes in InControl, and so the data center operators have up-to-date information for overnight support in the event of job failures. It's just that visualization piece that seems elusive, the rest is just writing queries designing the app, writing the report, etc.
-
Sum within a self-contained parent-child table
I have two tables - a "key" table containing a multi-layer parent-child relationship, and an "amount" table containing the keys for the leaf nodes in the key table as well as numeric values (e.g. amounts).
I want a query that returns each row in the key table as well as the sum of the amount table's amounts for all of that key's leaf nodes (so the root node would have the sum of all of the amount values).
Here's what I mean - I have two tables, KEY and AMOUNT
KEY has two columns, key and parent_key; key and parent_key have a CONNECT BY relationship on parent_key = prior key (with parent_key null for the root):
KEY PARENT_KEY
0 null
1 0
2 0
3 0
1A 1
2A 2
2B 2
3A 3
3B 3
3C 3
1A1 1A
1A2 1A
2A1 2A
2A2 2A
2B1 2B
3A1 3A
3A2 3A
3C1 3C
3C2 3CAMOUNT has two columns, key and amount; key points to KEY.key, and amount is a value for that particular key
(note that all key values are leaf nodes in the KEY table)
KEY AMOUNT
1A1 1
1A2 2
2A1 3
2A2 4
2B1 5
3A1 6
3A2 7
3C1 8
3C2 9 What I want is a result that looks like this, where each key's amount is the sum of its eventual leaf keys' amounts
KEY AMOUNT
0 45
1 3
2 12
3 30
1A 3
2A 7
2B 5
3A 13
3B 0
3C 17
1A1 1
1A2 2
2A1 3
2A2 4
2B1 5
3A1 6
3A2 7
3C1 8
3C2 9For example, key 2A's value, 7, is the sum of the values of 2A1 and 2A2; key 3's value is the sum of 3A1, 3A2, 3C1, and 3C2.
Is there a way of doing this with a single query?
The idea I came up with is, do a select on KEY with a "CONNECT_BY_PATH key" column so each row includes a string containing the keys of all of its ancestors, and then do a join on AMOUNT with amount.key IN the CONNECT_BY_PATH column; however, with a larger amount of data, this takes quite a bit of time. Is there a faster / more obvious way of doing this?SQL> with key_tbl as (
2 select '0' key,null parent_key from dual union all
3 select '1','0' from dual union all
4 select '2','0' from dual union all
5 select '3','0' from dual union all
6 select '1A','1' from dual union all
7 select '2A','2' from dual union all
8 select '2B','2' from dual union all
9 select '3A','3' from dual union all
10 select '3B','3' from dual union all
11 select '3C','3' from dual union all
12 select '1A1','1A' from dual union all
13 select '1A2','1A' from dual union all
14 select '2A1','2A' from dual union all
15 select '2A2','2A' from dual union all
16 select '2B1','2B' from dual union all
17 select '3A1','3A' from dual union all
18 select '3A2','3A' from dual union all
19 select '3C1','3C' from dual union all
20 select '3C2','3C' from dual
21 ),
22 amount_tbl as (
23 select '1A1' key,1 amount from dual union all
24 select '1A2',2 from dual union all
25 select '2A1',3 from dual union all
26 select '2A2',4 from dual union all
27 select '2B1',5 from dual union all
28 select '3A1',6 from dual union all
29 select '3A2',7 from dual union all
30 select '3C1',8 from dual union all
31 select '3C2',9 from dual
32 )
33 select key,
34 nvl(sum(amount),0) amount
35 from (
36 select connect_by_root k.key key,
37 amount
38 from key_tbl k,
39 amount_tbl a
40 where a.key(+) = k.key
41 connect by k.parent_key = prior k.key
42 )
43 group by key
44 order by key
45 /
KEY AMOUNT
0 45
1 3
1A 3
1A1 1
1A2 2
2 12
2A 7
2A1 3
2A2 4
2B 5
2B1 5
KEY AMOUNT
3 30
3A 13
3A1 6
3A2 7
3B 0
3C 17
3C1 8
3C2 9
19 rows selected.
SQL> SY. -
Loading to Parent -Child Tables simultaneously
I have a requirement to populate parent-child tables in a single interface simultaneoulsy. I couldnt find anyway to add multiple targets and am wondering why this key feature is absent in ODI. The same thing is easily achievable in BPEL.
Could some one please advice a work around for this.
Your help is much appreaciatedODI 11g does come with a new IKM 'IKM Oracle Multi Table Insert'. This does allow multi table inserts, but will require more than one interface.
Oracle Multi-Table Inserts
A new Integration KM for Oracle allows populating several target tables from a single source, reading the data only once. It uses the INSERT ALL statement.
COMPONENT NAME: IKM Oracle Multi Table Insert
COMPONENT VERSION: 11.1.2.4
AUTHOR: Oracle
COMPATIBILITY: ODI 11.1.1.3 and above
DESCRIPTION:
- Integrates data from one source into one to many Oracle target tables in append mode, using a multi-table insert statement (MTI).
REQUIREMENTS:
- Oracle Database 9iR1 or above
- See BASIC CONFIGURATION section
BASIC CONFIGURATION
- This IKM must be used in integration interfaces that are sequenced in a Package:
- The first interface of the Package must have a temporary target and the KM option DEFINE_QUERY set to YES.
This first interface defines the structure of the SELECT clause of the multi-table insert statement (that is the source flow).
- Subsequent integration interfaces must source from this temporary datastore and have the KM option IS_TARGET_TABLE set to YES.
- The last interface of the Package must have the KM option EXECUTE set to YES in order to run the multi-table insert statement.
- Do not set "Use Temporary Interface as Derived Table(Sub-Select)" set to true on any of the interfaces.
- If large amounts of data are appended, consider to set the KM option OPTIMIZER_HINT to /*+ APPEND */.
OPTIONS (Refer to the Option descriptions for more information on each option)
- DEFINE_QUERY: Set to Yes if this interface describes the source query (SELECT clause of the statement). This interface must have a temporary target.
- IS_TARGET_TABLE: Set to Yes this interface using the source query to load one of the target tables. This interface must source from an interface with a temporary target using this IKM and having the KM option DEFINE_QUERY set to YES.
- EXECUTE: Set to Yes for the last interface in the Package. This interface will run the multi-table insert statement.
- COMMIT: Commit transaction. This applies only to the last interface in the Package.
- TRUNCATE: Set to Yes to truncate this interface target table.
- CREATE_TARG_TABLE: Create target table? May only be used on target interfaces, but not on source interfaces (defining the source data).
- OPTIMIZER_HINT: Hint for the multi-table insert statement.
RESTRICTIONS:
- This KM can only be used in integration interfaces that are part of a Package.
- All source and target datastores need to reside on same data server.
- Journalized source data is not supported.
- Temporary indexes are not supported.
- Flow/static control is not supported.
- The TRUNCATE option cannot work, if the target table is referenced by another table (foreign key). -
Changing parent when not in multi-parent mode
We are currently working with ALLOW_MULTI_PARENT_WORKSPACES =NO. However, we have children that were created under the wrong parent.
1. Is there a way to move or copy the children to the correct parent without having to re-create them manually? Or are my only 2 options manual or multi-parent?
2. If I change the workspace to multi-parent, would the fact that the original parent was not created using the ADDASPARENTWORKSPACE stop me from using REMOVEASPARENTWORKSPACE after adding the proper parent to the workspace?
3. Is it possible to copy a child workspace to another parent?
CheersHi,
Workspaces cannot be copied or removed after they have been created. You can add another workspace using multi-parent but the original changes made to the table would remain within the workspace and would also prevent you from removing the original workspace as a parent.
These types of changes typically need to be done manually.
Regards,
Ben -
Hi All,
I have a really general question that I have not been able to solve.
Here is my sample code:
class parent {
public List mylist
public parent(){
child c = new child(this, mylist);
class child
private parent p;
private List mylist;
private String currentLine ="";
public child(parent p, List mylist){
this.p=p;
this.mylist = mylist;
BufferedReader in new BufferedReader(new FileReader("test.txt"));
while ((currentLine = in.readLine()) != null){
mylist.add(currentLine);
How do I return mylist in the child class back to the parent class? Or secondly, can I declare a List in the child class and have some way of passing it back to the parent class? I am not very familiar with the parent/child classes. If you can assist, I'd appreciate it. Thanks.Actually....the main problem that I have is that I am using multi threading. Right now the problem that I have is that I can't write to the same output file with multiple children threads...not sure why.
class parent {
PrintWriter out;
public parent () {
out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
for (int i=0; i<10; i++){
childthread ct = new childthread(this);
public synchronized void Output (String output){
out.write(output);
}//end class parent
class child extends Thread{
parent p;
public child (parent p) {
this.p = p;
public void run(){
String thisLine = "test";
p.Output(thisLine);
}//end class child
How can I get all of my 10 threads to write to the same file. Since my parent thread is the one with the output file, each time the child thread calls the p.Output and passes the String..it should printout test in my output file...but it does not. Is there any reason why?
My output file should display "test" ten times. Please let me know what I am doing wrong...or how I can go about writing multiple threads to the same output file. Thank you. -
hi
Please give me the solution how to configure customer parent/child relationships and billing that needs to take into account multi-currency. Please give me the customization process for this.
Thanks ,
Miku.thanks
-
Query Help with Parent, Child, Child's Child
Hi all,
Need some help with a query. I'm trying to create a stored procedure that is sort of like a Customer, Order, Order, Details. In my situation the tables are different but nevertheless, I want to grab all the fields from the Parent, Child,
and Childs' Child, where the Parent.ParentID = @Parameter. I tried this:
CREATE PROCEDURE [dbo].[spGetCompleteProjectXML]
@ProjectID int = 0
AS
SELECT *,
(SELECT *,
(SELECT *
FROM PageControls
WHERE (PageControls.ProjectPageID = ProjectPages.ProjectPageID))
FROM ProjectPages
WHERE (ProjectPages.ProjectID = @ProjectID))
FROM Projects
WHERE (ProjectID = @ProjectID)
FOR XML AUTO, ELEMENTS
RETURN 0
I think I'm close, but it was my best effort. Could someone help?
thanks in advanceHi TPolo,
Regarding your description, are you looking for a sample like below?
CREATE TABLE customer(customerID INT, name VARCHAR(99))
INSERT INTO customer VALUES(1,'Eric')
INSERT INTO customer VALUES(2,'Nelson')
CREATE TABLE orders(orderID INT,customerID INT)
INSERT INTO orders VALUES(1,1);
INSERT INTO orders VALUES(2,1)
INSERT INTO orders VALUES(3,2)
INSERT INTO orders VALUES(4,2)
CREATE TABLE orderDetails(orderID INT,item VARCHAR(99))
INSERT INTO orderDetails VALUES(1,'APPLE1')
INSERT INTO orderDetails VALUES(1,'BANANA1')
INSERT INTO orderDetails VALUES(2,'APPLE2')
INSERT INTO orderDetails VALUES(2,'BANANA2')
INSERT INTO orderDetails VALUES(3,'APPLE3')
INSERT INTO orderDetails VALUES(3,'BANANA3')
INSERT INTO orderDetails VALUES(4,'APPLE4')
INSERT INTO orderDetails VALUES(4,'BANANA5')
SELECT customer.customerID,customer.name,
(SELECT orderId,
SELECT item FROM orderDetails WHERE orderID=orders.orderID FOR XML AUTO,TYPE,ELEMENTS
FROM orders Where customerID=customer.customerID FOR XML AUTO,TYPE,ELEMENTS)
FROM customer WHERE customerID=1
FOR XML AUTO,ELEMENTS
DROP TABLE customer,orderDetails,orders
If you have any feedback on our support, please click
here.
Eric Zhang
TechNet Community Support -
Problem with saving Parent - Child View Objects in ADF 11g.
Hi Every one,
I have a requirment, something like I will be displaying some data on my jsff screen based on one Transient View Object. Whenever user clicks on Save button, I have to do following steps in my AMImpl.
-> Preapre dynamically Parent View Object Rows based on some logic
-> Prepare dynamically Child View object Rows and invoke insertRow method on respective child view object.
When I say commit() First Parent ViewObject data need to be saved and then Child View object data has to be saved. I am having Parent - Child Key relation ship btw these two ViewObjects. Some how I am populating the Parent Primary key in the Child View Object. Please suggest me If there is any other alternative to this.
ThanksI got the solution, Enabling the check box option for Master - Detail Entity association (CompositionAssociation -> Cascade Update Key Attributes) resolved the issue.
Thanks -
Does table STPOX contain parent-child relationship between components
Hello
I need to get a list of components of SO BOM.
FM CS_BOM_EXPL_KND_V1 exports an output table STPOX.
Does this table contain parent-child relationship between components? If yes , can somebody tell me which fields contain parent child id.
thanksHi,
STPOX is not a table, it is a structure & hence there is no storing of data in a structure. The table which stores this info is STPO.
To get the link you can refer to STPO-STLNR & pass this value to MAST-STLNR, this way you can link the child with its parent.
Regards,
Vivek -
How to allow Sharepoint users to login from multiple parent-child accounts?
Our client has mutliple AD domains and wants to allow people which have multiple AD accounts in multiple domains to login as THE SAME user:
- only primary account will be visible in search
- there will be only one user profile with all informations gathered from all sub accounts
- permissions for the sub account will be in sync with parent account
- task generated for parent will be visible for child accouns too etc
- ad admin can link the account together in the Active Directory - this link is permament (even if we move users to another OU) and ad admin can define which account is primary and secondary (parent/child)
How we can implement this in Sharepoint 2010 Std Server?Everything in SharePoint keys of the Security Identifier (SID) of a user. Each user in a domain has a unique SID, so there is no way to have multiple users recognized in SharePoint as the same user.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
Getting parent-child data from a single column in a table
Hi,
I have a parent-child data in a column.
Eg:
0
00
01
010
011
1
10
11
These values are present in the single column itself. My need is to get the parent values for the given child value.
For eg: If I am giving the input as 011, the query should return all its parents, i.e. 01 and 0
Could you please give me any inputs on this?
Thanks,
GVFrank Kulash wrote:
Assuming that each child's id is formed by adding exactly one character to the end of its parent's id:
SELECT id
FROM table_x
START WITH id = :target_id
CONNECT BY PRIOR id LIKE id || '_';
Small tweak to yours Frank if it's just the parents that need identifying...
SQL> ed
Wrote file afiedt.buf
1 with t as (select '0' as x from dual union all
2 select '00' from dual union all
3 select '01' from dual union all
4 select '010' from dual union all
5 select '011' from dual union all
6 select '1' from dual union all
7 select '10' from dual union all
8 select '11' from dual)
9 -- end of test data
10 SELECT x
11 FROM t, (select '&required' as req from dual) req
12 WHERE x != req.req
13 START WITH x = req.req
14* CONNECT BY PRIOR x LIKE x || '_'
SQL> /
Enter value for required: 011
old 11: FROM t, (select '&required' as req from dual) req
new 11: FROM t, (select '011' as req from dual) req
X
01
0
SQL> /
Enter value for required: 11
old 11: FROM t, (select '&required' as req from dual) req
new 11: FROM t, (select '11' as req from dual) req
X
1
SQL> -
No data for Parent-child hierarchy column in Pivot table view
Hi all,
I used OBIEE 11.1.1.6.2 Version.
I drag one Parent-child hierarchy column and one measure and show result with a pivot table view.
But when I click "+" icon to show detail level data,
It messaged that: "*the layout of this view combined with the data,selections,drills,or prompt values chosen resulted in no data*."
But it can show every-level data when I used table view.
It was so strange..
Did anybody meet this before?
Thanks in advance.
regards,
AnneHi,
Yes, I have the same problem with pivot table for hierarchy dimension.
If you use a normal table (not pivot) it seem to work. Unfortunatley with restrictions as normal table view have.
Same problem still exist in 11.1.1.6.5
I have logged a SR to Oracle about this.
Maybe you are looking for
-
Why won't my Macbook Pro charge?
All of a sudden, my Macbook Pro won't charge. I believe it has something to do with the charger, it no longer charges when my Macbook is off, and rarely when it is on, even! Sometimes it will start charging but only if the computer-connecting end is
-
How can I set the OS to show list view when I open a file in an application.
So I know you can chose view options in Finder to always show files in list view there. But how do you set the OS to do the same when opening files in an application.
-
Java runtime hangs - need help!
I have a batch process that is getting totally hung up. Not sure if it is an application problem or a JVM problem. Here is the dump of the threads: Can anyone help me interpret this??? This runs on Solaris 8. Full thread dump Java HotSpot(TM) Client
-
Hardisk dan drive system 32
-
Data Manager Clear Package - VBA Automation Parameters
Hello guys, I have built an input sheet, where the user selects members from BPC dimensions (ACCDETAIL,ACCOUNT, ACTIVITY,ASSET, etc.). Next, the user clicks on the "Clear Data" button, which triggers a VBA macro (EPM_Clear). This macro should call th