DBA Data[Home] [Help]

APPS.EAM_WO_NETWORK_DEFAULT_PVT dependencies on WIP_SCHED_RELATIONSHIPS

Line 93: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;

89: l_child_maint_obj_src NUMBER := 1;
90: l_maint_obj_src NUMBER := 1;
91: l_rebuild_item_id NUMBER := null;
92:
93: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;
94: l_constraining_parents l_relationship_records;
95: l_constraining_children l_relationship_records;
96: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
97:

Line 96: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;

92:
93: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;
94: l_constraining_parents l_relationship_records;
95: l_constraining_children l_relationship_records;
96: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
97:
98: l_child_object_id NUMBER := p_child_object_id;
99: l_child_object_type_id NUMBER := p_child_object_type_id;
100: l_parent_object_id NUMBER := p_parent_object_id;

Line 295: from wip_sched_relationships where

291: and child_object_type_id = l_child_object_type_id
292: and parent_relationship_type = l_relationship_type;
293: elsif l_parent_maint_obj_src = 2 then -- CMRO
294: select count(*) into l_count
295: from wip_sched_relationships where
296: child_object_id = l_child_object_id
297: and child_object_type_id = l_child_object_type_id
298: and relationship_type = l_relationship_type;
299: end if;

Line 372: from wip_sched_relationships

368:
369: -- Get some common variables
370: -- 1. top_level_object_id
371: select count(*) into l_count
372: from wip_sched_relationships
373: where child_object_id = l_parent_object_id
374: and child_object_type_id = l_parent_object_type_id
375: and relationship_type = 1;
376: IF l_count = 0 THEN -- Adding directly to topmost node

Line 382: from wip_sched_relationships

378: l_top_level_object_type_id := l_parent_object_type_id;
379: ELSE
380: select distinct top_level_object_id, top_level_object_type_id
381: into l_top_level_object_id , l_top_level_object_type_id
382: from wip_sched_relationships
383: where child_object_id = l_parent_object_id
384: and child_object_type_id = l_parent_object_type_id;
385: END IF;
386:

Line 522: select * from wip_sched_relationships wsr

518: -- of top level object id
519: IF NOT l_constraining_children%ISOPEN THEN
520: OPEN l_constraining_children FOR
521:
522: select * from wip_sched_relationships wsr
523: WHERE wsr.relationship_type in (1,2)
524: START WITH wsr.parent_object_id = l_parent_object_id
525: CONNECT BY wsr.parent_object_id = PRIOR wsr.child_object_id;
526:

Line 531: from wip_sched_relationships

527: END IF;
528: --for bug 9053183
529: select sched_relationship_id
530: into l_sched_relationship_id
531: from wip_sched_relationships
532: where parent_object_id= l_parent_object_id
533: and parent_object_type_id = l_parent_object_type_id
534: and child_object_id=l_child_object_id
535: and child_object_type_id = l_child_object_type_id

Line 539: update wip_sched_relationships set

535: and child_object_type_id = l_child_object_type_id
536: and relationship_type=l_relationship_type;
537:
538:
539: update wip_sched_relationships set
540: top_level_object_id = l_top_level_object_id,
541: top_level_object_type_id = l_top_level_object_type_id
542: where sched_relationship_id = l_sched_relationship_id;
543:

Line 548: -- test_mesg('after update wip_sched_relationships sched rel id '||l_sched_relationship_id||' l_parent_object_id ' ||l_parent_object_id ||' l_child_object_id '||l_child_object_id );

544:
545: select maintenance_object_source into l_maint_obj_src
546: from wip_discrete_jobs where wip_entity_id = l_parent_object_id;
547:
548: -- test_mesg('after update wip_sched_relationships sched rel id '||l_sched_relationship_id||' l_parent_object_id ' ||l_parent_object_id ||' l_child_object_id '||l_child_object_id );
549: if l_maint_obj_src = 1 then -- EAM
550:
551: LOOP FETCH l_constraining_children into
552: l_relationship_record;

