DBA Data[Home] [Help]

APPS.CTO_UPDATE_BOM_RTG_PK dependencies on BOM_OPERATION_SEQUENCES

Line 1002: from bom_operation_sequences

998: +--------------------------------------------------------*/
999:
1000: cursor allops is
1001: select operation_sequence_id, request_id
1002: from bom_operation_sequences
1003: where routing_sequence_id = lCfgRtgId;
1004:
1005: /* ------------------------------------------------------+
1006: cursor added for bugfix 1906371 and 1935580 to select

Line 1012: from bom_operation_sequences

1008: +--------------------------------------------------------*/
1009:
1010: cursor get_op_seq_num (pRtgId number) is
1011: select distinct operation_seq_num,nvl(operation_type,1)
1012: from bom_operation_sequences
1013: --where last_update_login=pRtgId;
1014: where config_routing_id=pRtgId;
1015:
1016:

Line 2555: bom_operation_sequences os1

2551: from
2552: bom_cto_order_lines_upg bcol1,
2553: mtl_system_items si1,
2554: bom_operational_routings or1,
2555: bom_operation_sequences os1
2556: where bcol1.line_id = pLineId
2557: and bcol1.inventory_item_id = pModelId
2558: and si1.organization_id = pOrgId -- this is the mfg org from src_orgs
2559: and si1.inventory_item_id = bcol1.inventory_item_id

Line 2591: bom_operation_sequences os1

2587: mtl_system_items msi,
2588: bom_inventory_components ic1,
2589: bom_bill_of_materials b1,
2590: bom_operational_routings or1,
2591: bom_operation_sequences os1
2592: where bcol1.parent_ato_line_id = pLineId /*AP*/
2593: and bcol1.item_type_code in ('CLASS','OPTION') /* OC and Option items */
2594: and bcol1.line_id <> bcol2.line_id
2595: and bcol2.inventory_item_id = msi.inventory_item_id

Line 2650: bom_operation_sequences os1,

2646: nvl(os1.operation_type,1),
2647: os1.routing_sequence_id,
2648: l_batch_id
2649: from
2650: bom_operation_sequences os1,
2651: bom_operational_routings or1,
2652: mtl_system_items si2,
2653: bom_inventory_components ic1,
2654: bom_bill_of_materials b1,

Line 2689: Update bom_operation_sequences

