DBA Data[Home] [Help]

APPS.CTO_UPDATE_BOM_RTG_PK dependencies on BOM_OPERATION_SEQUENCES

Line 945: from bom_operation_sequences

941: +--------------------------------------------------------*/
942:
943: cursor allops is
944: select operation_sequence_id, request_id
945: from bom_operation_sequences
946: where routing_sequence_id = lCfgRtgId;
947:
948: /* ------------------------------------------------------+
949: cursor added for bugfix 1906371 and 1935580 to select

Line 955: from bom_operation_sequences

951: +--------------------------------------------------------*/
952:
953: cursor get_op_seq_num (pRtgId number) is
954: select distinct operation_seq_num,nvl(operation_type,1)
955: from bom_operation_sequences
956: --where last_update_login=pRtgId;
957: where config_routing_id=pRtgId;
958:
959:

Line 2466: bom_operation_sequences os1

2462: from
2463: bom_cto_order_lines_upg bcol1,
2464: mtl_system_items si1,
2465: bom_operational_routings or1,
2466: bom_operation_sequences os1
2467: where bcol1.line_id = pLineId
2468: and bcol1.inventory_item_id = pModelId
2469: and si1.organization_id = pOrgId -- this is the mfg org from src_orgs
2470: and si1.inventory_item_id = bcol1.inventory_item_id

Line 2502: bom_operation_sequences os1

2498: mtl_system_items msi,
2499: bom_inventory_components ic1,
2500: bom_bill_of_materials b1,
2501: bom_operational_routings or1,
2502: bom_operation_sequences os1
2503: where bcol1.parent_ato_line_id = pLineId /*AP*/
2504: and bcol1.item_type_code in ('CLASS','OPTION') /* OC and Option items */
2505: and bcol1.line_id <> bcol2.line_id
2506: and bcol2.inventory_item_id = msi.inventory_item_id

Line 2561: bom_operation_sequences os1,

2557: nvl(os1.operation_type,1),
2558: os1.routing_sequence_id,
2559: l_batch_id
2560: from
2561: bom_operation_sequences os1,
2562: bom_operational_routings or1,
2563: mtl_system_items si2,
2564: bom_inventory_components ic1,
2565: bom_bill_of_materials b1,

Line 2600: Update bom_operation_sequences