Line 558: /* update wip_sched_relationships set

554: if l_relationship_record.parent_object_id is not null then
555: l_relationship_record.top_level_object_id := l_top_level_object_id;
556: l_relationship_record.top_level_object_type_id := l_top_level_object_type_id;
557:
558: /* update wip_sched_relationships set
559: top_level_object_id = l_top_level_object_id,
560: top_level_object_type_id = l_top_level_object_type_id
561: where sched_relationship_id = l_relationship_record.sched_relationship_id;
562:

Line 633: select * from wip_sched_relationships wsr

629: -- in the upward direction
630: IF NOT l_constraining_parents%ISOPEN THEN
631: OPEN l_constraining_parents FOR
632:
633: select * from wip_sched_relationships wsr
634: WHERE wsr.relationship_type = 1
635: START WITH wsr.child_object_id = l_child_object_id
636: CONNECT BY PRIOR wsr.parent_object_id = wsr.child_object_id;
637:

Line 775: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;

771: l_wo_end_date DATE := null;
772: l_status_type NUMBER;
773: l_date_completed DATE;
774:
775: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;
776: l_constrained_children l_relationship_records;
777: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
778:
779: BEGIN

Line 777: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;

773: l_date_completed DATE;
774:
775: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;
776: l_constrained_children l_relationship_records;
777: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
778:
779: BEGIN
780:
781: -- Find the min start date and max end date of all

Line 788: wip_sched_relationships

784: -- find the list of constrained children
785: IF NOT l_constrained_children%ISOPEN THEN
786: OPEN l_constrained_children FOR
787: select * from
788: wip_sched_relationships
789: where relationship_type = 1
790: and parent_object_id = l_parent_object_id
791: and parent_object_type_id = l_parent_object_type_id;
792: END IF;

Line 1090: wip_sched_relationships where

1086:
1087:
1088: -- Validate that the relationship is a leaf node
1089: select count(*) into l_count_prior from
1090: wip_sched_relationships where
1091: child_object_id = l_prior_object_id
1092: and child_object_type_id = l_prior_object_id
1093: and relationship_type = 2;
1094: select count(*) into l_count_next from

Line 1095: wip_sched_relationships where

1091: child_object_id = l_prior_object_id
1092: and child_object_type_id = l_prior_object_id
1093: and relationship_type = 2;
1094: select count(*) into l_count_next from
1095: wip_sched_relationships where
1096: parent_object_id = l_next_object_id
1097: and parent_object_type_id = l_next_object_id
1098: and relationship_type = 2;
1099: if l_count_prior <> 0 and l_count_next <> 0 then

Line 1147: from WIP_SCHED_RELATIONSHIPS

1143: end if;
1144:
1145: -- Simple delete of type 2 relationship.
1146: select sched_relationship_id into l_sched_relationship_id
1147: from WIP_SCHED_RELATIONSHIPS
1148: where parent_object_id = l_prior_object_id
1149: and parent_object_type_id = l_prior_object_type_id
1150: and child_object_id = l_next_object_id
1151: and child_object_type_id = l_next_object_type_id

Line 1304: wip_sched_relationships where

1300:
1301: -- Check that both work orders are part of
1302: -- some sched hierarchies
1303: select count(*) into l_count from
1304: wip_sched_relationships where
1305: child_object_id = l_prior_object_id
1306: and child_object_type_id = l_prior_object_type_id
1307: and relationship_type = 1;
1308: if l_count = 0 then

Line 1329: wip_sched_relationships where

1325: return;
1326: end if;
1327:
1328: select count(*) into l_count from
1329: wip_sched_relationships where
1330: child_object_id = l_next_object_id
1331: and child_object_type_id = l_next_object_type_id
1332: and relationship_type = 1;
1333: if l_count = 0 then

Line 1467: from wip_sched_relationships

1463: -- Get some common variables
1464: -- 1. top_level_object_id
1465: select distinct top_level_object_id, top_level_object_type_id
1466: into l_top_level_object_id , l_top_level_object_type_id
1467: from wip_sched_relationships
1468: where child_object_id = l_prior_object_id
1469: and child_object_type_id = l_prior_object_type_id
1470: and relationship_type = 1;
1471:

Line 1474: from wip_sched_relationships

1470: and relationship_type = 1;
1471:
1472: select distinct top_level_object_id, top_level_object_type_id
1473: into l_top_level_object_id_1 , l_top_level_object_type_id_1
1474: from wip_sched_relationships
1475: where child_object_id = l_next_object_id
1476: and child_object_type_id = l_next_object_type_id
1477: and relationship_type = 1;
1478:

Line 1700: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;

1696: l_eam_sub_res_tbl EAM_PROCESS_WO_PUB.eam_sub_res_tbl_type ;
1697: l_eam_res_usage_tbl EAM_PROCESS_WO_PUB.eam_res_usage_tbl_type ;
1698: l_eam_mat_req_tbl EAM_PROCESS_WO_PUB.eam_mat_req_tbl_type ;
1699:
1700: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;
1701: l_constraining_children l_relationship_records;
1702: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
1703:
1704: l_maint_obj_src NUMBER;

Line 1702: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;

1698: l_eam_mat_req_tbl EAM_PROCESS_WO_PUB.eam_mat_req_tbl_type ;
1699:
1700: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;
1701: l_constraining_children l_relationship_records;
1702: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
1703:
1704: l_maint_obj_src NUMBER;
1705:
1706: l_parent_workorder VARCHAR2(240);

Line 1710: l_parent_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;

1706: l_parent_workorder VARCHAR2(240);
1707: l_child_workorder VARCHAR2(240);
1708:
1709: l_constraining_parents l_relationship_records;
1710: l_parent_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
1711: l_parent_firm_flag NUMBER;
1712:
1713: BEGIN
1714:

Line 1733: wip_sched_relationships where

1729: -- if it is a scheduling relationship that is being deleted.
1730: l_count := 0;
1731: if l_relationship_type = 1 then
1732: select count(*) into l_count from
1733: wip_sched_relationships where
1734: ((child_object_id = l_child_object_id and
1735: child_object_type_id = l_child_object_type_id) OR
1736: (parent_object_id = l_child_object_id and
1737: parent_object_type_id = l_child_object_type_id)

Line 1754: from WIP_SCHED_RELATIONSHIPS

1750:
1751: if l_relationship_type = 1 then
1752:
1753: select sched_relationship_id into l_sched_relationship_id
1754: from WIP_SCHED_RELATIONSHIPS
1755: where parent_object_id = l_parent_object_id
1756: and parent_object_type_id = l_parent_object_type_id
1757: and child_object_id = l_child_object_id
1758: and child_object_type_id = l_child_object_type_id

Line 1829: select * from wip_sched_relationships wsr

1825: -- find the list of subsequent constraining parents in the upward direction
1826: IF NOT l_constraining_parents%ISOPEN THEN
1827: OPEN l_constraining_parents FOR
1828:
1829: select * from wip_sched_relationships wsr
1830: WHERE wsr.relationship_type = 1
1831: START WITH wsr.child_object_id = l_parent_object_id
1832: CONNECT BY PRIOR wsr.parent_object_id = wsr.child_object_id;
1833:

Line 1867: select * from wip_sched_relationships wsr

1863: -- of top level object id
1864: IF NOT l_constraining_children%ISOPEN THEN
1865: OPEN l_constraining_children FOR
1866:
1867: select * from wip_sched_relationships wsr
1868: WHERE wsr.relationship_type in (1,2)
1869: START WITH wsr.parent_object_id = l_child_object_id
1870: CONNECT BY wsr.parent_object_id = PRIOR wsr.child_object_id;
1871:

Line 1881: update wip_sched_relationships set

1877: if l_relationship_record.parent_object_id is not null then
1878: l_relationship_record.top_level_object_id := l_child_object_id;
1879: l_relationship_record.top_level_object_type_id := l_child_object_type_id;
1880:
1881: update wip_sched_relationships set
1882: top_level_object_id = l_child_object_id,
1883: top_level_object_type_id = l_child_object_type_id
1884: where sched_relationship_id = l_relationship_record.sched_relationship_id;
1885:

Line 2912: FROM WIP_SCHED_RELATIONSHIPS WSR,

2908: l_stmt_num := 40;
2909:
2910: SELECT (WDJ1.SCHEDULED_COMPLETION_DATE - WDJ2.SCHEDULED_COMPLETION_DATE)
2911: INTO l_this_level_min_window
2912: FROM WIP_SCHED_RELATIONSHIPS WSR,
2913: WIP_DISCRETE_JOBS WDJ1,
2914: WIP_DISCRETE_JOBS WDJ2
2915: WHERE WSR.CHILD_OBJECT_ID = l_work_object_id
2916: AND WSR.CHILD_OBJECT_TYPE_ID = l_work_object_type_id

Line 2957: FROM WIP_SCHED_RELATIONSHIPS WSR,

2953: l_stmt_num := 60;
2954:
2955: SELECT MIN(WDJ2.SCHEDULED_START_DATE - WDJ1.SCHEDULED_COMPLETION_DATE)
2956: INTO l_min_right_snap_window
2957: FROM WIP_SCHED_RELATIONSHIPS WSR,
2958: WIP_DISCRETE_JOBS WDJ1,
2959: WIP_DISCRETE_JOBS WDJ2
2960: WHERE WSR.PARENT_OBJECT_TYPE_ID = 1
2961: AND WSR.CHILD_OBJECT_TYPE_ID = 1

Line 3196: FROM WIP_SCHED_RELATIONSHIPS WSR,

3192: l_stmt_num := 40;
3193:
3194: SELECT (WDJ2.SCHEDULED_START_DATE - WDJ1.SCHEDULED_START_DATE)
3195: INTO l_this_level_min_window
3196: FROM WIP_SCHED_RELATIONSHIPS WSR,
3197: WIP_DISCRETE_JOBS WDJ1,
3198: WIP_DISCRETE_JOBS WDJ2
3199: WHERE WSR.CHILD_OBJECT_ID = l_work_object_id
3200: AND WSR.CHILD_OBJECT_TYPE_ID = l_work_object_type_id

Line 3240: FROM WIP_SCHED_RELATIONSHIPS WSR,

3236: l_stmt_num := 60;
3237:
3238: SELECT MIN(WDJ1.SCHEDULED_START_DATE - WDJ2.SCHEDULED_COMPLETION_DATE)
3239: INTO l_min_left_snap_window
3240: FROM WIP_SCHED_RELATIONSHIPS WSR,
3241: WIP_DISCRETE_JOBS WDJ1,
3242: WIP_DISCRETE_JOBS WDJ2
3243: WHERE WSR.PARENT_OBJECT_TYPE_ID = 1
3244: AND WSR.CHILD_OBJECT_TYPE_ID = 1

Line 3425: FROM WIP_SCHED_RELATIONSHIPS WSR

3421:
3422: CURSOR constrained_children_cur (l_p_object NUMBER, l_p_object_type NUMBER) IS
3423: SELECT WSR.CHILD_OBJECT_ID,
3424: WSR.CHILD_OBJECT_TYPE_ID
3425: FROM WIP_SCHED_RELATIONSHIPS WSR
3426: WHERE WSR.PARENT_OBJECT_ID = l_p_object
3427: AND WSR.PARENT_OBJECT_TYPE_ID = l_p_object_type
3428: AND WSR.RELATIONSHIP_TYPE = 1;
3429:

Line 3485: FROM WIP_SCHED_RELATIONSHIPS WSR,

3481:
3482: BEGIN
3483: SELECT MIN(WDJ2.SCHEDULED_START_DATE-WDJ1.SCHEDULED_COMPLETION_DATE)
3484: INTO l_min_right_snap_window
3485: FROM WIP_SCHED_RELATIONSHIPS WSR,
3486: WIP_DISCRETE_JOBS WDJ1,
3487: WIP_DISCRETE_JOBS WDJ2
3488: WHERE WSR.PARENT_OBJECT_TYPE_ID = 1
3489: AND WSR.CHILD_OBJECT_TYPE_ID = 1

Line 3501: FROM WIP_SCHED_RELATIONSHIPS WSR2

3497: -- Commented out;bcos no status checks as per new design.
3498: -- AND WDJ1.STATUS_TYPE IN (3,4,5,6,7,12,14,15)
3499: AND WDJ2.WIP_ENTITY_ID NOT IN (
3500: SELECT WSR2.CHILD_OBJECT_ID CHILD_OBJECT_ID
3501: FROM WIP_SCHED_RELATIONSHIPS WSR2
3502: WHERE WSR2.RELATIONSHIP_TYPE = 1
3503: AND l_starting_obj_type_id = 1
3504: CONNECT BY prior WSR2.CHILD_OBJECT_ID = WSR2.PARENT_OBJECT_ID
3505: START WITH WSR2.PARENT_OBJECT_ID = l_starting_object_id

Line 3679: FROM WIP_SCHED_RELATIONSHIPS WSR

3675:
3676: CURSOR constrained_children_cur (l_p_object NUMBER, l_p_object_type NUMBER) IS
3677: SELECT WSR.CHILD_OBJECT_ID,
3678: WSR.CHILD_OBJECT_TYPE_ID
3679: FROM WIP_SCHED_RELATIONSHIPS WSR
3680: WHERE WSR.PARENT_OBJECT_ID = l_p_object
3681: AND WSR.PARENT_OBJECT_TYPE_ID = l_p_object_type
3682: AND WSR.RELATIONSHIP_TYPE = 1;
3683:

Line 3739: FROM WIP_SCHED_RELATIONSHIPS WSR,

3735:
3736: BEGIN
3737: SELECT MIN(WDJ2.SCHEDULED_START_DATE-WDJ1.SCHEDULED_COMPLETION_DATE)
3738: INTO l_min_left_snap_window
3739: FROM WIP_SCHED_RELATIONSHIPS WSR,
3740: WIP_DISCRETE_JOBS WDJ1,
3741: WIP_DISCRETE_JOBS WDJ2
3742: WHERE WSR.PARENT_OBJECT_TYPE_ID = 1
3743: AND WSR.CHILD_OBJECT_TYPE_ID = 1

Line 3755: FROM WIP_SCHED_RELATIONSHIPS WSR2

3751: -- Commented out;bcos no status checks as per new design.
3752: -- AND WDJ2.STATUS_TYPE IN (3,4,5,6,7,12,14,15)
3753: AND WDJ1.WIP_ENTITY_ID NOT IN (
3754: SELECT WSR2.CHILD_OBJECT_ID CHILD_OBJECT_ID
3755: FROM WIP_SCHED_RELATIONSHIPS WSR2
3756: WHERE WSR2.RELATIONSHIP_TYPE = 1
3757: AND l_starting_obj_type_id = 1
3758: CONNECT BY prior WSR2.CHILD_OBJECT_ID = WSR2.PARENT_OBJECT_ID
3759: START WITH WSR2.PARENT_OBJECT_ID = l_starting_object_id

Line 3899: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;

3895: l_requested_due_date DATE;
3896: l_status_type NUMBER;
3897: l_date_completed DATE;
3898:
3899: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;
3900: l_constrained_children l_relationship_records;
3901: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
3902:
3903: BEGIN

Line 3901: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;

3897: l_date_completed DATE;
3898:
3899: TYPE l_relationship_records IS REF CURSOR RETURN WIP_SCHED_RELATIONSHIPS%ROWTYPE;
3900: l_constrained_children l_relationship_records;
3901: l_relationship_record WIP_SCHED_RELATIONSHIPS%ROWTYPE;
3902:
3903: BEGIN
3904:
3905: l_parent_object_id := p_parent_object_id;

Line 3915: wip_sched_relationships

3911: -- find the list of constrained children
3912: IF NOT l_constrained_children%ISOPEN THEN
3913: OPEN l_constrained_children FOR
3914: select * from
3915: wip_sched_relationships
3916: where relationship_type = 1
3917: and parent_object_id = l_parent_object_id
3918: and parent_object_type_id = l_parent_object_type_id;
3919: END IF;