2685:
2686: -- Fixed by Renga Kannan on 05/23/06
2687: -- Fixed bug 5228179
2688: -- Start updating config_routing_id for performance reasons
2689: Update bom_operation_sequences
2690: set config_routing_id = lCfgRtgId,
2691: last_update_date = glast_update_date
2692: Where (
2693: operation_seq_num,

Line 2764: from bom_operation_sequences

2760: WriteToLog('Op Seq # : ' || lmodseqnum || ' Op Type : ' || lmodtyp ,4);
2761: WriteToLog('Estimated release date lEstRelDate '|| to_char(lEstRelDate,'mm-dd-yy:hh:mi:ss'), 4);
2762:
2763: select max(routing_sequence_id) into lmodrtgseqid
2764: from bom_operation_sequences
2765: where operation_seq_num = lmodseqnum
2766: and nvl(operation_type,1)= lmodtyp
2767: --and last_update_login=lCfgRtgId
2768: and config_routing_id = lCfgRtgId

Line 2773: update bom_operation_sequences

2769: and last_update_date = glast_update_date;
2770:
2771: WriteToLog('Max. Routing Seq Id : ' || lmodrtgseqid, 4);
2772:
2773: update bom_operation_sequences
2774: --set last_update_login=lmodnewCfgRtgId
2775: set config_routing_id=lmodnewCfgRtgId
2776: where operation_seq_num = lmodseqnum
2777: and nvl(operation_type,1)= lmodtyp

Line 2803: WriteToLog('Inserting into bom_operation_sequences - 1st insert ..',5);

2799: +-------------------------------------------------------------------*/
2800:
2801: lStmtNum := 60;
2802:
2803: WriteToLog('Inserting into bom_operation_sequences - 1st insert ..',5);
2804:
2805: if( tDistinctRtgSeq.count > 0 ) then
2806: FORALL i IN tDistinctRtgSeq.FIRST..tDistinctRtgSeq.LAST
2807: insert into bom_operation_sequences

Line 2807: insert into bom_operation_sequences

2803: WriteToLog('Inserting into bom_operation_sequences - 1st insert ..',5);
2804:
2805: if( tDistinctRtgSeq.count > 0 ) then
2806: FORALL i IN tDistinctRtgSeq.FIRST..tDistinctRtgSeq.LAST
2807: insert into bom_operation_sequences
2808: (
2809: operation_sequence_id,
2810: routing_sequence_id,
2811: operation_seq_num,

Line 2866: bom_operation_sequences_s.nextval, /* operation_sequence_id */

2862: x_coordinate, --bugfix 1765149
2863: y_coordinate --bugfix 1765149
2864: )
2865: select
2866: bom_operation_sequences_s.nextval, /* operation_sequence_id */
2867: lcfgrtgid, /* routing_sequence_id */
2868: os1.operation_seq_num,
2869: sysdate, /* last update date */
2870: gUserId, /* last updated by */

Line 2922: bom_operation_sequences os1

2918: trunc(sysdate), -- new column for 11.5.4 BOM patchset
2919: os1.x_coordinate, --bugfix 1765149
2920: os1.y_coordinate --bugfix 1765149
2921: from
2922: bom_operation_sequences os1
2923: --where os1.last_update_login = lmodnewcfgrtgid
2924: where os1.config_routing_id = lmodnewcfgrtgid
2925: and os1.routing_sequence_id = tDistinctRtgSeq(i);
2926:

Line 2940: update bom_operation_sequences

2936: to identify steps from option class routings
2937: +---------------------------------------------------------------*/
2938:
2939: lStmtNum := 70;
2940: update bom_operation_sequences
2941: --set last_update_login = - 1
2942: set config_routing_id = - 1
2943: --where last_update_login in (lCfgRtgId, lmodnewcfgrtgid);
2944: where config_routing_id in (lCfgRtgId, lmodnewcfgrtgid);

Line 2961: update bom_operation_sequences

2957: table bom_component_operations to support one-to-many BOM components
2958: to Routing steps.
2959: +-------------------------------------------------------------*/
2960: lStmtNum := 80;
2961: update bom_operation_sequences
2962: --set last_update_login = lCfgRtgId
2963: set config_routing_id = lCfgRtgId
2964: ,last_update_date = glast_update_date -- 3180827
2965: where (

Line 2979: bom_operation_sequences os1

2975: from
2976: mtl_system_items si1,
2977: bom_cto_order_lines_upg bcol,
2978: bom_operational_routings or1,
2979: bom_operation_sequences os1
2980: where bcol.parent_ato_line_id = pLineId
2981: and si1.organization_id = pOrgId
2982: and si1.inventory_item_id = bcol.inventory_item_id
2983: and si1.bom_item_type in ( 1, 2 ) /* Models and Classes */

Line 3011: bom_operation_sequences os1

3007: bom_cto_order_lines_upg bcol2, /* parents model */
3008: bom_inventory_components ic1,
3009: bom_bill_of_materials b1,
3010: bom_operational_routings or1,
3011: bom_operation_sequences os1
3012: where bcol1.parent_ato_line_id = pLineId
3013: and bcol1.item_type_code in ('CLASS','OPTION')
3014: and bcol2.parent_ato_line_id = pLineId
3015: and bcol2.line_id <> pLineId /*AP*/

Line 3067: bom_operation_sequences os1,

3063: os1.operation_seq_num,
3064: nvl(os1.operation_type,1),
3065: os1.routing_sequence_id
3066: from
3067: bom_operation_sequences os1,
3068: bom_operational_routings or1,
3069: mtl_system_items si2,
3070: bom_inventory_components ic1,
3071: bom_bill_of_materials b1,

Line 3175: from bom_operation_sequences

3171:
3172: WriteToLog('Op Seq # : ' || lopseqnum || ' Op Type : ' || loptyp , 4);
3173:
3174: select max(routing_sequence_id) into lrtgseqid
3175: from bom_operation_sequences
3176: where operation_seq_num = lopseqnum
3177: and nvl(operation_type,1)= loptyp
3178: --and last_update_login=lCfgRtgId
3179: and config_routing_id=lCfgRtgId

Line 3184: update bom_operation_sequences

3180: and last_update_date = glast_update_date;
3181:
3182: WriteToLog('Max. Routing Seq Id : ' || lrtgseqid, 4);
3183:
3184: update bom_operation_sequences
3185: --set last_update_login=lnewCfgRtgId
3186: set config_routing_id=lnewCfgRtgId
3187: where operation_seq_num = lopseqnum
3188: and nvl(operation_type,1)= loptyp

Line 3218: WriteToLog('Inserting into bom_operation_sequences - 2nd insert ..',5);

3214: +-------------------------------------------------------------------*/
3215:
3216: lStmtNum := 90;
3217:
3218: WriteToLog('Inserting into bom_operation_sequences - 2nd insert ..',5);
3219:
3220: if( tDistinctRtgSeq.count > 0 ) then -- 3093686
3221: FORALL i IN tDistinctRtgSeq.FIRST..tDistinctRtgSeq.LAST -- 3093686
3222: insert into bom_operation_sequences

Line 3222: insert into bom_operation_sequences

3218: WriteToLog('Inserting into bom_operation_sequences - 2nd insert ..',5);
3219:
3220: if( tDistinctRtgSeq.count > 0 ) then -- 3093686
3221: FORALL i IN tDistinctRtgSeq.FIRST..tDistinctRtgSeq.LAST -- 3093686
3222: insert into bom_operation_sequences
3223: (
3224: operation_sequence_id,
3225: routing_sequence_id,
3226: operation_seq_num,

Line 3281: bom_operation_sequences_s.nextval, /* operation_sequence_id */

3277: x_coordinate, --bugfix 1765149
3278: y_coordinate --bugfix 1765149
3279: )
3280: select
3281: bom_operation_sequences_s.nextval, /* operation_sequence_id */
3282: lcfgrtgid, /* routing_sequence_id */
3283: os1.operation_seq_num,
3284: sysdate, /* last update date */
3285: gUserId, /* last updated by */

Line 3337: bom_operation_sequences os1

3333: trunc(sysdate), -- new column for 11.5.4 BOM patchset
3334: os1.x_coordinate, --bugfix 1765149
3335: os1.y_coordinate --bugfix 1765149
3336: from
3337: bom_operation_sequences os1
3338: --where os1.last_update_login = lnewCfgRtgId /*Bugfix 1906371 - change lCfgRtgId to lnewCfgRtgId */
3339: where os1.config_routing_id = lnewCfgRtgId /*Bugfix 1906371 - change lCfgRtgId to lnewCfgRtgId */
3340: and os1.operation_seq_num not in (
3341: select operation_seq_num

Line 3342: from bom_operation_sequences bos1

3338: --where os1.last_update_login = lnewCfgRtgId /*Bugfix 1906371 - change lCfgRtgId to lnewCfgRtgId */
3339: where os1.config_routing_id = lnewCfgRtgId /*Bugfix 1906371 - change lCfgRtgId to lnewCfgRtgId */
3340: and os1.operation_seq_num not in (
3341: select operation_seq_num
3342: from bom_operation_sequences bos1
3343: where bos1.routing_sequence_id = lCfgRtgId
3344: /* Bugfix 1983384 where bos1.last_update_login = lnewCfgRtgId */
3345: and nvl(bos1.operation_type,1) = nvl(os1.operation_type,1))
3346: and os1.routing_sequence_id = tDistinctRtgSeq(i); -- 3093686

Line 3356: update bom_operation_sequences

3352: tDistinctRtgSeq.DELETE;
3353:
3354: -- New update of 3180827
3355: lStmtNum := 95;
3356: update bom_operation_sequences
3357: --set last_update_login = - 1
3358: set config_routing_id = - 1
3359: --where last_update_login in (lCfgRtgId, lmodnewcfgrtgid);
3360: where config_routing_id in (lCfgRtgId, lmodnewcfgrtgid);

Line 3369: xTableName := 'BOM_OPERATION_SEQUENCES';

3365: Old operation_sequence_ids are available in request_id
3366: +-------------------------------------------------------------------*/
3367:
3368: lStmtNum := 100;
3369: xTableName := 'BOM_OPERATION_SEQUENCES';
3370: -- bug 7425806: Events from option class routing operations also need to
3371: -- be linked to operations on config routing.
3372: /***********************************************************************
3373: update bom_operation_sequences bos1

Line 3373: update bom_operation_sequences bos1

3369: xTableName := 'BOM_OPERATION_SEQUENCES';
3370: -- bug 7425806: Events from option class routing operations also need to
3371: -- be linked to operations on config routing.
3372: /***********************************************************************
3373: update bom_operation_sequences bos1
3374: set process_op_seq_id = (
3375: select operation_sequence_id
3376: from bom_operation_sequences bos2
3377: where bos1.process_op_seq_id = bos2.request_id

Line 3376: from bom_operation_sequences bos2

3372: /***********************************************************************
3373: update bom_operation_sequences bos1
3374: set process_op_seq_id = (
3375: select operation_sequence_id
3376: from bom_operation_sequences bos2
3377: where bos1.process_op_seq_id = bos2.request_id
3378: and bos2.routing_sequence_id = lCfgRtgId)
3379: where bos1.operation_type = 1
3380: and bos1.routing_sequence_id = lCfgRtgId;

Line 3383: update bom_operation_sequences bos1

3379: where bos1.operation_type = 1
3380: and bos1.routing_sequence_id = lCfgRtgId;
3381:
3382: lStmtNum := 110;
3383: update bom_operation_sequences bos1
3384: set line_op_seq_id = (
3385: select operation_sequence_id
3386: from bom_operation_sequences bos2
3387: where bos1.line_op_seq_id = bos2.request_id

Line 3386: from bom_operation_sequences bos2

3382: lStmtNum := 110;
3383: update bom_operation_sequences bos1
3384: set line_op_seq_id = (
3385: select operation_sequence_id
3386: from bom_operation_sequences bos2
3387: where bos1.line_op_seq_id = bos2.request_id
3388: and bos2.routing_sequence_id = lCfgRtgId)
3389: where bos1.operation_type = 1
3390: and bos1.routing_sequence_id = lCfgRtgId;

Line 3393: update bom_operation_sequences bos1

3389: where bos1.operation_type = 1
3390: and bos1.routing_sequence_id = lCfgRtgId;
3391: ***************************************************************************/
3392:
3393: update bom_operation_sequences bos1
3394: set line_op_seq_id = (
3395: select bos2.operation_sequence_id
3396: from bom_operation_sequences bos2,
3397: bom_operation_sequences bos3

Line 3396: from bom_operation_sequences bos2,

3392:
3393: update bom_operation_sequences bos1
3394: set line_op_seq_id = (
3395: select bos2.operation_sequence_id
3396: from bom_operation_sequences bos2,
3397: bom_operation_sequences bos3
3398: where bos3.operation_sequence_id = bos1.line_op_seq_id
3399: and bos2.routing_sequence_id = lCfgRtgId
3400: and bos3.operation_seq_num = bos2.operation_seq_num

Line 3397: bom_operation_sequences bos3

3393: update bom_operation_sequences bos1
3394: set line_op_seq_id = (
3395: select bos2.operation_sequence_id
3396: from bom_operation_sequences bos2,
3397: bom_operation_sequences bos3
3398: where bos3.operation_sequence_id = bos1.line_op_seq_id
3399: and bos2.routing_sequence_id = lCfgRtgId
3400: and bos3.operation_seq_num = bos2.operation_seq_num
3401: and bos2.operation_type = 3)

Line 3406: update bom_operation_sequences bos1

3402: where bos1.operation_type = 1
3403: and bos1.routing_sequence_id = lCfgRtgId;
3404:
3405: lStmtNum := 110;
3406: update bom_operation_sequences bos1
3407: set process_op_seq_id = (
3408: select bos2.operation_sequence_id
3409: from bom_operation_sequences bos2,
3410: bom_operation_sequences bos3

Line 3409: from bom_operation_sequences bos2,

3405: lStmtNum := 110;
3406: update bom_operation_sequences bos1
3407: set process_op_seq_id = (
3408: select bos2.operation_sequence_id
3409: from bom_operation_sequences bos2,
3410: bom_operation_sequences bos3
3411: where bos3.operation_sequence_id = bos1.process_op_seq_id
3412: and bos2.routing_sequence_id = lCfgRtgId
3413: and bos3.operation_seq_num = bos2.operation_seq_num

Line 3410: bom_operation_sequences bos3

3406: update bom_operation_sequences bos1
3407: set process_op_seq_id = (
3408: select bos2.operation_sequence_id
3409: from bom_operation_sequences bos2,
3410: bom_operation_sequences bos3
3411: where bos3.operation_sequence_id = bos1.process_op_seq_id
3412: and bos2.routing_sequence_id = lCfgRtgId
3413: and bos3.operation_seq_num = bos2.operation_seq_num
3414: and bos2.operation_type = 2)

Line 3431: from bom_operation_sequences )

3427:
3428: delete from BOM_OPERATIONAL_ROUTINGS b1
3429: where b1.routing_sequence_id not in
3430: (select routing_sequence_id
3431: from bom_operation_sequences )
3432: and b1.routing_sequence_id = lCfgRtgId;
3433:
3434: if sql%rowcount > 0 then
3435: WriteToLog( 'No operations were copied, config routing deleted. ', 2);

Line 3454: bom_operation_sequences bos,

3450: set ci.operation_seq_num = 1
3451: where not exists
3452: (select 'op seq exists in config routing'
3453: from
3454: bom_operation_sequences bos,
3455: bom_operational_routings bor
3456: where bos.operation_seq_num = ci.operation_seq_num
3457: and bos.routing_sequence_id = bor.routing_sequence_id
3458: and bor.assembly_item_id = pConfigId

Line 3506: X_from_entity_name =>'BOM_OPERATION_SEQUENCES',

3502:
3503: lstmtNum := 400;
3504:
3505: FND_ATTACHED_DOCUMENTS2_PKG.copy_attachments(
3506: X_from_entity_name =>'BOM_OPERATION_SEQUENCES',
3507: X_from_pk1_value =>nextop.request_id,
3508: X_from_pk2_value =>'',
3509: X_from_pk3_value =>'',
3510: X_from_pk4_value =>'',

Line 3512: X_to_entity_name =>'BOM_OPERATION_SEQUENCES',

3508: X_from_pk2_value =>'',
3509: X_from_pk3_value =>'',
3510: X_from_pk4_value =>'',
3511: X_from_pk5_value =>'',
3512: X_to_entity_name =>'BOM_OPERATION_SEQUENCES',
3513: X_to_pk1_value =>nextop.operation_sequence_id,
3514: X_to_pk2_value =>'',
3515: X_to_pk3_value =>'',
3516: X_to_pk4_value =>'',

Line 3616: from bom_operation_sequences

3612: and alternate_routing_designator is null
3613: and organization_id = pOrgId
3614: and serialization_start_op in
3615: (Select OPERATION_SEQ_NUM
3616: from bom_operation_sequences
3617: where routing_sequence_id = lCfgRtgId
3618: );
3619: EXCEPTION
3620: WHEN no_data_found THEN

Line 3646: from bom_operation_sequences

3642: and bill_sequence_id = lConfigBillId
3643: )
3644: and serialization_start_op in
3645: (Select OPERATION_SEQ_NUM
3646: from bom_operation_sequences
3647: where routing_sequence_id = lCfgRtgId
3648: )--serial start op exists as a operation in routing(ie effective oper)
3649: )
3650: where assembly_item_id = pConfigId

Line 5519: bom_operation_sequences osi,

5515: bor.substitute_group_num,
5516: bor.setup_id, /* Bugfix2950774 */
5517: bor.principle_flag
5518: from
5519: bom_operation_sequences osi,
5520: bom_operation_resources bor,
5521: bom_cto_order_lines_upg bcolu,
5522: bom_operational_routings bor1
5523: where bcolu.sequence = p_seq

Line 5637: bom_operation_sequences osi,

5633: NULL, /*program_application_id*/
5634: NULL, /*program_id*/
5635: NULL /*program_update_date*/
5636: from
5637: bom_operation_sequences osi,
5638: bom_sub_operation_resources bsor,
5639: bom_cto_order_lines_upg bcolu,
5640: bom_operational_routings bor
5641: where bcolu.sequence = p_seq

Line 5723: bom_operation_sequences bos1, /* 'from' Ops of model */

5719: bon.ATTRIBUTE13,
5720: bon.ATTRIBUTE14,
5721: bon.ATTRIBUTE15
5722: FROM bom_operation_networks bon,
5723: bom_operation_sequences bos1, /* 'from' Ops of model */
5724: bom_operation_sequences bos2, /* 'to' Ops of model */
5725: bom_operation_sequences bos3, /* 'from' Ops of config */
5726: bom_operation_sequences bos4, /* 'to' Ops of config */
5727: bom_operational_routings brif,

Line 5724: bom_operation_sequences bos2, /* 'to' Ops of model */

5720: bon.ATTRIBUTE14,
5721: bon.ATTRIBUTE15
5722: FROM bom_operation_networks bon,
5723: bom_operation_sequences bos1, /* 'from' Ops of model */
5724: bom_operation_sequences bos2, /* 'to' Ops of model */
5725: bom_operation_sequences bos3, /* 'from' Ops of config */
5726: bom_operation_sequences bos4, /* 'to' Ops of config */
5727: bom_operational_routings brif,
5728: bom_cto_order_lines_upg bcolu

Line 5725: bom_operation_sequences bos3, /* 'from' Ops of config */

5721: bon.ATTRIBUTE15
5722: FROM bom_operation_networks bon,
5723: bom_operation_sequences bos1, /* 'from' Ops of model */
5724: bom_operation_sequences bos2, /* 'to' Ops of model */
5725: bom_operation_sequences bos3, /* 'from' Ops of config */
5726: bom_operation_sequences bos4, /* 'to' Ops of config */
5727: bom_operational_routings brif,
5728: bom_cto_order_lines_upg bcolu
5729: WHERE bon.from_op_seq_id = bos1.operation_sequence_id

Line 5726: bom_operation_sequences bos4, /* 'to' Ops of config */

5722: FROM bom_operation_networks bon,
5723: bom_operation_sequences bos1, /* 'from' Ops of model */
5724: bom_operation_sequences bos2, /* 'to' Ops of model */
5725: bom_operation_sequences bos3, /* 'from' Ops of config */
5726: bom_operation_sequences bos4, /* 'to' Ops of config */
5727: bom_operational_routings brif,
5728: bom_cto_order_lines_upg bcolu
5729: WHERE bon.from_op_seq_id = bos1.operation_sequence_id
5730: AND bon.to_op_seq_id = bos2.operation_sequence_id