Parent/Child Orders
Hi,
Does OSM supports Parent/Child orders.
+(Child order will not start untill Parent order will complete)+
Regards,
Harman
Perhaps it would help if you describe the nature of the cross order dependency.
In our experience most dependencies that exist between orders are the result of a functional dependency between line items. I'd like to understand your use case so that I can better understand how this is not the case for your situation.
That aside for the moment, there are several other ways to deal with parent/child order relationships. Here are two that you may find useful:
1. Rely on OSM order lifecycle events which can be enabled on the Order entity within Design Studio. When enabled, OSM will automatically emit JMS/XML events on a JMS destination that OSM provides whenever an order changes state. You can have an automation plugin listen for the event indicating the parent order has completed after which the child order starts.
2. Create a custom notification automation plugin which is invoked when the parent order completes. When this happens it can either send a JMS/XML event of your own making similar to #1 above, or it can directly call the OSM XML API using the provided context object (just as with automation plugins) to start the child order (assuming the parent order has the context to locate the child order).
Brian.
Similar Messages
-
Parent Child relationship is lost in new table
Hi Guru's
I am creating a table from a flat file that is currently in a parent child hierarchy to a staging table in Oracle. I have added a nextval sequence in a Row column, but after loading the flat file, and ordering by the column, the parent child hierarchy is still not listing correctly. I have to do other ETL on the table and I wanted to then load this metadata into Planning, but naturally it is not loading b/c the hierarchy is not recognized. Is there a way to to keep the parent/child hierarchy integrity?
Thanks for the helpI have used that in the final integration from a Oracle table to the Planning application. I guess the issue is that I need to load the flat file to an oracle table first. I have loade it with the file to sql KM and created a sequence.nextval column in that table. When I try to order by my column here, the file is no longer in the 'Parent' 'Child' order any longer. I have the Sort_Parent_Child option True, as well as the Load_Order_by_Input = True. My process runs File to SQL -> custom Procedure -> then IKM SQL to Planning so I am not sure if the last KM would recoginize the original order of the flat file input. Am I missing something?
Thanks in advance. -
Regarding Sales order creation using Material with Parent-child
hey guys
i cannot create sales order for parent child material using Below bapi(BAPI_....ORDERDAT2).
Could you please tell me if any special parameter should be set with this bapi
to create the order for PARENT MATERIAL AND child materials.
i am able to create parent-child material order using VA01. but cant using BAPI
just for information I am passing Parent materail alone to the BAPI.
can somebody give suggestion.
ambichanHi AMBI ,
SAP will explode the Sales BOM while creating the Sales Order.
useful Tcodes : CS03.
Bom Usage : 5.(sales Bom)
Regards
prabhu -
Dear Guru's,
we have a requirement i.e. user can convert planned orders in to production orders (CO41) based on those production orders we can get Route card( Z Smart form) presently we are using manual input for that Route card. recently we got requirement for this i.e. make to automatic generation of route card for this requirement we need to get the list of child's production orders based on parent production order
so as per my requirement i need to get all child part numbers production orders based on parent production order number and quantity i tried in MD4C and CO46 but those transactions codes are picking multiple lines also so for this requirement please give your valuable suggestions
Regards,
VenkatDear Friends,
Thanks for your reply,
My business process is MTS purely strategy 10, for route card all components with production orders we can give input as like bellow these production orders are converted from planned orders,between few components are don't have production orders those are F-30 materials,because of this reason i need link for production order to child components orders
01
IND1
IND1
A1CE2003520103-005
55685815
02
IND1
IND1
A1CE2003520103-010
55685814
03
IND1
IND1
A1CE2003520103-015
55685813
04
IND1
IND1
A1CE2003520103-020
55685812
05
IND1
IND1
A1CE2003520103-025
55685811
06
IND1
IND1
A1CE2003520103-030
07
IND1
IND1
A1CE2003520103-035
55685810 -
Parent-child hierarchy of production orders
Hello
Production orders make parent child unbalanced hierarchy of up to 15 levels (see below)
prod order1
-prod order11
prod order111
prod order112
-prod order12
prod order121
How would u recommend me to store this hierarchy so that I will be able to quickly collect variances (one per order) from selected node till the lowest level?
thanksprod order1
--prod order11
prod order111
prod order112
--prod order12
prod order121
compoments A B are required to produce material D (prod order1)
components A1 A2 are required to produce material A (prod order11)
components A11 A12 are required to produce material A1 (prod order111) -
Parent-Child Apps and Classloading...Wrong load order?
Ah, everyone's favourite two oracle topics slammed into one. I've been using Oracle's parent-child application deployment for some time, to reasonable success in Oracle App Server 9.0.4. Though screwing about with the classloaders in this way usually fills me with dread, the benefits of developing child apps in isolation from the parent are excellent.
In general I have always deployed in the following way:
server.xml
<application name="msip-app" path="../applications/msip-app.ear" parent="default" start="true" />
<application name="msip-services" path="../applications/msip-services.ear" parent="msip-app" start="true" />
default-web-site.xml
<web-app application="msip-app" name="msip-web" load-on-startup="true" root="/msip" />
<web-app application="msip-services" name="msip-services" load-on-startup="true" root="/msip-ws" />
orion-application.xml (parent app)
<library path="./msip-web/WEB-INF/classes" />
<library path="./msip-web/WEB-INF/lib" />
(Note: this generic approach has always worked...)
Now I am trying to upgrade to oc4j 10.1.3.x, and I seem to be trapped in configuration hell. OC4J now appears to load the child application first, which inevitably screws up the classloader for the parent app. Surely this doesn't make any sense, as the parent app is the dependency and should be started first?!
I haven't discovered any way to control the load order for apps in the config files; the only workaround is to set the load-on-startup for the child app to "false". This is fine, until I redeploy through Oracle EM, which switches load-on-startup back to true. Again, there doesn't seem to be any way in deployment to control this parameter!
Why in the heck would oc4j have changed it's load priority for parent child apps? Is there any way to force load order through config? Am I just crazy and no one else has seen this?
Help.Thanks for the reply. Gave that a look, but unfortunately, that link concerns a problem at a lower level than the one I've encountered. A classloading problem alerted me to what I believe is a bigger issue, namely that oc4j appear to be launching my child app before the parent app, and this consistently screws up the initialisation phases for both ear files. This appears to be an explicit decision in the Oracle app loader about which war file (parent or child) to launch first, but for the life of me, I can't find the offending code by decompiling oc4j.
If it turns out that this intentional, surely this must be a mistake? The parent app is the dependency and must be loaded first! or I missing something big... -
Work Order and parent/child relationship
I have been looking into the vision instance. There is an Asset-Rebuildable relationship, that is Forklif and it's battery. If there is a work order on the forklik "replace battery" can this be done automatically, or is this all manual.
1. When I pick the new battery from stores the S/N of the battery is associated with the forklif (automatic I tested this)
2. When I say "remove the old battery" should't the old battery parent/child relationship between the parent be broken and a child work order "charge" for the battery be logged. I could not reproduce that, but queried that this is what happens in vision. Are all these supposed to be manual?
RegardsFrom this plan, we can't easily get the parent child relationship like autotrace. Is there a way to get like autotrace?
SELECT * FROM table(DBMS_XPLAN.DISPLAY);
Plan hash value: 3693697345
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |INOUT |PQ Distrib |
| 0 | SELECT STATEMENT | | 1 | 117 | 6 (50) | 00:00:01 | | | |
| 1 | PX COORDINATOR | | | | | | | | |
| 2 | PX SEND QC (ORDER) |:TQ10003 | 1 | 117 | 6 (50) | 00:00:01 | Q1,03 | P->S | QC (ORDER) |
| 3 | SORT ORDER BY | | 1 | 117 | 6 (50) | 00:00:01 | Q1,03 | PCWP | |
| 4 | PX RECEIVE | | 1 | 117 | 5 (40) | 00:00:01 | Q1,03 | PCWP | |
| 5 | PX SEND RANGE |:TQ10002 | 1 | 117 | 5 (40) | 00:00:01 | Q1,02 | P->P | RANGE |
|* 6 | HASH JOIN | | 1 | 117 | 5 (40) | 00:00:01 | Q1,02 | PCWP | |
| 7 | PX RECEIVE | | 1 | 87 | 2 (50) | 00:00:01 | Q1,02 | PCWP | |
| 8 | PX SEND HASH |:TQ10001 | 1 | 87 | 2 (50) | 00:00:01 | Q1,01 | P->P | HASH |
| 9 | PX BLOCK ITERATOR | | 1 | 87 | 2 (50) | 00:00:01 | Q1,01 | PCWC | |
|* 10| TABLE ACCESS FULL | EMP | 1 | 87 | 2 (50) | 00:00:01 | Q1,01 | PCWP | |
| 11 | BUFFER SORT | | | | | | Q1,02 | PCWC | |
| 12 | PX RECEIVE | | 4 | 120 | 3 (34) | 00:00:01 | Q1,02 | PCWP | |
| 13 | PX SEND HASH |:TQ10000 | 4 | 120 | 3 (34) | 00:00:01 | | S->P | HASH |
| 14 | TABLE ACCESS FULL | DEPT | 4 | 120 | 3 (34) | 00:00:01 | | | |
Predicate Information (identified by operation id):
6 - access("E"."DEPTNO"="D"."DEPTNO")
10 - filter("E"."ENAME"='hermann')
--------------------------------------------------- -
Parent-Child post order exception; FK constraint violation
I've seen the discussion and answer recently in this forum for configuring BC4J
to post the parent first, then the child, to avoid the FK constraint exception??
So I have to appologise for re-asking, but I can't get the search function to find
any thing that needs multiple key words. :(
I've got two Entities, parent child, with Links, and Association between them on the FK.
What was the trick to get the framework to correctly post the parent first??
I've looked over the FkLink and FkAssoc and all these components are included by
the AppModule...
Thanks, curtEdit the association object between your parent and child entities and set the "Composition" flag (Composite Assocation in the UI), to true. You may elect to enforce "CascadeDelete" option, if you have database Cascade-delete turned on between the associated tables and want to avoid multiple DMLs for the details.
-
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 -
How to Differentiate between Parent & child item of material determination
Hi Experts
I have a list of material & the Business requirement is to found that whether a material is a Parent material , Child material or Both ( a parent to other children and a child to another parent).
I tried using table KONDD & KONDDP but I was not able to differeniate between Parent & Child item.
I even cant use item category to diferentaite the two as by item categairy i can only find that it is a Prent material but cant find whether this material is a Child material or not.
Is there any table in which i can enter the Parent material & the output would be child material or any other table which contain both parent & child material.
Note : In Material determination ( VB11) , the material which is entered is Parent material & the material with which it would be replaced is Child material.
Kindly Guide.
Thanks in AdvanceHi
The wording of Parent and Child sounds like using a BOM material. In material determination...these two items can be called as Material entered and material determined or Main Item and Sub Item.
In the sales order overview screen...at line item level check the field 'HLvItem' (Higher Level Item). It will show the POSNR of the main item to which this item is linked. Since this can also happen in the case of free goods and BOM...you have make another check for these items with the item category.
If the substitue material is not determined as a sub item... you can check the material number in the field 'Material Entered' in the sales tab of the item and compare the material number with that exists in the VBAP-MATNR. If both are different, then this material can be considered as a determined material.
Thanks,
Ravi -
Help needed in retrieving parent child relationship values
Hi,
I have a requirement to get parent child relationship values as below.
Ex: Address table
cont cont_code state state_code
C1 10 S1 1
C1 10 S2 2
C1 10 S3 3
C2 20 S4 4
C2 20 S5 5
C3 30 S6 6
C3 30 S7 7
C3 30 S8 8
I want a result of country/state and corresponding code like below.
corresponding states should be displayed under each country with some space appended to it.
Geography code
C1 10
S1 1
S2 2
S3 3
C2 20
S4 4
S5 5
C3 30
S6 6
S7 7
S8 8
I am using oracle 10g version.
Thanks in advance.Hi,
When you post formatted text (like your output) on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
I think you're saying that you want this output:GEOGRAPHY CODE
C1 10
S1 1
S2 2
S3 3
C2 20
S4 4
S5 5
C3 30
S6 6
S7 7
S8 8
If so, UNION, as Hoek suggested, is a good way.
GROUP BY ROLLUP is more efficient, but harder to understand:SELECT CASE
WHEN GROUPING (state) = 1
THEN cont
ELSE ' ' || state
END AS geography
, CASE
WHEN GROUPING (state) = 1
THEN MAX (cont_code)
ELSE MAX (state_code)
END AS code
FROM t
GROUP BY cont
, ROLLUP (state)
ORDER BY cont
, state NULLS FIRST
By the way, this looks like a bad table design.
In a relational database, the fact that the name 'C1' belongs to cont_code 10 should only be stored in one place. You have the same information on 3 separate rows.
Also, if 'C1' and 'S1' are both names, they should probably be in the same column, so that (to give just one example) you can find the information about 'x1' without knowing if it is a cont or a state.
A better design would be.NAME CODE PARENT DSCR
==== ==== ====== ====
C1 10 CONT
S1 1 10 STATE
S2 2 10 STATE
S3 3 10 STATE
C2 20 CONT
S4 4 20 STATE
S5 5 20 STATE
C3 30 CONT
S6 6 30 STATE
S7 7 30 STATE
S8 8 30 STATE
If the data is this simple, then the dscr column isn't needed. Whether parent is NULL or not tells whether the rows represents a cont or a state.
To get the results you want from a table like this, you could use CONNECT BY. Using either UNION or ROLLUP, you have to know, at the time you write the query, how many levels there will be in the parent-child tree, and the length of the code is proportional to that depth, and the table has to be changed if you ever need to add another level. CONNECT BY can handle any number of levels, and the length and complexity of the code is the same whether you have just 2 levels (countries and strates), or 7 levels (continents, regions, countiries, states, districts, cities and neighborhoods) or 72 levels. The table doesn't need any more columns, no matter how deep the tree gets.
Edited by: Frank Kulash on Sep 16, 2010 11:54 AM -
How to delete parent child relation in Toplink
Hi All,
I have 3 tables A,B,C.
In Table A ,I am saving record.
Table B & C has parent child relation.
B-->Parent
C-->Child
So I want to save records in Table A.
And delete from child(C) 1st then from parent(B).
I m writing my code as,
em.getTransaction().begin();
em.persist(Table A);//save in Table A
em.remove(em.merge(Table B));//Remove from Parent
But how to delete records from child table then from parent table.
Thanks
SandipIf you have a @OneToOne relationship between two entities, the join column information is used to order the SQL when you remove two entities. For example, if I have:
@Entity
public class Employee implements Serializable {
@OneToOne
@JoinColumn(name="ADDR_ID")
private Address address;
...Then the following code runs regardless of the order of the remove calls.
em.getTransaction().begin();
Employee parent = new Employee();
Address child = new Address();
parent.setAddress(child);
em.persist(parent);
em.persist(child);
em.getTransaction().commit();
em.getTransaction().begin();
parent = em.merge(parent);
child = em.merge(child);
// order of next two statements unimportant
em.remove(parent);
em.remove(child);
em.getTransaction().commit();If I don't remove the parent and just the child I get the same error you do because of the FK from Employee to Address.
--Shaun -
Hi all,
I am trying to write an sql - and the requirement is as below -
Table data contains columns Parent || Child || Summary_Flag
If Child is Parent again to some other Child then Summary Flag is "Y"
e.g. parent || Child || Summary_flag
P1 C1 N
P2 P3 Y
P3 C2 N
This relation exists to four level - .i.e. level to which child can be parent again.
I am trying to write SQL which will give me data in columns - i.e. Parent1||Parent2||Parent3||Parent4||Child.
Pleas help in any possible way.
thanks
BhushanhI,
What is your desired output ?
Like this.
P1|C1
P2|P3|C2
SELECT REGEXP_REPLACE (MAX (res)KEEP (DENSE_RANK LAST ORDER BY lvl),
) res
FROM (SELECT PARENT,
SYS_CONNECT_BY_PATH ( CASE
WHEN LEVEL = 1
THEN PARENT
END
|| '|'
|| CHILD,
) res,
LEVEL lvl
FROM test_data
WHERE summary_flag = 'N'
CONNECT BY PRIOR CHILD = PARENT)
GROUP BY PARENT
SQL> WITH test_data AS
2 (SELECT 'P1' PARENT, 'C1' CHILD, 'N' summary_flag
3 FROM DUAL
4 UNION ALL
5 SELECT 'P2' PARENT, 'P3' CHILD, 'Y' summary_flag
6 FROM DUAL
7 UNION ALL
8 SELECT 'P3' PARENT, 'P4' CHILD, 'Y' summary_flag
9 FROM DUAL
10 UNION ALL
11 SELECT 'P4' PARENT, 'C2' CHILD, 'N' summary_flag
12 FROM DUAL)
13 SELECT REGEXP_REPLACE (MAX (res)KEEP (DENSE_RANK LAST ORDER BY lvl),
14 '/'
15 ) res
16 FROM (SELECT PARENT,
17 SYS_CONNECT_BY_PATH ( CASE
18 WHEN LEVEL = 1
19 THEN PARENT
20 END
21 || '|'
22 || CHILD,
23 '/'
24 ) res,
25 LEVEL lvl
26 FROM test_data
27 WHERE summary_flag = 'N'
28 CONNECT BY PRIOR CHILD = PARENT)
29 GROUP BY PARENT;
RES
P1|C1
P2|P3|P4|C2
SQL> Regards salim. -
Parent Child relation in one transaction throws error... (
In nutshell, I have a parent->child relation ship in DB and due to the UI requirement, I created view link as Child->parent, it is giving a hack a lot of problems.... (it sounds silly but looks like I am loosing my mind over this)
Let me explain my situation,
- I have a table A with col-a and col-b. I have another table B with col-a (primary key) and col-c. (This way table A is a parent table)
- ON UI side i created relationship like table B is parent and Table A is child using col-a
- I need to create parent-child (one record for each) record programatically.........
I tried following thing:
- from backing bean, as soon as i create Table-B row first, i get error saying too many objects with same key (which is understandable because of table design..... and associaion must be throwing that error)
- from EOImpl file, it doesn't even find the child record being created... so during commit I can't send the foreign key value from Table-a to Table-b
Any suggestion is greatly appreciated?
Thank you,
-Rajthat depends on how you implement the multiple selection of orders.. you have to pass the selectedValues to the backend or store the values in a map or list and pass it..
-
Simulate 1-N relationship as N-N by using Parent-Child structure
Hi,
i have a 1-N relationship between SKILL and USER tables meaning 1 skill can be applied to several users. A skill can have a parent skill meaning that a ParentSkill inherits all privileges of it's child.
I would like to simulate a N-N relationship between users and skills by building a view which goes through the parent-child relationship... Can this be accomplished by building a view?
Current structure:
|USERID | USERNAME | SKILLID |
+-------+----------+----------+
| 1 | Jack | 1 |
| 2 | Simon | 1 |
| 3 | Fred | 3 |
+-------+----------+----------+
|SKILLID | DESCRIPTION | PARENTSKILL |
+--------+---------------+--------------+
| 1 | Mechanic | 2 |
| 2 | Inspector | 3 |
| 3 | Supervisor | null |
+--------+---------------+--------------+Preferred output (ordering of skillid is not important):
|USERID | USERNAME | SKILLID |
+-------+----------+----------+
| 1 | Jack | 1 |
| 2 | Simon | 1 |
| 3 | Fred | 3 |
| 3 | Fred | 2 |
| 3 | Fred | 1 |
+-------+----------+----------+Hopefully this meets your needs:
WITH
users as
SELECT 1 as USERID, 'Jack' as USERNAME, 1 as SKILLID FROM DUAL UNION ALL
SELECT 2 as USERID, 'Simon' as USERNAME, 1 as SKILLID FROM DUAL UNION ALL
SELECT 3 as USERID, 'Fred' as USERNAME, 3 as SKILLID FROM DUAL
skills as
SELECT SKILLID,CONNECT_BY_ROOT SKILLID AS ANCESTORS
FROM
SELECT 1 as SKILLID, 'Mechanic' as DESCRIPTION, 2 as PARENTSKILL FROM DUAL UNION ALL
SELECT 2, 'Inspector', 3 FROM DUAL UNION ALL
SELECT 3, 'Supervisor', NULL FROM DUAL
CONNECT BY PRIOR PARENTSKILL = SKILLID
SELECT USERID,USERNAME,ANCESTORS
FROM skills, users
WHERE users.skillid = skills.skillid
USERID USERN ANCESTORS
1 Jack 1
2 Simon 1
3 Fred 3
3 Fred 2
3 Fred 1Hope this helps!
Maybe you are looking for
-
Change file from .tiff to .pdf?
How do I change file from .tiff to .pdf? (I scanned in a large volume of items, and didn't realize they were not in.pdf).
-
Can't export with alpha channel - Again!!!,
So, I have an intro that is designed as an overlay of the incoming video. The objects move out the way to reveal the video underneath. BUT, when I export the sequence the resulting movie has black in the background. Now, I had this issue several mont
-
Providing internet through router and still keep IP
I have a problem with my knowledge about this not being enough The situation is this. I have two computers connected to the internet via a Linksys WRT59GX v.2. The internet is with a non static IP, so i have the computers on automaticly optaining IP
-
How does Status column in Execution Window get set?
Thanks to Jonathan for the reply to my last post. I have a couple of inter-related questions on step-types. I understand the difference between a Pass/Fail step type and a Numeric Limit step type is that the code module being executed in one case re
-
Hi Experts, I would have a question.We wanted to make the Object type changeable on Acceptence system therefore we could create on acceptance an Design studio application to try if it runs on netweaver.but I could not find the object type for DS appl