2596:
2597: -- Fixed by Renga Kannan on 05/23/06
2598: -- Fixed bug 5228179
2599: -- Start updating config_routing_id for performance reasons
2600: Update bom_operation_sequences
2601: set config_routing_id = lCfgRtgId,
2602: last_update_date = glast_update_date
2603: Where (
2604: operation_seq_num,

Line 2675: from bom_operation_sequences

2671: WriteToLog('Op Seq # : ' || lmodseqnum || ' Op Type : ' || lmodtyp ,4);
2672: WriteToLog('Estimated release date lEstRelDate '|| to_char(lEstRelDate,'mm-dd-yy:hh:mi:ss'), 4);
2673:
2674: select max(routing_sequence_id) into lmodrtgseqid
2675: from bom_operation_sequences
2676: where operation_seq_num = lmodseqnum
2677: and nvl(operation_type,1)= lmodtyp
2678: --and last_update_login=lCfgRtgId
2679: and config_routing_id = lCfgRtgId

Line 2684: update bom_operation_sequences

2680: and last_update_date = glast_update_date;
2681:
2682: WriteToLog('Max. Routing Seq Id : ' || lmodrtgseqid, 4);
2683:
2684: update bom_operation_sequences
2685: --set last_update_login=lmodnewCfgRtgId
2686: set config_routing_id=lmodnewCfgRtgId
2687: where operation_seq_num = lmodseqnum
2688: and nvl(operation_type,1)= lmodtyp

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

2710: +-------------------------------------------------------------------*/
2711:
2712: lStmtNum := 60;
2713:
2714: WriteToLog('Inserting into bom_operation_sequences - 1st insert ..',5);
2715:
2716: if( tDistinctRtgSeq.count > 0 ) then
2717: FORALL i IN tDistinctRtgSeq.FIRST..tDistinctRtgSeq.LAST
2718: insert into bom_operation_sequences

Line 2718: insert into bom_operation_sequences

2714: WriteToLog('Inserting into bom_operation_sequences - 1st insert ..',5);
2715:
2716: if( tDistinctRtgSeq.count > 0 ) then
2717: FORALL i IN tDistinctRtgSeq.FIRST..tDistinctRtgSeq.LAST
2718: insert into bom_operation_sequences
2719: (
2720: operation_sequence_id,
2721: routing_sequence_id,
2722: operation_seq_num,

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

2773: x_coordinate, --bugfix 1765149
2774: y_coordinate --bugfix 1765149
2775: )
2776: select
2777: bom_operation_sequences_s.nextval, /* operation_sequence_id */
2778: lcfgrtgid, /* routing_sequence_id */
2779: os1.operation_seq_num,
2780: sysdate, /* last update date */
2781: gUserId, /* last updated by */

Line 2833: bom_operation_sequences os1

2829: trunc(sysdate), -- new column for 11.5.4 BOM patchset
2830: os1.x_coordinate, --bugfix 1765149
2831: os1.y_coordinate --bugfix 1765149
2832: from
2833: bom_operation_sequences os1
2834: --where os1.last_update_login = lmodnewcfgrtgid
2835: where os1.config_routing_id = lmodnewcfgrtgid
2836: and os1.routing_sequence_id = tDistinctRtgSeq(i);
2837:

Line 2851: update bom_operation_sequences

2847: to identify steps from option class routings
2848: +---------------------------------------------------------------*/
2849:
2850: lStmtNum := 70;
2851: update bom_operation_sequences
2852: --set last_update_login = - 1
2853: set config_routing_id = - 1
2854: --where last_update_login in (lCfgRtgId, lmodnewcfgrtgid);
2855: where config_routing_id in (lCfgRtgId, lmodnewcfgrtgid);

Line 2872: update bom_operation_sequences

2868: table bom_component_operations to support one-to-many BOM components
2869: to Routing steps.
2870: +-------------------------------------------------------------*/
2871: lStmtNum := 80;
2872: update bom_operation_sequences
2873: --set last_update_login = lCfgRtgId
2874: set config_routing_id = lCfgRtgId
2875: ,last_update_date = glast_update_date -- 3180827
2876: where (

Line 2890: bom_operation_sequences os1

2886: from
2887: mtl_system_items si1,
2888: bom_cto_order_lines_upg bcol,
2889: bom_operational_routings or1,
2890: bom_operation_sequences os1
2891: where bcol.parent_ato_line_id = pLineId
2892: and si1.organization_id = pOrgId
2893: and si1.inventory_item_id = bcol.inventory_item_id
2894: and si1.bom_item_type in ( 1, 2 ) /* Models and Classes */

Line 2922: bom_operation_sequences os1

2918: bom_cto_order_lines_upg bcol2, /* parents model */
2919: bom_inventory_components ic1,
2920: bom_bill_of_materials b1,
2921: bom_operational_routings or1,
2922: bom_operation_sequences os1
2923: where bcol1.parent_ato_line_id = pLineId
2924: and bcol1.item_type_code in ('CLASS','OPTION')
2925: and bcol2.parent_ato_line_id = pLineId
2926: and bcol2.line_id <> pLineId /*AP*/

Line 2978: bom_operation_sequences os1,

2974: os1.operation_seq_num,
2975: nvl(os1.operation_type,1),
2976: os1.routing_sequence_id
2977: from
2978: bom_operation_sequences os1,
2979: bom_operational_routings or1,
2980: mtl_system_items si2,
2981: bom_inventory_components ic1,
2982: bom_bill_of_materials b1,

Line 3086: from bom_operation_sequences

3082:
3083: WriteToLog('Op Seq # : ' || lopseqnum || ' Op Type : ' || loptyp , 4);
3084:
3085: select max(routing_sequence_id) into lrtgseqid
3086: from bom_operation_sequences
3087: where operation_seq_num = lopseqnum
3088: and nvl(operation_type,1)= loptyp
3089: --and last_update_login=lCfgRtgId
3090: and config_routing_id=lCfgRtgId

Line 3095: update bom_operation_sequences

3091: and last_update_date = glast_update_date;
3092:
3093: WriteToLog('Max. Routing Seq Id : ' || lrtgseqid, 4);
3094:
3095: update bom_operation_sequences
3096: --set last_update_login=lnewCfgRtgId
3097: set config_routing_id=lnewCfgRtgId
3098: where operation_seq_num = lopseqnum
3099: and nvl(operation_type,1)= loptyp

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

3125: +-------------------------------------------------------------------*/
3126:
3127: lStmtNum := 90;
3128:
3129: WriteToLog('Inserting into bom_operation_sequences - 2nd insert ..',5);
3130:
3131: if( tDistinctRtgSeq.count > 0 ) then -- 3093686
3132: FORALL i IN tDistinctRtgSeq.FIRST..tDistinctRtgSeq.LAST -- 3093686
3133: insert into bom_operation_sequences

Line 3133: insert into bom_operation_sequences

3129: WriteToLog('Inserting into bom_operation_sequences - 2nd insert ..',5);
3130:
3131: if( tDistinctRtgSeq.count > 0 ) then -- 3093686
3132: FORALL i IN tDistinctRtgSeq.FIRST..tDistinctRtgSeq.LAST -- 3093686
3133: insert into bom_operation_sequences
3134: (
3135: operation_sequence_id,
3136: routing_sequence_id,
3137: operation_seq_num,

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

3188: x_coordinate, --bugfix 1765149
3189: y_coordinate --bugfix 1765149
3190: )
3191: select
3192: bom_operation_sequences_s.nextval, /* operation_sequence_id */
3193: lcfgrtgid, /* routing_sequence_id */
3194: os1.operation_seq_num,
3195: sysdate, /* last update date */
3196: gUserId, /* last updated by */

Line 3248: bom_operation_sequences os1

3244: trunc(sysdate), -- new column for 11.5.4 BOM patchset
3245: os1.x_coordinate, --bugfix 1765149
3246: os1.y_coordinate --bugfix 1765149
3247: from
3248: bom_operation_sequences os1
3249: --where os1.last_update_login = lnewCfgRtgId /*Bugfix 1906371 - change lCfgRtgId to lnewCfgRtgId */
3250: where os1.config_routing_id = lnewCfgRtgId /*Bugfix 1906371 - change lCfgRtgId to lnewCfgRtgId */
3251: and os1.operation_seq_num not in (
3252: select operation_seq_num

Line 3253: from bom_operation_sequences bos1

3249: --where os1.last_update_login = lnewCfgRtgId /*Bugfix 1906371 - change lCfgRtgId to lnewCfgRtgId */
3250: where os1.config_routing_id = lnewCfgRtgId /*Bugfix 1906371 - change lCfgRtgId to lnewCfgRtgId */
3251: and os1.operation_seq_num not in (
3252: select operation_seq_num
3253: from bom_operation_sequences bos1
3254: where bos1.routing_sequence_id = lCfgRtgId
3255: /* Bugfix 1983384 where bos1.last_update_login = lnewCfgRtgId */
3256: and nvl(bos1.operation_type,1) = nvl(os1.operation_type,1))
3257: and os1.routing_sequence_id = tDistinctRtgSeq(i); -- 3093686

Line 3267: update bom_operation_sequences

3263: tDistinctRtgSeq.DELETE;
3264:
3265: -- New update of 3180827
3266: lStmtNum := 95;
3267: update bom_operation_sequences
3268: --set last_update_login = - 1
3269: set config_routing_id = - 1
3270: --where last_update_login in (lCfgRtgId, lmodnewcfgrtgid);
3271: where config_routing_id in (lCfgRtgId, lmodnewcfgrtgid);

Line 3280: xTableName := 'BOM_OPERATION_SEQUENCES';

3276: Old operation_sequence_ids are available in request_id
3277: +-------------------------------------------------------------------*/
3278:
3279: lStmtNum := 100;
3280: xTableName := 'BOM_OPERATION_SEQUENCES';
3281: update bom_operation_sequences bos1
3282: set process_op_seq_id = (
3283: select operation_sequence_id
3284: from bom_operation_sequences bos2

Line 3281: update bom_operation_sequences bos1

3277: +-------------------------------------------------------------------*/
3278:
3279: lStmtNum := 100;
3280: xTableName := 'BOM_OPERATION_SEQUENCES';
3281: update bom_operation_sequences bos1
3282: set process_op_seq_id = (
3283: select operation_sequence_id
3284: from bom_operation_sequences bos2
3285: where bos1.process_op_seq_id = bos2.request_id

Line 3284: from bom_operation_sequences bos2

3280: xTableName := 'BOM_OPERATION_SEQUENCES';
3281: update bom_operation_sequences bos1
3282: set process_op_seq_id = (
3283: select operation_sequence_id
3284: from bom_operation_sequences bos2
3285: where bos1.process_op_seq_id = bos2.request_id
3286: and bos2.routing_sequence_id = lCfgRtgId)
3287: where bos1.operation_type = 1
3288: and bos1.routing_sequence_id = lCfgRtgId;

Line 3291: update bom_operation_sequences bos1

3287: where bos1.operation_type = 1
3288: and bos1.routing_sequence_id = lCfgRtgId;
3289:
3290: lStmtNum := 110;
3291: update bom_operation_sequences bos1
3292: set line_op_seq_id = (
3293: select operation_sequence_id
3294: from bom_operation_sequences bos2
3295: where bos1.line_op_seq_id = bos2.request_id

Line 3294: from bom_operation_sequences bos2

3290: lStmtNum := 110;
3291: update bom_operation_sequences bos1
3292: set line_op_seq_id = (
3293: select operation_sequence_id
3294: from bom_operation_sequences bos2
3295: where bos1.line_op_seq_id = bos2.request_id
3296: and bos2.routing_sequence_id = lCfgRtgId)
3297: where bos1.operation_type = 1
3298: and bos1.routing_sequence_id = lCfgRtgId;

Line 3311: from bom_operation_sequences )

3307:
3308: delete from BOM_OPERATIONAL_ROUTINGS b1
3309: where b1.routing_sequence_id not in
3310: (select routing_sequence_id
3311: from bom_operation_sequences )
3312: and b1.routing_sequence_id = lCfgRtgId;
3313:
3314: if sql%rowcount > 0 then
3315: WriteToLog( 'No operations were copied, config routing deleted. ', 2);

Line 3334: bom_operation_sequences bos,

3330: set ci.operation_seq_num = 1
3331: where not exists
3332: (select 'op seq exists in config routing'
3333: from
3334: bom_operation_sequences bos,
3335: bom_operational_routings bor
3336: where bos.operation_seq_num = ci.operation_seq_num
3337: and bos.routing_sequence_id = bor.routing_sequence_id
3338: and bor.assembly_item_id = pConfigId

Line 3356: X_from_entity_name =>'BOM_OPERATION_SEQUENCES',

3352:
3353: lstmtNum := 400;
3354:
3355: FND_ATTACHED_DOCUMENTS2_PKG.copy_attachments(
3356: X_from_entity_name =>'BOM_OPERATION_SEQUENCES',
3357: X_from_pk1_value =>nextop.request_id,
3358: X_from_pk2_value =>'',
3359: X_from_pk3_value =>'',
3360: X_from_pk4_value =>'',

Line 3362: X_to_entity_name =>'BOM_OPERATION_SEQUENCES',

3358: X_from_pk2_value =>'',
3359: X_from_pk3_value =>'',
3360: X_from_pk4_value =>'',
3361: X_from_pk5_value =>'',
3362: X_to_entity_name =>'BOM_OPERATION_SEQUENCES',
3363: X_to_pk1_value =>nextop.operation_sequence_id,
3364: X_to_pk2_value =>'',
3365: X_to_pk3_value =>'',
3366: X_to_pk4_value =>'',

Line 3466: from bom_operation_sequences

3462: and alternate_routing_designator is null
3463: and organization_id = pOrgId
3464: and serialization_start_op in
3465: (Select OPERATION_SEQ_NUM
3466: from bom_operation_sequences
3467: where routing_sequence_id = lCfgRtgId
3468: );
3469: EXCEPTION
3470: WHEN no_data_found THEN

Line 3496: from bom_operation_sequences

3492: and bill_sequence_id = lConfigBillId
3493: )
3494: and serialization_start_op in
3495: (Select OPERATION_SEQ_NUM
3496: from bom_operation_sequences
3497: where routing_sequence_id = lCfgRtgId
3498: )--serial start op exists as a operation in routing(ie effective oper)
3499: )
3500: where assembly_item_id = pConfigId

Line 5310: bom_operation_sequences osi,

5306: bor.substitute_group_num,
5307: bor.setup_id, /* Bugfix2950774 */
5308: bor.principle_flag
5309: from
5310: bom_operation_sequences osi,
5311: bom_operation_resources bor,
5312: bom_cto_order_lines_upg bcolu,
5313: bom_operational_routings bor1
5314: where bcolu.sequence = p_seq

Line 5428: bom_operation_sequences osi,

5424: NULL, /*program_application_id*/
5425: NULL, /*program_id*/
5426: NULL /*program_update_date*/
5427: from
5428: bom_operation_sequences osi,
5429: bom_sub_operation_resources bsor,
5430: bom_cto_order_lines_upg bcolu,
5431: bom_operational_routings bor
5432: where bcolu.sequence = p_seq

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

5510: bon.ATTRIBUTE13,
5511: bon.ATTRIBUTE14,
5512: bon.ATTRIBUTE15
5513: FROM bom_operation_networks bon,
5514: bom_operation_sequences bos1, /* 'from' Ops of model */
5515: bom_operation_sequences bos2, /* 'to' Ops of model */
5516: bom_operation_sequences bos3, /* 'from' Ops of config */
5517: bom_operation_sequences bos4, /* 'to' Ops of config */
5518: bom_operational_routings brif,

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

5511: bon.ATTRIBUTE14,
5512: bon.ATTRIBUTE15
5513: FROM bom_operation_networks bon,
5514: bom_operation_sequences bos1, /* 'from' Ops of model */
5515: bom_operation_sequences bos2, /* 'to' Ops of model */
5516: bom_operation_sequences bos3, /* 'from' Ops of config */
5517: bom_operation_sequences bos4, /* 'to' Ops of config */
5518: bom_operational_routings brif,
5519: bom_cto_order_lines_upg bcolu

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

5512: bon.ATTRIBUTE15
5513: FROM bom_operation_networks bon,
5514: bom_operation_sequences bos1, /* 'from' Ops of model */
5515: bom_operation_sequences bos2, /* 'to' Ops of model */
5516: bom_operation_sequences bos3, /* 'from' Ops of config */
5517: bom_operation_sequences bos4, /* 'to' Ops of config */
5518: bom_operational_routings brif,
5519: bom_cto_order_lines_upg bcolu
5520: WHERE bon.from_op_seq_id = bos1.operation_sequence_id

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

5513: FROM bom_operation_networks bon,
5514: bom_operation_sequences bos1, /* 'from' Ops of model */
5515: bom_operation_sequences bos2, /* 'to' Ops of model */
5516: bom_operation_sequences bos3, /* 'from' Ops of config */
5517: bom_operation_sequences bos4, /* 'to' Ops of config */
5518: bom_operational_routings brif,
5519: bom_cto_order_lines_upg bcolu
5520: WHERE bon.from_op_seq_id = bos1.operation_sequence_id
5521: AND bon.to_op_seq_id = bos2.operation_sequence_id