DBA Data[Home] [Help]

APPS.BOMPCMBM dependencies on BOM_COMPONENTS_B

Line 734: FROM BOM_COMPONENTS_B

730: END IF;
731:
732: SELECT implementation_date
733: INTO l_impl_date
734: FROM BOM_COMPONENTS_B
735: WHERE component_sequence_id = p_orig_old_comp_seq;
736:
737: SELECT component_sequence_id, wip_supply_type, supply_subinventory, supply_locator_id, include_in_cost_rollup, operation_seq_num
738: INTO x_old_comp_seq_id, x_wip_supply_type, x_wip_supply_subinv, x_wip_supply_locator_id, x_inc_in_cost_rollup, x_op_seq

Line 739: FROM BOM_COMPONENTS_B bic

735: WHERE component_sequence_id = p_orig_old_comp_seq;
736:
737: SELECT component_sequence_id, wip_supply_type, supply_subinventory, supply_locator_id, include_in_cost_rollup, operation_seq_num
738: INTO x_old_comp_seq_id, x_wip_supply_type, x_wip_supply_subinv, x_wip_supply_locator_id, x_inc_in_cost_rollup, x_op_seq
739: FROM BOM_COMPONENTS_B bic
740: WHERE bic.bill_sequence_id = p_dest_bill_seq_id
741: AND bic.COMMON_COMPONENT_SEQUENCE_ID = p_orig_old_comp_seq --bic.old_component_sequence_id
742: AND (
743: (bic.implementation_date is not null

Line 775: FROM bom_components_b

771:
772: BEGIN
773: SELECT component_item_revision_id
774: INTO l_comp_rev_id
775: FROM bom_components_b
776: WHERE component_sequence_id = p_src_comp_seq_id;
777:
778: IF l_comp_rev_id IS NULL
779: THEN

Line 812: from BOM_COMPONENTS_B

808: IS
809: Cursor get_source_components(p_bill_sequence_id Number)
810: IS
811: SELECT *
812: from BOM_COMPONENTS_B
813: where bill_sequence_id = p_bill_sequence_id;
814:
815: Cursor get_structure_type(p_bill_seq_id NUMBER)
816: IS

Line 825: FROM BOM_COMPONENTS_B

821:
822: Cursor get_dest_components(p_src_comp_seq_id IN NUMBER, p_dest_bill_sequence_id IN NUMBER)
823: IS
824: SELECT *
825: FROM BOM_COMPONENTS_B
826: WHERE common_component_sequence_id = p_src_comp_seq_id
827: and component_sequence_id <> common_component_sequence_id
828: AND bill_sequence_id = p_dest_bill_sequence_id;
829:

Line 929: /*insert into BOM_COMPONENTS_B()

925: --comp_rec.wip_supply_type := null;
926: --Cant create a record with null wip_supply_type
927: comp_rec.supply_subinventory := null;
928: end if;*/
929: /*insert into BOM_COMPONENTS_B()
930: values();*/
931: INSERT INTO BOM_COMPONENTS_B
932: ( SUPPLY_SUBINVENTORY
933: , OPERATION_LEAD_TIME_PERCENT

Line 931: INSERT INTO BOM_COMPONENTS_B

927: comp_rec.supply_subinventory := null;
928: end if;*/
929: /*insert into BOM_COMPONENTS_B()
930: values();*/
931: INSERT INTO BOM_COMPONENTS_B
932: ( SUPPLY_SUBINVENTORY
933: , OPERATION_LEAD_TIME_PERCENT
934: , REVISED_ITEM_SEQUENCE_ID
935: , COST_FACTOR

Line 1089: FROM BOM_COMPONENTS_B comp_rec, MTL_SYSTEM_ITEMS_B item, BOM_STRUCTURES_B bom

1085: , comp_rec.from_minor_revision_id
1086: , comp_rec.component_sequence_id
1087: , comp_rec.basis_type
1088: , decode(comp_rec.component_item_revision_id, null, null, BOMPCMBM.get_rev_id_for_local_org(comp_rec.component_item_revision_id, l_dest_org_id))
1089: FROM BOM_COMPONENTS_B comp_rec, MTL_SYSTEM_ITEMS_B item, BOM_STRUCTURES_B bom
1090: WHERE comp_rec.bill_sequence_id = p_src_bill_sequence_id
1091: AND bom.bill_sequence_id = comp_rec.bill_sequence_id
1092: AND comp_rec.COMPONENT_ITEM_ID = item.inventory_item_id
1093: AND item.organization_id = l_dest_org_id

Line 1155: UPDATE BOM_COMPONENTS_B

1151: , x_wip_supply_subinv => destn_comp.supply_subinventory
1152: , x_wip_supply_locator_id => destn_comp.supply_locator_id
1153: , x_inc_in_cost_rollup => destn_comp.include_in_cost_rollup
1154: , x_op_seq => destn_comp.operation_seq_num);
1155: UPDATE BOM_COMPONENTS_B
1156: SET old_component_sequence_id = destn_comp.old_component_sequence_id,
1157: wip_supply_type = destn_comp.wip_supply_type,
1158: supply_subinventory = destn_comp.supply_subinventory,
1159: supply_locator_id = destn_comp.supply_locator_id,

Line 1259: From BOM_COMPONENTS_B

1255: and source_bill_sequence_id = p_src_bill_sequence_id;
1256:
1257: Cursor get_src_comp_details(p_src_comp_seq_id NUMBER) IS
1258: Select *
1259: From BOM_COMPONENTS_B
1260: where component_sequence_id = p_src_comp_seq_id;
1261:
1262: l_err_text VARCHAR2(2000);
1263: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;

Line 1302: FROM BOM_COMPONENTS_B

1298: FND_PROFILE.GET('BOM:DEFAULT_WIP_VALUES', default_wip_params);
1299:
1300: SELECT operation_seq_num
1301: INTO l_operation_seq_num
1302: FROM BOM_COMPONENTS_B
1303: WHERE component_Sequence_id = p_src_comp_seq_id;
1304:
1305: Check_Comp_Fixed_Rev_Dtls(p_src_bill_seq_id => p_src_bill_seq_id
1306: , p_src_comp_seq_id => p_src_comp_seq_id

Line 1314: from mtl_system_items_kfv item, bom_components_b comp

1310: THEN
1311:
1312: SELECT concatenated_segments
1313: into l_comp_name
1314: from mtl_system_items_kfv item, bom_components_b comp
1315: where item.inventory_item_id = comp.pk1_value
1316: and item.organization_id = comp.pk2_value
1317: and comp.component_sequence_id = p_src_comp_seq_id;
1318:

Line 1376: INSERT INTO BOM_COMPONENTS_B

1372: src_comp_details.component_sequence_id := get_component_sequence;
1373:
1374: --Set the old_component_sequence ids, if any, to refer to comps in the same bill instead of source bill.
1375:
1376: INSERT INTO BOM_COMPONENTS_B
1377: ( SUPPLY_SUBINVENTORY
1378: , OPERATION_LEAD_TIME_PERCENT
1379: , REVISED_ITEM_SEQUENCE_ID
1380: , COST_FACTOR

Line 1576: UPDATE BOM_COMPONENTS_B

1572: , x_op_seq => src_comp_details.operation_seq_num);
1573:
1574: IF src_comp_details.old_component_sequence_id IS NOT NULL
1575: THEN
1576: UPDATE BOM_COMPONENTS_B
1577: SET old_component_sequence_id = src_comp_details.old_component_sequence_id,
1578: wip_supply_type = src_comp_details.wip_supply_type,
1579: supply_subinventory = src_comp_details.supply_subinventory,
1580: supply_locator_id = src_comp_details.supply_locator_id,

Line 1645: FROM BOM_COMPONENTS_B

1641: --Cannot have records with basis type as lot and supply type Phantom.
1642: BEGIN
1643: SELECT 'Y'
1644: INTO l_dummy
1645: FROM BOM_COMPONENTS_B
1646: WHERE wip_supply_type = 6
1647: AND basis_type = 2
1648: AND component_sequence_id = src_comp_details.component_sequence_id;
1649:

Line 1772: FROM BOM_COMPONENTS_B

1768: )
1769: IS
1770: Cursor get_related_Components(p_src_comp_seq_id NUMBER) IS
1771: SELECT *
1772: FROM BOM_COMPONENTS_B
1773: WHERE common_component_sequence_id = p_src_comp_seq_id
1774: AND COMPONENT_SEQUENCE_ID <> COMMON_COMPONENT_SEQUENCE_ID;
1775:
1776: Cursor get_src_comp_details(p_src_comp_seq_id NUMBER) IS

Line 1778: FROM BOM_COMPONENTS_B

1774: AND COMPONENT_SEQUENCE_ID <> COMMON_COMPONENT_SEQUENCE_ID;
1775:
1776: Cursor get_src_comp_details(p_src_comp_seq_id NUMBER) IS
1777: SELECT *
1778: FROM BOM_COMPONENTS_B
1779: WHERE component_sequence_id = p_src_comp_seq_id;
1780:
1781: l_return_status varchar2(80);
1782: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;

Line 1830: from mtl_system_items_kfv item, bom_components_b comp

1826: THEN
1827:
1828: SELECT concatenated_segments
1829: into l_comp_name
1830: from mtl_system_items_kfv item, bom_components_b comp
1831: where item.inventory_item_id = comp.pk1_value
1832: and item.organization_id = comp.pk2_value
1833: and comp.component_sequence_id = p_src_comp_seq_id;
1834:

Line 1854: UPDATE BOM_COMPONENTS_B dest_cmpo

1850: END IF;
1851:
1852: for dest_comp in get_related_Components(p_src_comp_seq_id)
1853: loop
1854: UPDATE BOM_COMPONENTS_B dest_cmpo
1855: SET REQUIRED_FOR_REVENUE = src_comp.required_for_revenue
1856: , HIGH_QUANTITY = src_comp.HIGH_QUANTITY
1857: /* , WIP_SUPPLY_TYPE = p_rev_component_rec.wip_supply_type
1858: , SUPPLY_LOCATOR_ID =

Line 1993: FROM BOM_COMPONENTS_B

1989: BEGIN
1990:
1991: SELECT basis_type
1992: INTO l_dummy
1993: FROM BOM_COMPONENTS_B
1994: WHERE component_sequence_id = dest_comp.component_sequence_id;
1995:
1996: SELECT 'Y'
1997: INTO l_dummy

Line 1998: FROM BOM_COMPONENTS_B

1994: WHERE component_sequence_id = dest_comp.component_sequence_id;
1995:
1996: SELECT 'Y'
1997: INTO l_dummy
1998: FROM BOM_COMPONENTS_B
1999: WHERE wip_supply_type = 6
2000: AND basis_type = 2
2001: AND component_sequence_id = dest_comp.component_sequence_id;
2002:

Line 2064: UPDATE BOM_COMPONENTS_B bic

2060: --If the update is of the editable attrs of a component in an editable common bill
2061:
2062: --When the WIP attrs for the old component are modified, the pending changes still referencing
2063: --the ECO on src bill should be synchronized with the same values.
2064: UPDATE BOM_COMPONENTS_B bic
2065: SET (wip_supply_type, supply_locator_id, supply_subinventory, operation_seq_num, include_in_cost_rollup) =
2066: (SELECT wip_supply_type, supply_locator_id, supply_subinventory, operation_seq_num, include_in_cost_rollup
2067: FROM BOM_COMPONENTS_B
2068: WHERE component_sequence_id = p_src_comp_Seq_id)

Line 2067: FROM BOM_COMPONENTS_B

2063: --the ECO on src bill should be synchronized with the same values.
2064: UPDATE BOM_COMPONENTS_B bic
2065: SET (wip_supply_type, supply_locator_id, supply_subinventory, operation_seq_num, include_in_cost_rollup) =
2066: (SELECT wip_supply_type, supply_locator_id, supply_subinventory, operation_seq_num, include_in_cost_rollup
2067: FROM BOM_COMPONENTS_B
2068: WHERE component_sequence_id = p_src_comp_Seq_id)
2069: WHERE old_component_sequence_id = p_src_comp_Seq_id
2070: AND implementation_date IS NULL
2071: AND nvl(common_component_sequence_id, component_sequence_id) <> component_sequence_id

Line 2205: FROM BOM_COMPONENTS_B comp, BOM_REFERENCE_DESIGNATORS ref_desg

2201: , ref_desg.attribute14
2202: , ref_desg.attribute15
2203: , ref_desg.Original_System_Reference
2204: , p_component_sequence_id
2205: FROM BOM_COMPONENTS_B comp, BOM_REFERENCE_DESIGNATORS ref_desg
2206: WHERE comp.component_sequence_id <> comp.common_component_sequence_id
2207: AND comp.common_component_sequence_id = ref_desg.component_sequence_id
2208: AND ref_desg.component_sequence_id = p_component_sequence_id
2209: AND NOT EXISTS

Line 2289: from BOM_COMPONENTS_B dest, BOM_COMPONENTS_B src

2285:
2286: Cursor get_destn_comps(p_comp_seq_id number)
2287: is
2288: select dest.component_sequence_id
2289: from BOM_COMPONENTS_B dest, BOM_COMPONENTS_B src
2290: where dest.component_sequence_id <> dest.common_component_sequence_id
2291: and dest.common_component_sequence_id = p_comp_seq_id
2292: and src.component_sequence_id = dest.common_component_sequence_id
2293: and ((src.implementation_date is null

Line 2451: from BOM_COMPONENTS_B

2447:
2448: Cursor get_destn_comps(p_comp_seq_id number)
2449: is
2450: select component_sequence_id
2451: from BOM_COMPONENTS_B
2452: where component_sequence_id <> common_component_sequence_id
2453: and common_component_sequence_id = p_comp_seq_id;
2454:
2455: BEGIN

Line 2562: from BOM_COMPONENTS_B

2558:
2559: Cursor get_destn_comps(p_comp_seq_id number)
2560: is
2561: select component_sequence_id
2562: from BOM_COMPONENTS_B
2563: where component_sequence_id <> common_component_sequence_id
2564: and common_component_sequence_id = p_component_sequence_id;
2565:
2566: l_return_status varchar2(80);

Line 2640: FROM BOM_SUBSTITUTE_COMPONENTS sub_comp, BOM_COMPONENTS_B dest_comp

2636: , Bom_Globals.Get_Prog_Id
2637: , sub_comp.Original_System_Reference
2638: , sub_comp.enforce_int_requirements
2639: , sub_comp.component_sequence_id
2640: FROM BOM_SUBSTITUTE_COMPONENTS sub_comp, BOM_COMPONENTS_B dest_comp
2641: WHERE dest_comp.component_Sequence_id <> dest_comp.common_component_sequence_id
2642: AND dest_comp.common_component_sequence_id = sub_comp.component_sequence_id
2643: AND sub_comp.component_sequence_id = p_component_sequence_id
2644: AND NOT EXISTS

Line 2724: from BOM_COMPONENTS_B dest, BOM_COMPONENTS_B src

2720:
2721: Cursor get_destn_comps(p_comp_seq_id number)
2722: is
2723: select dest.component_sequence_id
2724: from BOM_COMPONENTS_B dest, BOM_COMPONENTS_B src
2725: where dest.component_sequence_id <> dest.common_component_sequence_id
2726: and dest.common_component_sequence_id = p_comp_seq_id
2727: and src.component_sequence_id = dest.common_component_sequence_id
2728: and ((src.implementation_date is null

Line 2892: from BOM_COMPONENTS_B

2888:
2889: Cursor get_destn_comps(p_comp_seq_id number)
2890: is
2891: select component_sequence_id
2892: from BOM_COMPONENTS_B
2893: where component_sequence_id <> common_component_sequence_id
2894: and common_component_sequence_id = p_comp_seq_id;
2895:
2896: BEGIN

Line 3001: from BOM_COMPONENTS_B

2997:
2998: Cursor get_destn_comps(p_comp_seq_id number)
2999: is
3000: select *
3001: from BOM_COMPONENTS_B
3002: where component_sequence_id <> common_component_sequence_id
3003: and common_component_sequence_id = p_comp_seq_id;
3004:
3005: l_return_status varchar2(80);

Line 3037: FROM bom_component_operations bco, BOM_COMPONENTS_B bic

3033: loop
3034: BEGIN
3035: SELECT bco.operation_seq_num
3036: INTO l_dummy
3037: FROM bom_component_operations bco, BOM_COMPONENTS_B bic
3038: WHERE bco.component_sequence_id = bic.component_sequence_id
3039: AND bic.component_sequence_id = p_component_sequence_id
3040: AND EXISTS(
3041: SELECT operation_seq_num, bos.routing_sequence_id

Line 3125: FROM BOM_COMPONENT_OPERATIONS comp_ops, BOM_COMPONENTS_B dest_comp

3121: comp_ops.ATTRIBUTE13 ,
3122: comp_ops.ATTRIBUTE14 ,
3123: comp_ops.ATTRIBUTE15 ,
3124: comp_ops.COMPONENT_SEQUENCE_ID
3125: FROM BOM_COMPONENT_OPERATIONS comp_ops, BOM_COMPONENTS_B dest_comp
3126: WHERE dest_comp.component_Sequence_id <> dest_comp.common_component_sequence_id
3127: AND dest_comp.common_component_sequence_id = comp_ops.component_sequence_id
3128: AND comp_ops.component_sequence_id = p_component_sequence_id
3129: AND NOT EXISTS

Line 3208: from BOM_COMPONENTS_B

3204:
3205: Cursor get_destn_comps(p_comp_seq_id number)
3206: is
3207: select component_sequence_id, bill_sequence_id
3208: from BOM_COMPONENTS_B
3209: where component_sequence_id <> common_component_sequence_id
3210: and common_component_sequence_id = p_comp_seq_id;
3211:
3212: BEGIN

Line 3353: from BOM_COMPONENTS_B

3349:
3350: Cursor get_destn_comps(p_comp_seq_id number)
3351: is
3352: select component_sequence_id
3353: from BOM_COMPONENTS_B
3354: where component_sequence_id <> common_component_sequence_id
3355: and common_component_sequence_id = p_comp_seq_id;
3356:
3357: BEGIN

Line 3491: From BOM_COMPONENTS_B

3487:
3488: Cursor get_src_op_seq(p_src_bill_sequence_id NUMBER)
3489: IS
3490: Select OPERATION_SEQ_NUM
3491: From BOM_COMPONENTS_B
3492: Where bill_sequence_id = p_src_bill_sequence_id;
3493:
3494: /* Cursor get_primary_rtg_opns(p_assy_item_id NUMBER, p_org_id NUMBER, p_alt_desg VARCHAR2)
3495: IS

Line 3630: from BOM_COMPONENTS_B

3626: Cursor get_source_and_dest_components(p_bill_sequence_id Number)
3627: IS
3628: SELECT
3629: component_sequence_id, common_component_sequence_id
3630: from BOM_COMPONENTS_B
3631: where bill_sequence_id = p_bill_sequence_id
3632: and component_sequence_id <> common_component_sequence_id;
3633:
3634: Cursor get_structure_type(p_bill_seq_id NUMBER)

Line 3730: FROM BOM_COMPONENTS_B bcb, BOM_STRUCTURES_B bsb

3726:
3727: Cursor get_dest_comps(p_src_comp_seq_id NUMBER, p_str_type_id NUMBER)
3728: IS
3729: SELECT bcb.component_sequence_id, bcb.bill_sequence_id
3730: FROM BOM_COMPONENTS_B bcb, BOM_STRUCTURES_B bsb
3731: WHERE bcb.common_component_sequence_id = p_src_comp_seq_id
3732: AND bcb.common_component_sequence_id <> bcb.component_sequence_id
3733: AND bsb.structure_type_id = p_str_type_id
3734: AND bsb.bill_sequence_id = bcb.bill_sequence_id

Line 3753: from BOM_COMPONENTS_B

3749:
3750: BEGIN
3751: SELECT bill_sequence_id
3752: into l_src_bill_seq_id
3753: from BOM_COMPONENTS_B
3754: where component_sequence_id = p_src_comp_seq_id;
3755:
3756: Open get_structure_type(p_bill_seq_id => l_src_bill_seq_id);
3757: Fetch get_structure_type into l_src_str_type;

Line 4040: FROM BOM_COMPONENTS_B bic

4036: THEN
4037:
4038: SELECT 1
4039: INTO l_dummy
4040: FROM BOM_COMPONENTS_B bic
4041: WHERE bill_sequence_id = p_dest_bill_sequence_id
4042: AND component_sequence_id <> p_dest_comp_seq_id
4043: AND component_item_id = p_comp_item_id
4044: AND operation_seq_num = p_op_seq_num

Line 4071: FROM BOM_COMPONENTS_B bic

4067: ;
4068: ELSE
4069: SELECT 1
4070: INTO l_dummy
4071: FROM BOM_COMPONENTS_B bic
4072: WHERE bill_sequence_id = p_dest_bill_sequence_id
4073: AND component_sequence_id <> p_dest_comp_seq_id
4074: AND component_item_id = p_comp_item_id
4075: AND operation_seq_num = p_op_seq_num

Line 4119: FROM BOM_COMPONENTS_B

4115: BEGIN
4116:
4117: /* SELECT implementation_date
4118: INTO l_impl_date
4119: FROM BOM_COMPONENTS_B
4120: where component_sequence_id = p_src_comp_seq_id;
4121:
4122: IF l_impl_date IS NOT NULL
4123: THEN

Line 4129: DELETE BOM_COMPONENTS_B

4125: RETURN;
4126: END IF;
4127: */
4128: --Commented
4129: DELETE BOM_COMPONENTS_B
4130: WHERE common_component_sequence_id = p_src_comp_seq_id;
4131:
4132: DELETE BOM_SUBSTITUTE_COMPONENTS
4133: WHERE common_component_sequence_id = p_src_comp_seq_id;

Line 4195: FROM bom_components_b bcb

4191: --
4192: CURSOR c_pending_components ( cp_old_component_sequence_id NUMBER
4193: , cp_bill_sequence_id NUMBER ) IS
4194: SELECT *
4195: FROM bom_components_b bcb
4196: WHERE bcb.old_component_sequence_id = cp_old_component_sequence_id
4197: AND bcb.bill_sequence_id = cp_bill_sequence_id
4198: AND bcb.implementation_date IS NULL
4199: -- The following exists clause is to ensure that the pending component is not a source

Line 4213: FROM bom_components_b bcb

4209: -- for the change in the soruce bill
4210: --
4211: CURSOR c_related_components IS
4212: SELECT bcb.component_sequence_id, old_component_sequence_id, bill_sequence_id, effectivity_date
4213: FROM bom_components_b bcb
4214: WHERE bcb.change_notice = p_change_notice
4215: AND bcb.revised_item_sequence_id = p_revised_item_sequence_id
4216: AND bcb.common_component_sequence_id = p_src_comp_seq_id
4217: AND bcb.common_component_sequence_id <> bcb.component_sequence_id

Line 4221: l_component_rec bom_components_b%ROWTYPE;

4217: AND bcb.common_component_sequence_id <> bcb.component_sequence_id
4218: AND bcb.implementation_date IS NULL;
4219:
4220:
4221: l_component_rec bom_components_b%ROWTYPE;
4222: l_dest_new_comp_seq_id NUMBER;
4223: l_old_rev_item_seq_id NUMBER;
4224: l_gen_rev_item_seq_id NUMBER;
4225: l_return_status VARCHAR2(1);

Line 4296: INSERT INTO BOM_COMPONENTS_B

4292: l_component_rec.program_application_id := FND_PROFILE.value('RESP_APPL_ID');
4293: l_component_rec.program_id := FND_PROFILE.value('PROGRAM_ID');
4294: l_component_rec.program_update_date := sysdate;
4295:
4296: INSERT INTO BOM_COMPONENTS_B
4297: ( SUPPLY_SUBINVENTORY
4298: , OPERATION_LEAD_TIME_PERCENT
4299: , REVISED_ITEM_SEQUENCE_ID
4300: , COST_FACTOR

Line 4487: FROM bom_components_b

4483: BEGIN
4484:
4485: SELECT count(*)
4486: INTO l_comp_count
4487: FROM bom_components_b
4488: WHERE bill_sequence_id = p_src_bill_seq_id
4489: AND COMPONENT_ITEM_REVISION_ID IS NOT NULL;
4490:
4491: IF l_comp_count > 0

Line 4498: FROM BOM_COMPONENTS_B

4494: INTO l_rev_count
4495: FROM MTL_ITEM_REVISIONS_B source, MTL_ITEM_REVISIONS_B dest
4496: WHERE source.inventory_item_id = dest.inventory_item_id
4497: AND source.revision_id IN (SELECT COMPONENT_ITEM_REVISION_ID
4498: FROM BOM_COMPONENTS_B
4499: WHERE BILL_SEQUENCE_ID = p_src_bill_seq_id)
4500: AND dest.organization_id = p_org_id
4501: AND source.revision = dest.revision;
4502: