DBA Data[Home] [Help]

APPS.WIP_BFLPROC_PRIV dependencies on WIP_CONSTANTS

Line 94: and mti.transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,

90: msi.serial_number_control_code serialNumControlCode
91: from mtl_transactions_interface mti,
92: mtl_system_items_b msi
93: where mti.transaction_header_id = p_txnHdrID
94: and mti.transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
95: wip_constants.issnegc_action, wip_constants.retnegc_action)
96: and mti.operation_seq_num between p_firstOp and p_lastOp
97: and msi.inventory_item_id = mti.inventory_item_id
98: and msi.organization_id = mti.organization_id

Line 95: wip_constants.issnegc_action, wip_constants.retnegc_action)

91: from mtl_transactions_interface mti,
92: mtl_system_items_b msi
93: where mti.transaction_header_id = p_txnHdrID
94: and mti.transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
95: wip_constants.issnegc_action, wip_constants.retnegc_action)
96: and mti.operation_seq_num between p_firstOp and p_lastOp
97: and msi.inventory_item_id = mti.inventory_item_id
98: and msi.organization_id = mti.organization_id
99: and ( ( p_cplTxnID is null

Line 169: and nvl(wo.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES

165: and wro.organization_id = wdj.organization_id
166: and wro.wip_entity_id = wo.wip_entity_id (+)
167: and wro.operation_seq_num = wo.operation_seq_num (+)
168: /* added for OSFM jump enhancement 2541431 */
169: and nvl(wo.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
170: and wro.supply_locator_id = mil.inventory_location_id (+)
171: and wro.organization_id = mil.organization_id (+)
172: and wro.supply_locator_id = milk.inventory_location_id (+)
173: and wro.organization_id = milk.organization_id (+)

Line 295: if (l_logLevel <= wip_constants.trace_logging) then

291: if(fnd_api.to_boolean(p_initMsgList)) then
292: fnd_msg_pub.initialize;
293: end if;
294:
295: if (l_logLevel <= wip_constants.trace_logging) then
296: l_params(1).paramName := 'p_wipEntityID';
297: l_params(1).paramValue := p_wipEntityID;
298: l_params(2).paramName := 'p_wipEntityType';
299: l_params(2).paramValue := p_wipEntityType;

Line 354: if(p_wipEntityType = wip_constants.repetitive) then

350: wip_common.Get_Released_Revs_Type_Meaning (l_released_revs_type,
351: l_released_revs_meaning
352: );
353:
354: if(p_wipEntityType = wip_constants.repetitive) then
355: if (l_logLevel <= wip_constants.full_logging) then
356: wip_logger.log('processing repetitive...',l_returnStatus);
357: end if;
358: --select the highest operation where the backflush flag is set

Line 355: if (l_logLevel <= wip_constants.full_logging) then

351: l_released_revs_meaning
352: );
353:
354: if(p_wipEntityType = wip_constants.repetitive) then
355: if (l_logLevel <= wip_constants.full_logging) then
356: wip_logger.log('processing repetitive...',l_returnStatus);
357: end if;
358: --select the highest operation where the backflush flag is set
359: open c_repReqs;

Line 361: if (l_logLevel <= wip_constants.full_logging) then

357: end if;
358: --select the highest operation where the backflush flag is set
359: open c_repReqs;
360: else
361: if (l_logLevel <= wip_constants.full_logging) then
362: wip_logger.log('processing discrete...',l_returnStatus);
363: end if;
364: open c_discReqs;
365: end if;

Line 399: l_txnActionID := wip_constants.isscomp_action;

395: exit when l_reqRec.opSeqNum > p_lastOp;
396:
397: if(p_assyQty > 0) then --completion, forward move
398: if(l_reqRec.qtyPerAssy > 0) then
399: l_txnActionID := wip_constants.isscomp_action;
400: else
401: l_txnActionID := wip_constants.issnegc_action;
402: end if;
403: else --return, backward move

Line 401: l_txnActionID := wip_constants.issnegc_action;

397: if(p_assyQty > 0) then --completion, forward move
398: if(l_reqRec.qtyPerAssy > 0) then
399: l_txnActionID := wip_constants.isscomp_action;
400: else
401: l_txnActionID := wip_constants.issnegc_action;
402: end if;
403: else --return, backward move
404: if(l_reqRec.qtyPerAssy > 0) then
405: l_txnActionID := wip_constants.retcomp_action;

Line 405: l_txnActionID := wip_constants.retcomp_action;

401: l_txnActionID := wip_constants.issnegc_action;
402: end if;
403: else --return, backward move
404: if(l_reqRec.qtyPerAssy > 0) then
405: l_txnActionID := wip_constants.retcomp_action;
406: else
407: l_txnActionID := wip_constants.retnegc_action;
408: end if;
409: end if;

Line 407: l_txnActionID := wip_constants.retnegc_action;

403: else --return, backward move
404: if(l_reqRec.qtyPerAssy > 0) then
405: l_txnActionID := wip_constants.retcomp_action;
406: else
407: l_txnActionID := wip_constants.retnegc_action;
408: end if;
409: end if;
410:
411: --this loop tries to find an existing record for the backflush component. It exits when it finds one (= condition) or

Line 432: if(l_reqRec.countPointType = wip_constants.no_direct and

428: --if this isn't an autocharge operation and the operation seq num isn't the one being moved into, then
429: --skip inserting requirements.
430: --This is the only check we have to do since operations w/assy pull requirements must be autocharge and
431: --moves will always pass p_firstMoveOp and p_lastMoveOp
432: if(l_reqRec.countPointType = wip_constants.no_direct and
433: l_reqRec.opSeqNum not in (p_firstMoveOp, p_lastMoveOp)) then
434: goto end_of_loop;
435: end if;
436:

Line 448: if (l_reqRec.basisType = WIP_CONSTANTS.LOT_BASED_MTL) then

444: from wip_parameters
445: where organization_id = p_orgID;
446:
447:
448: if (l_reqRec.basisType = WIP_CONSTANTS.LOT_BASED_MTL) then
449:
450: -- forward move
451:
452: if (l_reqRec.qtyIssued = 0 and p_assyQty > 0) then

Line 460: wip_constants.inv_max_precision);

456: -- backflush the entire quantity stored in wro, since it is calculated based on
457: -- comp yield at job component definition time
458:
459: l_compQty := round(l_reqRec.qtyPerAssy / NVL(l_reqRec.componentYieldFactor,1),
460: wip_constants.inv_max_precision);
461: else
462: -- otherwise just backflush the qty per assembly, not including the comp yield */
463: l_compQty := round(l_reqRec.qtyPerAssy, wip_constants.inv_max_precision);
464: end if;

Line 463: l_compQty := round(l_reqRec.qtyPerAssy, wip_constants.inv_max_precision);

459: l_compQty := round(l_reqRec.qtyPerAssy / NVL(l_reqRec.componentYieldFactor,1),
460: wip_constants.inv_max_precision);
461: else
462: -- otherwise just backflush the qty per assembly, not including the comp yield */
463: l_compQty := round(l_reqRec.qtyPerAssy, wip_constants.inv_max_precision);
464: end if;
465:
466: -- backward move
467:

Line 474: if (p_wipSupplyType = WIP_CONSTANTS.OP_PULL and (l_reqRec.opAblyQtyCompleted + p_assyQty) = 0) or

470: --has already been updated to 0 before reaching here. Hence changing the conditions so that it will work for both
471: --online and background cases
472:
473: /*
474: if (p_wipSupplyType = WIP_CONSTANTS.OP_PULL and (l_reqRec.opAblyQtyCompleted + p_assyQty) = 0) or
475: (p_wipSupplyType = WIP_CONSTANTS.ASSY_PULL and
476: (l_reqRec.jobAblyQtyCompleted + l_reqRec.jobAblyQtyScrapped + p_assyQty) = 0) then
477: */
478:

Line 475: (p_wipSupplyType = WIP_CONSTANTS.ASSY_PULL and

471: --online and background cases
472:
473: /*
474: if (p_wipSupplyType = WIP_CONSTANTS.OP_PULL and (l_reqRec.opAblyQtyCompleted + p_assyQty) = 0) or
475: (p_wipSupplyType = WIP_CONSTANTS.ASSY_PULL and
476: (l_reqRec.jobAblyQtyCompleted + l_reqRec.jobAblyQtyScrapped + p_assyQty) = 0) then
477: */
478:
479: -- bug 5524972 rewritten the following if clause. made logic for assembly pull components similar to

Line 484: if (((p_wipSupplyType = WIP_CONSTANTS.OP_PULL)

480: -- that for operation pull
481:
482: /*
483:
484: if (((p_wipSupplyType = WIP_CONSTANTS.OP_PULL)
485: and (LEAST(l_reqRec.opAblyQtyCompleted, ABS(l_reqRec.opAblyQtyCompleted + p_assyQty)) = 0)) or
486: ((p_wipSupplyType = WIP_CONSTANTS.ASSY_PULL)
487: and (LEAST(l_reqRec.jobAblyQtyCompleted + l_reqRec.jobAblyQtyScrapped,
488: ABS(l_reqRec.jobAblyQtyCompleted + l_reqRec.jobAblyQtyScrapped + p_assyQty)) = 0)))

Line 486: ((p_wipSupplyType = WIP_CONSTANTS.ASSY_PULL)

482: /*
483:
484: if (((p_wipSupplyType = WIP_CONSTANTS.OP_PULL)
485: and (LEAST(l_reqRec.opAblyQtyCompleted, ABS(l_reqRec.opAblyQtyCompleted + p_assyQty)) = 0)) or
486: ((p_wipSupplyType = WIP_CONSTANTS.ASSY_PULL)
487: and (LEAST(l_reqRec.jobAblyQtyCompleted + l_reqRec.jobAblyQtyScrapped,
488: ABS(l_reqRec.jobAblyQtyCompleted + l_reqRec.jobAblyQtyScrapped + p_assyQty)) = 0)))
489: */
490:

Line 491: if (((p_wipSupplyType = WIP_CONSTANTS.OP_PULL) or (p_wipSupplyType = WIP_CONSTANTS.ASSY_PULL))

487: and (LEAST(l_reqRec.jobAblyQtyCompleted + l_reqRec.jobAblyQtyScrapped,
488: ABS(l_reqRec.jobAblyQtyCompleted + l_reqRec.jobAblyQtyScrapped + p_assyQty)) = 0)))
489: */
490:
491: if (((p_wipSupplyType = WIP_CONSTANTS.OP_PULL) or (p_wipSupplyType = WIP_CONSTANTS.ASSY_PULL))
492: and (LEAST(l_reqRec.opAblyQtyCompleted, ABS(l_reqRec.opAblyQtyCompleted + p_assyQty)) = 0))
493: then
494:
495: /* Bug 4712535 */

Line 499: wip_constants.inv_max_precision);

495: /* Bug 4712535 */
496:
497: if (l_include_yield = 1) then
498: l_compQty := - round(l_reqRec.qtyPerAssy / NVL(l_reqRec.componentYieldFactor,1),
499: wip_constants.inv_max_precision);
500: else
501: l_compQty := - round(l_reqRec.qtyPerAssy, wip_constants.inv_max_precision);
502: end if;
503:

Line 501: l_compQty := - round(l_reqRec.qtyPerAssy, wip_constants.inv_max_precision);

497: if (l_include_yield = 1) then
498: l_compQty := - round(l_reqRec.qtyPerAssy / NVL(l_reqRec.componentYieldFactor,1),
499: wip_constants.inv_max_precision);
500: else
501: l_compQty := - round(l_reqRec.qtyPerAssy, wip_constants.inv_max_precision);
502: end if;
503:
504: end if;
505:

Line 520: wip_constants.inv_max_precision);

516: where organization_id = p_orgID; -- moved above */
517:
518: if (l_include_yield = 1) then
519: l_compQty := round(l_reqRec.qtyPerAssy * p_assyQty/NVL(l_reqRec.componentYieldFactor,1),
520: wip_constants.inv_max_precision);
521: else
522: l_compQty := round(l_reqRec.qtyPerAssy * p_assyQty,
523: wip_constants.inv_max_precision);
524: end if;

Line 523: wip_constants.inv_max_precision);

519: l_compQty := round(l_reqRec.qtyPerAssy * p_assyQty/NVL(l_reqRec.componentYieldFactor,1),
520: wip_constants.inv_max_precision);
521: else
522: l_compQty := round(l_reqRec.qtyPerAssy * p_assyQty,
523: wip_constants.inv_max_precision);
524: end if;
525:
526: end if;
527:

Line 542: if (l_logLevel <= wip_constants.full_logging) then

538: end if;
539:
540:
541: if(l_popRec.itemID = l_reqRec.itemID) then
542: if (l_logLevel <= wip_constants.full_logging) then
543: wip_logger.log('found existing requirement',l_returnStatus);
544: end if;
545: if(fnd_api.to_boolean(p_mergeMode)) then
546: --user wants to merge requirements. Update the txn qty

Line 569: if(l_reqRec.revControlCode = wip_constants.revision_controlled) then

565: /* Fix for bug# 5160604/5004291:
566: Added eco_status parameter to ensure that the revision being
567: backflushed will be determind by the profile WIP_RELEASED_REVS */
568:
569: if(l_reqRec.revControlCode = wip_constants.revision_controlled) then
570: bom_revisions.get_revision(examine_type => 'ALL',
571: eco_status=>l_released_revs_meaning,
572: org_id => p_orgID,
573: item_id => l_reqRec.itemID,

Line 584: if (l_reqRec.basisType = WIP_CONSTANTS.LOT_BASED_MTL) then

580: /* Bug 4712505 */
581: -- For lot based components we need to check if there are existing records in MTI or MMTT.
582: -- If there are existing records then we don't want to backflush again, since the quantity
583: -- should only be backflushed once.
584: if (l_reqRec.basisType = WIP_CONSTANTS.LOT_BASED_MTL) then
585: open c_checkExistingMTI(l_reqRec.opSeqNum, l_reqRec.itemID, l_txnActionID, l_txnTypeID);
586: fetch c_checkExistingMTI into l_dummy;
587: -- Fixed bug 4755034. This is a regression from 4712505 bug fix.
588: -- Cursor should be close no matter pending record found or not.

Line 609: if (l_logLevel <= wip_constants.full_logging) then

605: end if;
606: end if;
607:
608:
609: if (l_logLevel <= wip_constants.full_logging) then
610: wip_logger.log('inserting item:' || l_reqRec.itemID || ' opSeq:' || l_reqRec.opSeqNum || ' qty:' || l_compQty * -1,l_returnStatus);
611: wip_logger.log('txnAction:' || l_txnActionID || ' txnType:' || l_txnTypeID,l_returnStatus);
612: end if;
613: if(x_compTbl is null) then

Line 704: wip_constants.mti_inventory,

700: l_revision,
701: l_reqRec.opSeqNum,
702: l_reqRec.deptID,
703: l_reqRec.orgID,
704: wip_constants.mti_inventory,
705: -- 'Y',
706: l_reqRec.supplySub,
707: l_reqRec.supplyLocID,
708: l_acctPeriodID,

Line 713: wip_constants.isscomp_action, 1,

709: p_cplTxnID,
710: p_movTxnID,
711: p_repLineID,
712: decode(l_txnActionID,
713: wip_constants.isscomp_action, 1,
714: wip_constants.retcomp_action, 1,
715: wip_constants.issnegc_action, -1,
716: wip_constants.retnegc_action, -1),
717: -- l_reqRec.serialNumControlCode,

Line 714: wip_constants.retcomp_action, 1,

710: p_movTxnID,
711: p_repLineID,
712: decode(l_txnActionID,
713: wip_constants.isscomp_action, 1,
714: wip_constants.retcomp_action, 1,
715: wip_constants.issnegc_action, -1,
716: wip_constants.retnegc_action, -1),
717: -- l_reqRec.serialNumControlCode,
718: -- l_reqRec.lotControlCode,

Line 715: wip_constants.issnegc_action, -1,

711: p_repLineID,
712: decode(l_txnActionID,
713: wip_constants.isscomp_action, 1,
714: wip_constants.retcomp_action, 1,
715: wip_constants.issnegc_action, -1,
716: wip_constants.retnegc_action, -1),
717: -- l_reqRec.serialNumControlCode,
718: -- l_reqRec.lotControlCode,
719: nvl(p_srcCode, 'WIP Backflush'),

Line 716: wip_constants.retnegc_action, -1),

712: decode(l_txnActionID,
713: wip_constants.isscomp_action, 1,
714: wip_constants.retcomp_action, 1,
715: wip_constants.issnegc_action, -1,
716: wip_constants.retnegc_action, -1),
717: -- l_reqRec.serialNumControlCode,
718: -- l_reqRec.lotControlCode,
719: nvl(p_srcCode, 'WIP Backflush'),
720: p_wipEntityID,

Line 728: NVL(p_batchSeq,wip_constants.component_batch_seq),

724: l_reqRec.srcProjectID,
725: l_reqRec.srcTaskID,
726: p_mtlTxnMode,
727: p_batchID,
728: NVL(p_batchSeq,wip_constants.component_batch_seq),
729: p_lockFlag,
730: p_reasonID,
731: p_reference);
732: --must be after completion

Line 738: if (l_logLevel <= wip_constants.full_logging) then

734: if(floor(l_extendCount/g_compTblExtendSize) = 1) then
735: x_compTbl.extend(g_compTblExtendSize);
736: l_extendCount := 0;
737: end if;
738: if (l_logLevel <= wip_constants.full_logging) then
739: wip_logger.log('serial control code is ' || l_reqRec.serialNumControlCode,l_returnStatus);
740: wip_logger.log('lot control code is ' || l_reqRec.lotControlCode,l_returnStatus);
741: end if;
742:

Line 808: if (l_logLevel <= wip_constants.trace_logging) then

804: close c_repReqs;
805: end if;
806:
807: x_returnStatus := fnd_api.g_ret_sts_success;
808: if (l_logLevel <= wip_constants.trace_logging) then
809: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.processRequirements',
810: p_procReturnStatus => x_returnStatus,
811: p_msg => 'procedure succeeded',
812: x_returnStatus => l_returnStatus); --discard logging return status

Line 821: if (l_logLevel <= wip_constants.trace_logging) then

817: end if;
818: exception
819: when fnd_api.g_exc_unexpected_error then
820: rollback to wipbflpb20;
821: if (l_logLevel <= wip_constants.trace_logging) then
822: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.processRequirements',
823: p_procReturnStatus => x_returnStatus,
824: p_msg => l_errMsg,
825: x_returnStatus => l_returnStatus); --discard logging return status

Line 837: if (l_logLevel <= wip_constants.trace_logging) then

833: x_returnStatus := fnd_api.g_ret_sts_unexp_error;--unexpec error if exception occurs
834: fnd_msg_pub.add_exc_msg(p_pkg_name => 'wip_bflProc_priv',
835: p_procedure_name => 'processRequirements',
836: p_error_text => SQLERRM);
837: if (l_logLevel <= wip_constants.trace_logging) then
838: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.processRequirements',
839: p_procReturnStatus => x_returnStatus,
840: p_msg => 'unexpected error: ' || SQLERRM,
841: x_returnStatus => l_returnStatus); --discard logging return status

Line 918: and msi.bom_item_type not in (wip_constants.model_type,

914: where be.group_id = v_grpID
915: and be.component_sequence_id = bic.component_sequence_id
916: and be.component_item_id = msi.inventory_item_id
917: and be.component_item_id <> p_itemID --exclude assy if it is in the table
918: and msi.bom_item_type not in (wip_constants.model_type,
919: wip_constants.option_class_type) /* Fix for 4575119 */
920: and msi.organization_id = v_orgID
921: order by be.component_code;
922:

Line 919: wip_constants.option_class_type) /* Fix for 4575119 */

915: and be.component_sequence_id = bic.component_sequence_id
916: and be.component_item_id = msi.inventory_item_id
917: and be.component_item_id <> p_itemID --exclude assy if it is in the table
918: and msi.bom_item_type not in (wip_constants.model_type,
919: wip_constants.option_class_type) /* Fix for 4575119 */
920: and msi.organization_id = v_orgID
921: order by be.component_code;
922:
923: cursor c_groupedComponents(v_cmnOrgID NUMBER, v_orgID NUMBER, v_grpID NUMBER) is

Line 959: and msi.bom_item_type not in (wip_constants.model_type,

955: where be.group_id = v_grpID
956: and be.component_sequence_id = bic.component_sequence_id
957: and be.component_item_id = msi.inventory_item_id
958: and be.component_item_id <> p_itemID --exclude assy if it is in the table
959: and msi.bom_item_type not in (wip_constants.model_type,
960: wip_constants.option_class_type) /* Fix for 4575119 */
961: and msi.organization_id = v_orgID
962: and msi.organization_id = mp.organization_id
963: and bic.supply_locator_id = milk.inventory_location_id(+)

Line 960: wip_constants.option_class_type) /* Fix for 4575119 */

956: and be.component_sequence_id = bic.component_sequence_id
957: and be.component_item_id = msi.inventory_item_id
958: and be.component_item_id <> p_itemID --exclude assy if it is in the table
959: and msi.bom_item_type not in (wip_constants.model_type,
960: wip_constants.option_class_type) /* Fix for 4575119 */
961: and msi.organization_id = v_orgID
962: and msi.organization_id = mp.organization_id
963: and bic.supply_locator_id = milk.inventory_location_id(+)
964: group by be.operation_seq_num,

Line 1001: if (l_logLevel <= wip_constants.trace_logging) then

997: if(fnd_api.to_boolean(p_initMsgList)) then
998: fnd_msg_pub.initialize;
999: end if;
1000:
1001: if (l_logLevel <= wip_constants.trace_logging) then
1002: l_params(1).paramName := 'p_itemID';
1003: l_params(1).paramValue := p_itemID;
1004: l_params(2).paramName := 'p_orgID';
1005: l_params(2).paramValue := p_orgID;

Line 1036: and (b.assembly_type = wip_constants.manufacturing_bill or --FP Bug 6502612

1032: from bom_bill_of_materials b
1033: where b.assembly_item_id = p_itemID
1034: and b.organization_id = p_orgID
1035: and nvl(b.alternate_bom_designator, '@@@@@') = NVL(p_altBomDesig, '@@@@@')
1036: and (b.assembly_type = wip_constants.manufacturing_bill or --FP Bug 6502612
1037: to_number(fnd_profile.value('WIP_SEE_ENG_ITEMS')) = wip_constants.yes )); --FP Bug 6502612
1038:
1039: /******
1040: select a.organization_id, a.bill_sequence_id

Line 1037: to_number(fnd_profile.value('WIP_SEE_ENG_ITEMS')) = wip_constants.yes )); --FP Bug 6502612

1033: where b.assembly_item_id = p_itemID
1034: and b.organization_id = p_orgID
1035: and nvl(b.alternate_bom_designator, '@@@@@') = NVL(p_altBomDesig, '@@@@@')
1036: and (b.assembly_type = wip_constants.manufacturing_bill or --FP Bug 6502612
1037: to_number(fnd_profile.value('WIP_SEE_ENG_ITEMS')) = wip_constants.yes )); --FP Bug 6502612
1038:
1039: /******
1040: select a.organization_id, a.bill_sequence_id
1041: into l_cmnOrgID, l_cmnBillID

Line 1072: if (l_logLevel <= wip_constants.trace_logging) then

1068: when no_data_found then
1069: x_returnStatus := fnd_api.g_ret_sts_success;
1070: x_compTbl := system.wip_component_tbl_t();
1071:
1072: if (l_logLevel <= wip_constants.trace_logging) then
1073: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.explodeRequirements',
1074: p_procReturnStatus => x_returnStatus,
1075: p_msg => 'no bom for this item!',
1076: x_returnStatus => l_returnStatus); --discard logging return status

Line 1085: if (l_logLevel <= wip_constants.full_logging) then

1081: end if;
1082: return;
1083: end;
1084:
1085: if (l_logLevel <= wip_constants.full_logging) then
1086: wip_logger.log('cmn bill id: ' || l_cmnBillID,l_returnStatus);
1087: wip_logger.log('cmn org id: ' || l_cmnOrgID,l_returnStatus);
1088: end if;
1089:

Line 1135: rev_date => to_char(p_bomRevDate, wip_constants.datetime_fmt),

1131: /* Modified following call for bug#3423629. Pass p_bomRevDate as revision date
1132: instead of p_txnDate */
1133: bompexpl.exploder_userexit(org_id => p_orgID,
1134: grp_id => l_grpID,
1135: rev_date => to_char(p_bomRevDate, wip_constants.datetime_fmt),
1136: explode_option => 2,
1137: -- order_by => 2,
1138: levels_to_explode => l_maxBomLevel,
1139: module => 5,

Line 1149: if (l_logLevel <= wip_constants.full_logging) then

1145: unit_number => p_unitNumber, /* Fix for bug 5332615 */
1146: release_option => l_released_revs_type, /* Fix for bug 5383135 */
1147: impl_flag => p_implFlag); /* Fix for bug 5383135 */
1148:
1149: if (l_logLevel <= wip_constants.full_logging) then
1150: wip_logger.log(l_errCode,l_returnStatus);
1151: end if;
1152: if(l_errCode <> 0) then
1153: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');

Line 1172: if(l_bomItemType in (wip_constants.option_class_type, wip_constants.model_type)) then

1168: raise fnd_api.g_exc_unexpected_error;
1169: end if;
1170:
1171: --don't explode, just delete all exploded components
1172: if(l_bomItemType in (wip_constants.option_class_type, wip_constants.model_type)) then
1173: delete bom_explosion_temp
1174: where group_id = l_grpID
1175: and plan_level > 2;
1176: else

Line 1186: if (l_logLevel <= wip_constants.full_logging) then

1182: if(c_components%NOTFOUND) then
1183: close c_components;
1184: exit;
1185: end if;
1186: if (l_logLevel <= wip_constants.full_logging) then
1187: wip_logger.log('process item ' || l_compRec.itemID || ' w/compCode= ' || l_compRec.compCode,l_returnStatus);
1188: end if;
1189: --The op seq of a phantom component should be the op seq of it's ancestor that's on the assy_item's bom,
1190: --or in other words, a direct child of the assembly. If this check is not done, multiple levels of nesting

Line 1192: if(l_inheritPhOpSeq = wip_constants.yes) then

1188: end if;
1189: --The op seq of a phantom component should be the op seq of it's ancestor that's on the assy_item's bom,
1190: --or in other words, a direct child of the assembly. If this check is not done, multiple levels of nesting
1191: --will cause problems.
1192: if(l_inheritPhOpSeq = wip_constants.yes) then
1193: if(l_compRec.bomLevel = 2) then
1194: l_opSeqNum := l_compRec.opSeqNum;
1195: if (l_logLevel <= wip_constants.full_logging) then
1196: wip_logger.log('--set all descendant op seqs to' || l_opSeqNum,l_returnStatus);

Line 1195: if (l_logLevel <= wip_constants.full_logging) then

1191: --will cause problems.
1192: if(l_inheritPhOpSeq = wip_constants.yes) then
1193: if(l_compRec.bomLevel = 2) then
1194: l_opSeqNum := l_compRec.opSeqNum;
1195: if (l_logLevel <= wip_constants.full_logging) then
1196: wip_logger.log('--set all descendant op seqs to' || l_opSeqNum,l_returnStatus);
1197: end if;
1198: end if;
1199: else

Line 1200: if (l_logLevel <= wip_constants.full_logging) then

1196: wip_logger.log('--set all descendant op seqs to' || l_opSeqNum,l_returnStatus);
1197: end if;
1198: end if;
1199: else
1200: if (l_logLevel <= wip_constants.full_logging) then
1201: wip_logger.log('--retain op seqs',l_returnStatus);
1202: end if;
1203: l_opSeqNum := null;
1204: end if;

Line 1206: if(l_compRec.wipSupplyType = wip_constants.phantom) then --if item is a phantom

1202: end if;
1203: l_opSeqNum := null;
1204: end if;
1205:
1206: if(l_compRec.wipSupplyType = wip_constants.phantom) then --if item is a phantom
1207: if(l_inheritPhOpSeq = wip_constants.no) then
1208: select operation_seq_num
1209: into l_opSeqNum
1210: from bom_explosion_temp

Line 1207: if(l_inheritPhOpSeq = wip_constants.no) then

1203: l_opSeqNum := null;
1204: end if;
1205:
1206: if(l_compRec.wipSupplyType = wip_constants.phantom) then --if item is a phantom
1207: if(l_inheritPhOpSeq = wip_constants.no) then
1208: select operation_seq_num
1209: into l_opSeqNum
1210: from bom_explosion_temp
1211: where rowid = l_compRec.beRowID;

Line 1223: if (l_logLevel <= wip_constants.full_logging) then

1219:
1220: --only needed to use l_opSeqNum for the above update
1221: l_opSeqNum := null;
1222: end if;
1223: if (l_logLevel <= wip_constants.full_logging) then
1224: wip_logger.log('--item is a phantom',l_returnStatus);
1225: end if;
1226: --update all the descendants quantity to reflect the phantom parent
1227: if(l_inheritPhOpSeq = wip_constants.yes and l_compRec.bomLevel = 1) then

Line 1227: if(l_inheritPhOpSeq = wip_constants.yes and l_compRec.bomLevel = 1) then

1223: if (l_logLevel <= wip_constants.full_logging) then
1224: wip_logger.log('--item is a phantom',l_returnStatus);
1225: end if;
1226: --update all the descendants quantity to reflect the phantom parent
1227: if(l_inheritPhOpSeq = wip_constants.yes and l_compRec.bomLevel = 1) then
1228: l_opSeqNum := l_compRec.opSeqNum;
1229: else
1230: l_opSeqNum := null;
1231: end if;

Line 1232: if (l_logLevel <= wip_constants.full_logging) then

1228: l_opSeqNum := l_compRec.opSeqNum;
1229: else
1230: l_opSeqNum := null;
1231: end if;
1232: if (l_logLevel <= wip_constants.full_logging) then
1233: wip_logger.log('--updated qty by ' || l_compRec.priQty,l_returnStatus);
1234: wip_logger.log('shrinkage_rate: ' || l_compRec.shrinkageRate,l_returnStatus);
1235: end if;
1236:

Line 1243: set component_quantity = (component_quantity * decode (basis_type , wip_constants.lot_based_mtl,1,l_compRec.priQty) ) / (1 - l_compRec.shrinkageRate),

1239: *For phantoms, recalcuate component_yield_factor by multiplying it with child yield */
1240: /* Fix for bug 5221306 lot basis was taken care for children of phantom
1241: Added decode in basis_type of component */
1242: update bom_explosion_temp
1243: set component_quantity = (component_quantity * decode (basis_type , wip_constants.lot_based_mtl,1,l_compRec.priQty) ) / (1 - l_compRec.shrinkageRate),
1244: /* For phantoms, recalcuate component_yield_factor by multiplying it with child yield only for components
1245: having basis_type as item. Bug fix 5524603. */
1246: component_yield_factor = decode(basis_type,wip_constants.lot_based_mtl,component_yield_factor,component_yield_factor * l_compRec.compYield),
1247: operation_seq_num = nvl(l_opSeqNum, operation_seq_num)

Line 1246: component_yield_factor = decode(basis_type,wip_constants.lot_based_mtl,component_yield_factor,component_yield_factor * l_compRec.compYield),

1242: update bom_explosion_temp
1243: set component_quantity = (component_quantity * decode (basis_type , wip_constants.lot_based_mtl,1,l_compRec.priQty) ) / (1 - l_compRec.shrinkageRate),
1244: /* For phantoms, recalcuate component_yield_factor by multiplying it with child yield only for components
1245: having basis_type as item. Bug fix 5524603. */
1246: component_yield_factor = decode(basis_type,wip_constants.lot_based_mtl,component_yield_factor,component_yield_factor * l_compRec.compYield),
1247: operation_seq_num = nvl(l_opSeqNum, operation_seq_num)
1248: where group_id = l_grpID
1249: and component_code like l_compRec.compCode || '-%';
1250: else

Line 1273: if (l_logLevel <= wip_constants.full_logging) then

1269: --blindly update all descendant's b/c one of the levels may not have an op-seq of one,
1270: --e.g. Assy -> Ph(20) -> Ph(1) -> Ph(10) -> Comp(1). In this case, we would want to set the comp's op seq to 10, not 20.
1271: goto start_loop_processing; --outer loop will check notfound, but will continue processing since the attribute will be false
1272: end if;
1273: if (l_logLevel <= wip_constants.full_logging) then
1274: wip_logger.log('--skipping item' || l_compRec.compCode,l_returnStatus);
1275: end if;
1276: end loop;
1277: end if;

Line 1288: l_txnActionID := wip_constants.isscomp_action;

1284: --second pass: select all the remaining records into a pl/sql table
1285: for l_compRec in c_groupedComponents(v_cmnOrgID => l_cmnOrgID, v_orgID => p_orgID, v_grpID => l_grpID) loop
1286: if(p_qty > 0) then
1287: if(l_compRec.priQty > 0) then
1288: l_txnActionID := wip_constants.isscomp_action;
1289: else
1290: l_txnActionID := wip_constants.issnegc_action;
1291: end if;
1292: else

Line 1290: l_txnActionID := wip_constants.issnegc_action;

1286: if(p_qty > 0) then
1287: if(l_compRec.priQty > 0) then
1288: l_txnActionID := wip_constants.isscomp_action;
1289: else
1290: l_txnActionID := wip_constants.issnegc_action;
1291: end if;
1292: else
1293: if(l_compRec.priQty > 0) then
1294: l_txnActionID := wip_constants.retcomp_action;

Line 1294: l_txnActionID := wip_constants.retcomp_action;

1290: l_txnActionID := wip_constants.issnegc_action;
1291: end if;
1292: else
1293: if(l_compRec.priQty > 0) then
1294: l_txnActionID := wip_constants.retcomp_action;
1295: else
1296: l_txnActionID := wip_constants.retnegc_action;
1297: end if;
1298: end if;

Line 1296: l_txnActionID := wip_constants.retnegc_action;

1292: else
1293: if(l_compRec.priQty > 0) then
1294: l_txnActionID := wip_constants.retcomp_action;
1295: else
1296: l_txnActionID := wip_constants.retnegc_action;
1297: end if;
1298: end if;
1299:
1300:

Line 1305: if(l_compRec.wipSupplyType = wip_constants.phantom) then

1301: if(floor(l_extendCount/g_compTblExtendSize) = 1) then
1302: x_compTbl.extend(g_compTblExtendSize);
1303: l_extendCount := 0;
1304: end if;
1305: if(l_compRec.wipSupplyType = wip_constants.phantom) then
1306: --phantom is supposedly an implicit conversion from a supply to a demand. Thus we need to factor by the
1307: --'shrinkage rate' item attribute.
1308: l_compRec.priQty := l_compRec.priQty / (1 - l_compRec.shrinkageRate);
1309: end if;

Line 1311: if(l_compRec.revControlCode = wip_constants.revision_controlled) then

1307: --'shrinkage rate' item attribute.
1308: l_compRec.priQty := l_compRec.priQty / (1 - l_compRec.shrinkageRate);
1309: end if;
1310:
1311: if(l_compRec.revControlCode = wip_constants.revision_controlled) then
1312: bom_revisions.get_revision(examine_type => 'ALL',
1313: org_id => p_orgID,
1314: item_id => l_compRec.itemID,
1315: rev_date => p_txnDate,

Line 1342: l_compRec.pegFlag in (wip_constants.peg_hard, wip_constants.peg_end_assm_hard)) then

1338: end if;
1339:
1340: --if we are using a project/task locator, then set the project/task IDs
1341: if(p_projectID is not null and
1342: l_compRec.pegFlag in (wip_constants.peg_hard, wip_constants.peg_end_assm_hard)) then
1343: l_projectID := p_projectID;
1344: l_taskID := p_taskID;
1345: end if;
1346:

Line 1370: if( l_compRec.basis_type = WIP_CONSTANTS.LOT_BASED_MTL) then

1366:
1367: /* LBM Project */
1368:
1369: -- set multiplication factor for lot based component
1370: if( l_compRec.basis_type = WIP_CONSTANTS.LOT_BASED_MTL) then
1371: if ((l_txnActionID = wip_constants.retcomp_action) or
1372: (l_txnActionID = wip_constants.retnegc_action)) then
1373: multiple_factor := -1;
1374: else

Line 1371: if ((l_txnActionID = wip_constants.retcomp_action) or

1367: /* LBM Project */
1368:
1369: -- set multiplication factor for lot based component
1370: if( l_compRec.basis_type = WIP_CONSTANTS.LOT_BASED_MTL) then
1371: if ((l_txnActionID = wip_constants.retcomp_action) or
1372: (l_txnActionID = wip_constants.retnegc_action)) then
1373: multiple_factor := -1;
1374: else
1375: multiple_factor := 1;

Line 1372: (l_txnActionID = wip_constants.retnegc_action)) then

1368:
1369: -- set multiplication factor for lot based component
1370: if( l_compRec.basis_type = WIP_CONSTANTS.LOT_BASED_MTL) then
1371: if ((l_txnActionID = wip_constants.retcomp_action) or
1372: (l_txnActionID = wip_constants.retnegc_action)) then
1373: multiple_factor := -1;
1374: else
1375: multiple_factor := 1;
1376: end if;

Line 1434: if (l_logLevel <= wip_constants.trace_logging) then

1430: --finally bom doesn't want us to leave anything in there temp table. delete the rows.
1431: delete bom_explosion_temp
1432: where group_id = l_grpID;
1433: x_returnStatus := fnd_api.g_ret_sts_success;
1434: if (l_logLevel <= wip_constants.trace_logging) then
1435: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.explodeRequirements',
1436: p_procReturnStatus => x_returnStatus,
1437: p_msg => 'procedure success',
1438: x_returnStatus => l_returnStatus); --discard logging return status

Line 1449: if (l_logLevel <= wip_constants.trace_logging) then

1445: exception
1446: when fnd_api.g_exc_unexpected_error then
1447: rollback to wipbflpb30;
1448: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1449: if (l_logLevel <= wip_constants.trace_logging) then
1450: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.explodeRequirements',
1451: p_procReturnStatus => x_returnStatus,
1452: p_msg => l_errMsg,
1453: x_returnStatus => l_returnStatus); --discard logging return status

Line 1466: if (l_logLevel <= wip_constants.trace_logging) then

1462: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1463: fnd_message.set_name('WIP', 'WIP_UNEXPECTED_ERROR');
1464: fnd_message.set_token('ERROR_TEXT', SQLERRM);
1465: fnd_msg_pub.add;
1466: if (l_logLevel <= wip_constants.trace_logging) then
1467: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.explodeRequirements',
1468: p_procReturnStatus => x_returnStatus,
1469: p_msg => 'unexpected error: ' || SQLERRM,
1470: x_returnStatus => l_returnStatus); --discard logging return status

Line 1480: if(p_txnActionID = wip_constants.isscomp_action) then

1476: end explodeRequirements;
1477:
1478:
1479: function findTxnTypeID(p_txnActionID IN NUMBER) return NUMBER is begin
1480: if(p_txnActionID = wip_constants.isscomp_action) then
1481: return wip_constants.isscomp_type;
1482: elsif(p_txnActionID = wip_constants.issnegc_action) then
1483: return wip_constants.issnegc_type;
1484: elsif(p_txnActionID = wip_constants.retcomp_action) then

Line 1481: return wip_constants.isscomp_type;

1477:
1478:
1479: function findTxnTypeID(p_txnActionID IN NUMBER) return NUMBER is begin
1480: if(p_txnActionID = wip_constants.isscomp_action) then
1481: return wip_constants.isscomp_type;
1482: elsif(p_txnActionID = wip_constants.issnegc_action) then
1483: return wip_constants.issnegc_type;
1484: elsif(p_txnActionID = wip_constants.retcomp_action) then
1485: return wip_constants.retcomp_type;

Line 1482: elsif(p_txnActionID = wip_constants.issnegc_action) then

1478:
1479: function findTxnTypeID(p_txnActionID IN NUMBER) return NUMBER is begin
1480: if(p_txnActionID = wip_constants.isscomp_action) then
1481: return wip_constants.isscomp_type;
1482: elsif(p_txnActionID = wip_constants.issnegc_action) then
1483: return wip_constants.issnegc_type;
1484: elsif(p_txnActionID = wip_constants.retcomp_action) then
1485: return wip_constants.retcomp_type;
1486: elsif(p_txnActionID = wip_constants.retnegc_action) then

Line 1483: return wip_constants.issnegc_type;

1479: function findTxnTypeID(p_txnActionID IN NUMBER) return NUMBER is begin
1480: if(p_txnActionID = wip_constants.isscomp_action) then
1481: return wip_constants.isscomp_type;
1482: elsif(p_txnActionID = wip_constants.issnegc_action) then
1483: return wip_constants.issnegc_type;
1484: elsif(p_txnActionID = wip_constants.retcomp_action) then
1485: return wip_constants.retcomp_type;
1486: elsif(p_txnActionID = wip_constants.retnegc_action) then
1487: return wip_constants.retnegc_type;

Line 1484: elsif(p_txnActionID = wip_constants.retcomp_action) then

1480: if(p_txnActionID = wip_constants.isscomp_action) then
1481: return wip_constants.isscomp_type;
1482: elsif(p_txnActionID = wip_constants.issnegc_action) then
1483: return wip_constants.issnegc_type;
1484: elsif(p_txnActionID = wip_constants.retcomp_action) then
1485: return wip_constants.retcomp_type;
1486: elsif(p_txnActionID = wip_constants.retnegc_action) then
1487: return wip_constants.retnegc_type;
1488: end if;

Line 1485: return wip_constants.retcomp_type;

1481: return wip_constants.isscomp_type;
1482: elsif(p_txnActionID = wip_constants.issnegc_action) then
1483: return wip_constants.issnegc_type;
1484: elsif(p_txnActionID = wip_constants.retcomp_action) then
1485: return wip_constants.retcomp_type;
1486: elsif(p_txnActionID = wip_constants.retnegc_action) then
1487: return wip_constants.retnegc_type;
1488: end if;
1489: end findTxnTypeID;

Line 1486: elsif(p_txnActionID = wip_constants.retnegc_action) then

1482: elsif(p_txnActionID = wip_constants.issnegc_action) then
1483: return wip_constants.issnegc_type;
1484: elsif(p_txnActionID = wip_constants.retcomp_action) then
1485: return wip_constants.retcomp_type;
1486: elsif(p_txnActionID = wip_constants.retnegc_action) then
1487: return wip_constants.retnegc_type;
1488: end if;
1489: end findTxnTypeID;
1490:

Line 1487: return wip_constants.retnegc_type;

1483: return wip_constants.issnegc_type;
1484: elsif(p_txnActionID = wip_constants.retcomp_action) then
1485: return wip_constants.retcomp_type;
1486: elsif(p_txnActionID = wip_constants.retnegc_action) then
1487: return wip_constants.retnegc_type;
1488: end if;
1489: end findTxnTypeID;
1490:
1491: PROCEDURE backflush(p_wipEntityID IN NUMBER,

Line 1564: IF (l_logLevel <= wip_constants.trace_logging) THEN

1560: TVE_OVERCOMPLETION_MISMATCH CONSTANT NUMBER:= -6;
1561: BEGIN
1562: SAVEPOINT s_backflush;
1563: -- write parameter value to log file
1564: IF (l_logLevel <= wip_constants.trace_logging) THEN
1565: l_params(1).paramName := 'p_wipEntityID';
1566: l_params(1).paramValue := p_wipEntityID;
1567: l_params(2).paramName := 'p_orgID';
1568: l_params(2).paramValue := p_orgID;

Line 1621: l_batch_seq := WIP_CONSTANTS.COMPONENT_BATCH_SEQ;

1617: p_params => l_params,
1618: x_returnStatus => l_returnStatus);
1619: END IF;
1620: IF(p_batchSeq IS NULL) THEN
1621: l_batch_seq := WIP_CONSTANTS.COMPONENT_BATCH_SEQ;
1622: ELSE
1623: l_batch_seq := p_batchSeq;
1624: END IF;
1625:

Line 1626: IF(p_entityType = WIP_CONSTANTS.REPETITIVE) THEN

1622: ELSE
1623: l_batch_seq := p_batchSeq;
1624: END IF;
1625:
1626: IF(p_entityType = WIP_CONSTANTS.REPETITIVE) THEN
1627: SELECT MIN(wo.operation_seq_num),
1628: MAX(wo.operation_seq_num)
1629: INTO l_first_op,
1630: l_last_op

Line 1636: AND wrs.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)

1632: wip_repetitive_schedules wrs
1633: WHERE wrs.organization_id = wo.organization_id
1634: AND wrs.wip_entity_id = wo.wip_entity_id
1635: AND wrs.repetitive_schedule_id = wo.repetitive_schedule_id
1636: AND wrs.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)
1637: AND wrs.wip_entity_id = p_wipEntityID
1638: AND wrs.organization_id = p_orgID;
1639: ELSE -- Discrete and Lotbased jobs
1640: SELECT MIN(wo.operation_seq_num),

Line 1648: AND wdj.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)

1644: FROM wip_operations wo,
1645: wip_discrete_jobs wdj
1646: WHERE wdj.organization_id = wo.organization_id
1647: AND wdj.wip_entity_id = wo.wip_entity_id
1648: AND wdj.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)
1649: AND wdj.wip_entity_id = p_wipEntityID
1650: AND wdj.organization_id = p_orgID;
1651: END IF;
1652:

Line 1665: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN

1661:
1662: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
1663: p_toOp IS NULL OR p_toStep IS NULL) THEN
1664: -- Call from WIP Completion form
1665: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
1666: -- Ccmpletion transaction
1667: l_fm_op := l_last_op;
1668: l_fm_step := WIP_CONSTANTS.TOMOVE;
1669: l_to_op := NULL;

Line 1668: l_fm_step := WIP_CONSTANTS.TOMOVE;

1664: -- Call from WIP Completion form
1665: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
1666: -- Ccmpletion transaction
1667: l_fm_op := l_last_op;
1668: l_fm_step := WIP_CONSTANTS.TOMOVE;
1669: l_to_op := NULL;
1670: l_to_step := NULL;
1671: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN
1672: -- Return transaction

Line 1671: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN

1667: l_fm_op := l_last_op;
1668: l_fm_step := WIP_CONSTANTS.TOMOVE;
1669: l_to_op := NULL;
1670: l_to_step := NULL;
1671: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN
1672: -- Return transaction
1673: l_fm_op := NULL;
1674: l_fm_step := NULL;
1675: l_to_op := l_last_op;

Line 1676: l_to_step := WIP_CONSTANTS.TOMOVE;

1672: -- Return transaction
1673: l_fm_op := NULL;
1674: l_fm_step := NULL;
1675: l_to_op := l_last_op;
1676: l_to_step := WIP_CONSTANTS.TOMOVE;
1677: END IF;
1678: ELSE -- call from WIP Move form
1679: l_fm_op := p_fmOp;
1680: l_fm_step := p_fmStep;

Line 1686: IF(p_entityType = WIP_CONSTANTS.REPETITIVE) THEN -- Repetitive schedule

1682: l_to_step := p_toStep;
1683: END IF; -- Call from WIP Completion form
1684:
1685: -- Check if repetitive schedule
1686: IF(p_entityType = WIP_CONSTANTS.REPETITIVE) THEN -- Repetitive schedule
1687: -- Fixed bug 5056289.Basically, we should not rely on the fact that p_fmOp
1688: -- will be null if call from Completion form. We should also check
1689: -- p_fmMoveProcessor. Since move processor will also pass null for p_fmOp
1690: -- for assembly pull item.

Line 1694: p_fmMoveProcessor = WIP_CONSTANTS.NO)) THEN

1690: -- for assembly pull item.
1691: IF((p_fmOp IS NULL OR p_fmStep IS NULL OR
1692: p_toOp IS NULL OR p_toStep IS NULL) AND
1693: (p_fmMoveProcessor IS NULL OR
1694: p_fmMoveProcessor = WIP_CONSTANTS.NO)) THEN
1695: -- Call from WIP Completion form, so use the allocation information in
1696: -- wip_mtl_allocations_temp. There is no need to call schedule_alloc
1697: -- again.
1698:

Line 1715: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

1711: p_batchID => p_batchID,
1712: p_orgID => p_orgID,
1713: p_assyQty => l_repAssyPull.primaryQty,
1714: p_txnDate => p_txnDate,
1715: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
1716: p_txnHdrID => p_txnHdrID,
1717: p_firstOp => -1,
1718: p_lastOP => l_last_op,
1719: p_firstMoveOp => null,

Line 1739: IF(p_fmMoveProcessor = WIP_CONSTANTS.YES) THEN

1735: END IF;
1736: END LOOP;
1737:
1738: ELSE
1739: IF(p_fmMoveProcessor = WIP_CONSTANTS.YES) THEN
1740: -- If call from move processor, no need to do schedule allocation again
1741: -- Instead, we should use the value in WMTA table.
1742: l_sche_count := 0;
1743: FOR l_wmta IN c_wmta (p_txn_id => p_movTxnID) LOOP

Line 1749: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN

1745: l_rsa(l_sche_count).scheID := l_wmta.rep_id;
1746: l_rsa(l_sche_count).scheQty := l_wmta.txn_qty;
1747: END LOOP;
1748: ELSIF(p_fmMoveProcessor IS NULL OR
1749: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN
1750: -- Check whether overcompletion transaction
1751: IF(p_ocQty IS NOT NULL) THEN
1752: l_oc_txn_type := WIP_CONSTANTS.PARENT_TXN;
1753: ELSE

Line 1752: l_oc_txn_type := WIP_CONSTANTS.PARENT_TXN;

1748: ELSIF(p_fmMoveProcessor IS NULL OR
1749: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN
1750: -- Check whether overcompletion transaction
1751: IF(p_ocQty IS NOT NULL) THEN
1752: l_oc_txn_type := WIP_CONSTANTS.PARENT_TXN;
1753: ELSE
1754: l_oc_txn_type := WIP_CONSTANTS.NORMAL_TXN;
1755: END IF;
1756: wip_movProc_priv.schedule_alloc(p_org_id => p_orgID,

Line 1754: l_oc_txn_type := WIP_CONSTANTS.NORMAL_TXN;

1750: -- Check whether overcompletion transaction
1751: IF(p_ocQty IS NOT NULL) THEN
1752: l_oc_txn_type := WIP_CONSTANTS.PARENT_TXN;
1753: ELSE
1754: l_oc_txn_type := WIP_CONSTANTS.NORMAL_TXN;
1755: END IF;
1756: wip_movProc_priv.schedule_alloc(p_org_id => p_orgID,
1757: p_wip_id => p_wipEntityID,
1758: p_line_id => p_lineID,

Line 1766: p_fm_form => WIP_CONSTANTS.YES,

1762: p_to_op => l_to_op,
1763: p_to_step => l_to_step,
1764: p_oc_txn_type => l_oc_txn_type,
1765: p_txnType => p_txnType,
1766: p_fm_form => WIP_CONSTANTS.YES,
1767: p_comp_alloc => WIP_CONSTANTS.NO,
1768: p_txn_date => p_txndate, /* bug 5373061 */
1769: x_proc_status => l_proc_status,
1770: x_sche_count => l_sche_count,

Line 1767: p_comp_alloc => WIP_CONSTANTS.NO,

1763: p_to_step => l_to_step,
1764: p_oc_txn_type => l_oc_txn_type,
1765: p_txnType => p_txnType,
1766: p_fm_form => WIP_CONSTANTS.YES,
1767: p_comp_alloc => WIP_CONSTANTS.NO,
1768: p_txn_date => p_txndate, /* bug 5373061 */
1769: x_proc_status => l_proc_status,
1770: x_sche_count => l_sche_count,
1771: x_rsa => l_rsa,

Line 1774: IF (l_logLevel <= wip_constants.full_logging) THEN

1770: x_sche_count => l_sche_count,
1771: x_rsa => l_rsa,
1772: x_returnStatus => l_returnStatus);
1773:
1774: IF (l_logLevel <= wip_constants.full_logging) THEN
1775: wip_logger.log(p_msg => 'l_proc_status = ' || l_proc_status,
1776: x_returnStatus => l_returnStatus);
1777: wip_logger.log(p_msg => 'l_sche_count = ' || l_sche_count,
1778: x_returnStatus => l_returnStatus);

Line 1793: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN

1789: fnd_message.set_token('ENTITY2', 'quantity available to move');
1790: fnd_msg_pub.add;
1791: l_errMsg := 'available qty is not enough to fullfill move txn';
1792: raise fnd_api.g_exc_unexpected_error;
1793: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN
1794: l_errMsg := 'wip_movProc_priv.schedule_alloc failed';
1795: raise fnd_api.g_exc_unexpected_error;
1796: END IF; -- check l_proc_status
1797: END IF; -- check p_fmMoveProcessor

Line 1799: IF (l_logLevel <= wip_constants.full_logging) THEN

1795: raise fnd_api.g_exc_unexpected_error;
1796: END IF; -- check l_proc_status
1797: END IF; -- check p_fmMoveProcessor
1798:
1799: IF (l_logLevel <= wip_constants.full_logging) THEN
1800: FOR i IN 1..l_sche_count LOOP
1801: wip_logger.log(p_msg => 'sche_id = ' || l_rsa(i).scheID,
1802: x_returnStatus => l_returnStatus);
1803: wip_logger.log(p_msg => 'txn_qty = ' || l_rsa(i).scheQty,

Line 1860: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,

1856: p_batchID => p_batchID,
1857: p_orgID => p_orgID,
1858: p_assyQty => l_rsa(i).scheQty * l_forward,
1859: p_txnDate => p_txnDate,
1860: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,
1861: p_txnHdrID => p_txnHdrID,
1862: p_firstOp => l_first_bf_op,
1863: p_lastOP => l_last_bf_op,
1864: p_firstMoveOp => l_fm_op,

Line 1935: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

1931: p_batchID => p_batchID,
1932: p_orgID => p_orgID,
1933: p_assyQty => l_rsa(i).scheQty * l_forward,
1934: p_txnDate => p_txnDate,
1935: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
1936: p_txnHdrID => p_txnHdrID,
1937: p_firstOp => l_first_bf_op,
1938: p_lastOP => l_last_bf_op,
1939: p_firstMoveOp => l_fm_op,

Line 1963: (p_txnType = WIP_CONSTANTS.COMP_TXN OR

1959:
1960: -- only do schedule allocation for completion if not call from move
1961: -- processor
1962: IF(p_cplTxnID IS NOT NULL AND
1963: (p_txnType = WIP_CONSTANTS.COMP_TXN OR
1964: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN
1965: IF(p_fmMoveProcessor = WIP_CONSTANTS.YES) THEN
1966: -- If call from move processor, no need to do schedule allocation
1967: -- again Instead, we should use the value in WMTA table.

Line 1964: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN

1960: -- only do schedule allocation for completion if not call from move
1961: -- processor
1962: IF(p_cplTxnID IS NOT NULL AND
1963: (p_txnType = WIP_CONSTANTS.COMP_TXN OR
1964: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN
1965: IF(p_fmMoveProcessor = WIP_CONSTANTS.YES) THEN
1966: -- If call from move processor, no need to do schedule allocation
1967: -- again Instead, we should use the value in WMTA table.
1968: l_sche_count := 0;

Line 1965: IF(p_fmMoveProcessor = WIP_CONSTANTS.YES) THEN

1961: -- processor
1962: IF(p_cplTxnID IS NOT NULL AND
1963: (p_txnType = WIP_CONSTANTS.COMP_TXN OR
1964: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN
1965: IF(p_fmMoveProcessor = WIP_CONSTANTS.YES) THEN
1966: -- If call from move processor, no need to do schedule allocation
1967: -- again Instead, we should use the value in WMTA table.
1968: l_sche_count := 0;
1969: FOR l_wmta IN c_wmta (p_txn_id => p_movTxnID) LOOP

Line 1975: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN

1971: l_rsa(l_sche_count).scheID := l_wmta.rep_id;
1972: l_rsa(l_sche_count).scheQty := l_wmta.txn_qty;
1973: END LOOP;
1974: ELSIF(p_fmMoveProcessor IS NULL OR
1975: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN
1976: wip_movProc_priv.schedule_alloc(
1977: p_org_id => p_orgID,
1978: p_wip_id => p_wipEntityID,
1979: p_line_id => p_lineID,

Line 1987: p_fm_form => WIP_CONSTANTS.YES,

1983: p_to_op => l_to_op,
1984: p_to_step => l_to_step,
1985: p_oc_txn_type => l_oc_txn_type,
1986: p_txnType => p_txnType,
1987: p_fm_form => WIP_CONSTANTS.YES,
1988: p_comp_alloc => WIP_CONSTANTS.YES,
1989: p_txn_date => p_txndate, /* bug 5373061 */
1990: x_proc_status => l_proc_status,
1991: x_sche_count => l_sche_count,

Line 1988: p_comp_alloc => WIP_CONSTANTS.YES,

1984: p_to_step => l_to_step,
1985: p_oc_txn_type => l_oc_txn_type,
1986: p_txnType => p_txnType,
1987: p_fm_form => WIP_CONSTANTS.YES,
1988: p_comp_alloc => WIP_CONSTANTS.YES,
1989: p_txn_date => p_txndate, /* bug 5373061 */
1990: x_proc_status => l_proc_status,
1991: x_sche_count => l_sche_count,
1992: x_rsa => l_rsa,

Line 1995: IF (l_logLevel <= wip_constants.full_logging) THEN

1991: x_sche_count => l_sche_count,
1992: x_rsa => l_rsa,
1993: x_returnStatus => l_returnStatus);
1994:
1995: IF (l_logLevel <= wip_constants.full_logging) THEN
1996: wip_logger.log(p_msg => 'l_proc_status = ' ||
1997: l_proc_status,
1998: x_returnStatus => l_returnStatus);
1999: wip_logger.log(p_msg => 'l_sche_count = ' ||

Line 2016: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN

2012: fnd_message.set_token('ENTITY2', 'quantity available to move');
2013: fnd_msg_pub.add;
2014: l_errMsg := 'available qty is not enough to fullfill move txn';
2015: raise fnd_api.g_exc_unexpected_error;
2016: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN
2017: l_errMsg := 'wip_movProc_priv.schedule_alloc failed';
2018: raise fnd_api.g_exc_unexpected_error;
2019: END IF; -- check l_proc_status
2020: END IF; -- check p_fmMoveProcessor

Line 2022: IF (l_logLevel <= wip_constants.full_logging) THEN

2018: raise fnd_api.g_exc_unexpected_error;
2019: END IF; -- check l_proc_status
2020: END IF; -- check p_fmMoveProcessor
2021:
2022: IF (l_logLevel <= wip_constants.full_logging) THEN
2023: FOR i IN 1..l_sche_count LOOP
2024: wip_logger.log(p_msg => 'sche_id = ' || l_rsa(i).scheID,
2025: x_returnStatus => l_returnStatus);
2026: wip_logger.log(p_msg => 'txn_qty = ' || l_rsa(i).scheQty,

Line 2033: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN

2029: END IF;
2030:
2031: -- If Completion or Return txns, we have to backflush Assembly
2032: -- pull components too
2033: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
2034: l_forward := 1;
2035: ELSE
2036: l_forward := -1;
2037: END IF;

Line 2059: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

2055: p_batchID => p_batchID,
2056: p_orgID => p_orgID,
2057: p_assyQty => l_rsa(i).scheQty * l_forward,
2058: p_txnDate => p_txnDate,
2059: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
2060: p_txnHdrID => p_txnHdrID,
2061: p_firstOp => -1,
2062: p_lastOP => l_last_op,
2063: p_firstMoveOp => null,

Line 2086: IF(p_fmMoveProcessor = WIP_CONSTANTS.YES) THEN

2082: END IF; -- call from completion form
2083: -- Check whether overcompletion
2084: IF(p_childMovTxnID IS NOT NULL AND p_ocQty IS NOT NULL) THEN
2085: -- overmove/overcomplete
2086: IF(p_fmMoveProcessor = WIP_CONSTANTS.YES) THEN
2087: -- If call from move processor, no need to do schedule allocation
2088: -- again. Instead, we should use the value in WMTA table.
2089: l_sche_count := 0;
2090: FOR l_wmta IN c_wmta (p_txn_id => p_childMovTxnID) LOOP

Line 2096: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN

2092: l_rsa(l_sche_count).scheID := l_wmta.rep_id;
2093: l_rsa(l_sche_count).scheQty := l_wmta.txn_qty;
2094: END LOOP;
2095: ELSIF(p_fmMoveProcessor IS NULL OR
2096: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN
2097: l_oc_txn_type := WIP_CONSTANTS.CHILD_TXN;
2098: l_fm_op := l_first_op;
2099: l_fm_step := WIP_CONSTANTS.QUEUE;
2100: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR

Line 2097: l_oc_txn_type := WIP_CONSTANTS.CHILD_TXN;

2093: l_rsa(l_sche_count).scheQty := l_wmta.txn_qty;
2094: END LOOP;
2095: ELSIF(p_fmMoveProcessor IS NULL OR
2096: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN
2097: l_oc_txn_type := WIP_CONSTANTS.CHILD_TXN;
2098: l_fm_op := l_first_op;
2099: l_fm_step := WIP_CONSTANTS.QUEUE;
2100: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
2101: p_toOp IS NULL OR p_toStep IS NULL) THEN

Line 2099: l_fm_step := WIP_CONSTANTS.QUEUE;

2095: ELSIF(p_fmMoveProcessor IS NULL OR
2096: p_fmMoveProcessor = WIP_CONSTANTS.NO) THEN
2097: l_oc_txn_type := WIP_CONSTANTS.CHILD_TXN;
2098: l_fm_op := l_first_op;
2099: l_fm_step := WIP_CONSTANTS.QUEUE;
2100: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
2101: p_toOp IS NULL OR p_toStep IS NULL) THEN
2102: -- Call from Completion form
2103: l_to_op := l_last_op;

Line 2104: l_to_step := WIP_CONSTANTS.TOMOVE;

2100: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
2101: p_toOp IS NULL OR p_toStep IS NULL) THEN
2102: -- Call from Completion form
2103: l_to_op := l_last_op;
2104: l_to_step := WIP_CONSTANTS.TOMOVE;
2105: ELSE -- Call from WIP Move or OSFM Move forms
2106: l_to_op := p_fmOp;
2107: l_to_step := p_fmStep;
2108: END IF;

Line 2120: p_fm_form => WIP_CONSTANTS.YES,

2116: p_to_op => l_to_op,
2117: p_to_step => l_to_step,
2118: p_oc_txn_type => l_oc_txn_type,
2119: p_txnType => p_txnType,
2120: p_fm_form => WIP_CONSTANTS.YES,
2121: p_comp_alloc => WIP_CONSTANTS.NO,
2122: p_txn_date => p_txndate, /* bug 5373061 */
2123: x_proc_status => l_proc_status,
2124: x_sche_count => l_sche_count,

Line 2121: p_comp_alloc => WIP_CONSTANTS.NO,

2117: p_to_step => l_to_step,
2118: p_oc_txn_type => l_oc_txn_type,
2119: p_txnType => p_txnType,
2120: p_fm_form => WIP_CONSTANTS.YES,
2121: p_comp_alloc => WIP_CONSTANTS.NO,
2122: p_txn_date => p_txndate, /* bug 5373061 */
2123: x_proc_status => l_proc_status,
2124: x_sche_count => l_sche_count,
2125: x_rsa => l_rsa,

Line 2128: IF (l_logLevel <= wip_constants.full_logging) THEN

2124: x_sche_count => l_sche_count,
2125: x_rsa => l_rsa,
2126: x_returnStatus => l_returnStatus);
2127:
2128: IF (l_logLevel <= wip_constants.full_logging) THEN
2129: wip_logger.log(p_msg => 'l_proc_status = ' ||
2130: l_proc_status,
2131: x_returnStatus => l_returnStatus);
2132: wip_logger.log(p_msg => 'l_sche_count = ' ||

Line 2149: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN

2145: fnd_message.set_token('ENTITY2', 'quantity available to move');
2146: fnd_msg_pub.add;
2147: l_errMsg := 'available qty is not enough to fullfill move txn';
2148: raise fnd_api.g_exc_unexpected_error;
2149: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN
2150: l_errMsg := 'wip_movProc_priv.schedule_alloc failed';
2151: raise fnd_api.g_exc_unexpected_error;
2152: END IF; -- check l_proc_status
2153: END IF; -- check p_fmMoveProcessor

Line 2155: IF (l_logLevel <= wip_constants.full_logging) THEN

2151: raise fnd_api.g_exc_unexpected_error;
2152: END IF; -- check l_proc_status
2153: END IF; -- check p_fmMoveProcessor
2154:
2155: IF (l_logLevel <= wip_constants.full_logging) THEN
2156: FOR i IN 1..l_sche_count LOOP
2157: wip_logger.log(p_msg => 'sche_id = ' || l_rsa(i).scheID,
2158: x_returnStatus => l_returnStatus);
2159: wip_logger.log(p_msg => 'txn_qty = ' || l_rsa(i).scheQty,

Line 2211: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,

2207: p_batchID => p_batchID,
2208: p_orgID => p_orgID,
2209: p_assyQty => l_rsa(i).scheQty * l_forward,
2210: p_txnDate => p_txnDate,
2211: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,
2212: p_txnHdrID => p_txnHdrID,
2213: p_firstOp => l_first_bf_op,
2214: p_lastOP => l_last_bf_op,
2215: p_firstMoveOp => l_fm_op,

Line 2285: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

2281: p_batchID => p_batchID,
2282: p_orgID => p_orgID,
2283: p_assyQty => l_rsa(i).scheQty * l_forward,
2284: p_txnDate => p_txnDate,
2285: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
2286: p_txnHdrID => p_txnHdrID,
2287: p_firstOp => l_first_bf_op,
2288: p_lastOP => l_last_bf_op,
2289: p_firstMoveOp => l_fm_op,

Line 2348: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,

2344: p_batchID => p_batchID,
2345: p_orgID => p_orgID,
2346: p_assyQty => l_bf_qty,
2347: p_txnDate => p_txnDate,
2348: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,
2349: p_txnHdrID => p_txnHdrID,
2350: p_firstOp => l_first_bf_op,
2351: p_lastOP => l_last_bf_op,
2352: p_firstMoveOp => l_fm_op,

Line 2415: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

2411: p_batchID => p_batchID,
2412: p_orgID => p_orgID,
2413: p_assyQty => l_bf_qty,
2414: p_txnDate => p_txnDate,
2415: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
2416: p_txnHdrID => p_txnHdrID,
2417: p_firstOp => l_first_bf_op,
2418: p_lastOP => l_last_bf_op,
2419: p_firstMoveOp => l_fm_op,

Line 2440: (p_txnType = WIP_CONSTANTS.COMP_TXN OR

2436: END IF; -- l_first_bf_op <> -1
2437: END IF; -- call from Move form
2438:
2439: IF(p_cplTxnID IS NOT NULL AND
2440: (p_txnType = WIP_CONSTANTS.COMP_TXN OR
2441: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN
2442:
2443: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
2444: l_bf_qty := p_primaryQty;

Line 2441: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN

2437: END IF; -- call from Move form
2438:
2439: IF(p_cplTxnID IS NOT NULL AND
2440: (p_txnType = WIP_CONSTANTS.COMP_TXN OR
2441: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN
2442:
2443: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
2444: l_bf_qty := p_primaryQty;
2445: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN

Line 2443: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN

2439: IF(p_cplTxnID IS NOT NULL AND
2440: (p_txnType = WIP_CONSTANTS.COMP_TXN OR
2441: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN
2442:
2443: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
2444: l_bf_qty := p_primaryQty;
2445: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN
2446: l_bf_qty := -1 * p_primaryQty;
2447: END IF;

Line 2445: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN

2441: p_txnType = WIP_CONSTANTS.RET_TXN)) THEN
2442:
2443: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
2444: l_bf_qty := p_primaryQty;
2445: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN
2446: l_bf_qty := -1 * p_primaryQty;
2447: END IF;
2448: wip_bflProc_priv.processRequirements
2449: (p_wipEntityID => p_wipEntityID,

Line 2462: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

2458: p_batchID => p_batchID,
2459: p_orgID => p_orgID,
2460: p_assyQty => l_bf_qty,
2461: p_txnDate => p_txnDate,
2462: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
2463: p_txnHdrID => p_txnHdrID,
2464: p_firstOp => -1,
2465: p_lastOP => l_last_op,
2466: p_firstMoveOp => null,

Line 2489: l_fm_step := WIP_CONSTANTS.QUEUE;

2485: -- Check whether overcompletion
2486: IF(p_childMovTxnID IS NOT NULL AND p_ocQty IS NOT NULL) THEN
2487: -- overmove/overcomplete
2488: l_fm_op := l_first_op;
2489: l_fm_step := WIP_CONSTANTS.QUEUE;
2490: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
2491: p_toOp IS NULL OR p_toStep IS NULL) THEN
2492: -- Call from Completion form
2493: l_to_op := l_last_op;

Line 2494: l_to_step := WIP_CONSTANTS.TOMOVE;

2490: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
2491: p_toOp IS NULL OR p_toStep IS NULL) THEN
2492: -- Call from Completion form
2493: l_to_op := l_last_op;
2494: l_to_step := WIP_CONSTANTS.TOMOVE;
2495: ELSE -- Call from WIP Move or OSFM Move forms
2496: l_to_op := p_fmOp;
2497: l_to_step := p_fmStep;
2498: END IF;

Line 2540: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,

2536: p_batchID => p_batchID,
2537: p_orgID => p_orgID,
2538: p_assyQty => l_bf_qty,
2539: p_txnDate => p_txnDate,
2540: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,
2541: p_txnHdrID => p_txnHdrID,
2542: p_firstOp => l_first_bf_op,
2543: p_lastOP => l_last_bf_op,
2544: p_firstMoveOp => l_fm_op,

Line 2606: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

2602: p_batchID => p_batchID,
2603: p_orgID => p_orgID,
2604: p_assyQty => l_bf_qty,
2605: p_txnDate => p_txnDate,
2606: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
2607: p_txnHdrID => p_txnHdrID,
2608: p_firstOp => l_first_bf_op,
2609: p_lastOP => l_last_bf_op,
2610: p_firstMoveOp => l_fm_op,

Line 2635: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,

2631: SELECT COUNT(*)
2632: INTO l_bf_count
2633: FROM mtl_transactions_interface
2634: WHERE transaction_header_id = p_txnHdrID
2635: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2636: WIP_CONSTANTS.RETCOMP_ACTION,
2637: WIP_CONSTANTS.ISSNEGC_ACTION,
2638: WIP_CONSTANTS.RETNEGC_ACTION);
2639: SELECT COUNT(*)

Line 2636: WIP_CONSTANTS.RETCOMP_ACTION,

2632: INTO l_bf_count
2633: FROM mtl_transactions_interface
2634: WHERE transaction_header_id = p_txnHdrID
2635: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2636: WIP_CONSTANTS.RETCOMP_ACTION,
2637: WIP_CONSTANTS.ISSNEGC_ACTION,
2638: WIP_CONSTANTS.RETNEGC_ACTION);
2639: SELECT COUNT(*)
2640: INTO l_lot_ser_count

Line 2637: WIP_CONSTANTS.ISSNEGC_ACTION,

2633: FROM mtl_transactions_interface
2634: WHERE transaction_header_id = p_txnHdrID
2635: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2636: WIP_CONSTANTS.RETCOMP_ACTION,
2637: WIP_CONSTANTS.ISSNEGC_ACTION,
2638: WIP_CONSTANTS.RETNEGC_ACTION);
2639: SELECT COUNT(*)
2640: INTO l_lot_ser_count
2641: FROM mtl_transactions_interface mti,

Line 2638: WIP_CONSTANTS.RETNEGC_ACTION);

2634: WHERE transaction_header_id = p_txnHdrID
2635: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2636: WIP_CONSTANTS.RETCOMP_ACTION,
2637: WIP_CONSTANTS.ISSNEGC_ACTION,
2638: WIP_CONSTANTS.RETNEGC_ACTION);
2639: SELECT COUNT(*)
2640: INTO l_lot_ser_count
2641: FROM mtl_transactions_interface mti,
2642: mtl_system_items msi

Line 2645: AND (msi.lot_control_code = WIP_CONSTANTS.LOT

2641: FROM mtl_transactions_interface mti,
2642: mtl_system_items msi
2643: WHERE mti.organization_id = msi.organization_id
2644: AND mti.inventory_item_id = msi.inventory_item_id
2645: AND (msi.lot_control_code = WIP_CONSTANTS.LOT
2646: OR
2647: msi.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2648: WIP_CONSTANTS.DYN_RCV_SN))
2649: AND transaction_header_id = p_txnHdrID

Line 2647: msi.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,

2643: WHERE mti.organization_id = msi.organization_id
2644: AND mti.inventory_item_id = msi.inventory_item_id
2645: AND (msi.lot_control_code = WIP_CONSTANTS.LOT
2646: OR
2647: msi.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2648: WIP_CONSTANTS.DYN_RCV_SN))
2649: AND transaction_header_id = p_txnHdrID
2650: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2651: WIP_CONSTANTS.RETCOMP_ACTION,

Line 2648: WIP_CONSTANTS.DYN_RCV_SN))

2644: AND mti.inventory_item_id = msi.inventory_item_id
2645: AND (msi.lot_control_code = WIP_CONSTANTS.LOT
2646: OR
2647: msi.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2648: WIP_CONSTANTS.DYN_RCV_SN))
2649: AND transaction_header_id = p_txnHdrID
2650: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2651: WIP_CONSTANTS.RETCOMP_ACTION,
2652: WIP_CONSTANTS.ISSNEGC_ACTION,

Line 2650: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,

2646: OR
2647: msi.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2648: WIP_CONSTANTS.DYN_RCV_SN))
2649: AND transaction_header_id = p_txnHdrID
2650: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2651: WIP_CONSTANTS.RETCOMP_ACTION,
2652: WIP_CONSTANTS.ISSNEGC_ACTION,
2653: WIP_CONSTANTS.RETNEGC_ACTION);
2654:

Line 2651: WIP_CONSTANTS.RETCOMP_ACTION,

2647: msi.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2648: WIP_CONSTANTS.DYN_RCV_SN))
2649: AND transaction_header_id = p_txnHdrID
2650: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2651: WIP_CONSTANTS.RETCOMP_ACTION,
2652: WIP_CONSTANTS.ISSNEGC_ACTION,
2653: WIP_CONSTANTS.RETNEGC_ACTION);
2654:
2655:

Line 2652: WIP_CONSTANTS.ISSNEGC_ACTION,

2648: WIP_CONSTANTS.DYN_RCV_SN))
2649: AND transaction_header_id = p_txnHdrID
2650: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2651: WIP_CONSTANTS.RETCOMP_ACTION,
2652: WIP_CONSTANTS.ISSNEGC_ACTION,
2653: WIP_CONSTANTS.RETNEGC_ACTION);
2654:
2655:
2656: SELECT backflush_lot_entry_type

Line 2653: WIP_CONSTANTS.RETNEGC_ACTION);

2649: AND transaction_header_id = p_txnHdrID
2650: AND transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2651: WIP_CONSTANTS.RETCOMP_ACTION,
2652: WIP_CONSTANTS.ISSNEGC_ACTION,
2653: WIP_CONSTANTS.RETNEGC_ACTION);
2654:
2655:
2656: SELECT backflush_lot_entry_type
2657: INTO l_lot_entry_type

Line 2663: x_bfRequired := WIP_CONSTANTS.WBF_NOBF;

2659: WHERE organization_id = p_orgID;
2660:
2661: IF(l_bf_count = 0) THEN
2662: -- There is no backflush components required for this transaction
2663: x_bfRequired := WIP_CONSTANTS.WBF_NOBF;
2664: x_lotSerRequired := WIP_CONSTANTS.NO;
2665: ELSE
2666: IF(l_lot_ser_count = 0) THEN
2667: -- no component under lot/serial control

Line 2664: x_lotSerRequired := WIP_CONSTANTS.NO;

2660:
2661: IF(l_bf_count = 0) THEN
2662: -- There is no backflush components required for this transaction
2663: x_bfRequired := WIP_CONSTANTS.WBF_NOBF;
2664: x_lotSerRequired := WIP_CONSTANTS.NO;
2665: ELSE
2666: IF(l_lot_ser_count = 0) THEN
2667: -- no component under lot/serial control
2668: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;

Line 2668: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;

2664: x_lotSerRequired := WIP_CONSTANTS.NO;
2665: ELSE
2666: IF(l_lot_ser_count = 0) THEN
2667: -- no component under lot/serial control
2668: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;
2669: x_lotSerRequired := WIP_CONSTANTS.NO;
2670: ELSE
2671: IF(l_lot_entry_type = WIP_CONSTANTS.MAN_ENTRY) THEN
2672: -- If backflush lot entry type is set to manual, no need to do lot

Line 2669: x_lotSerRequired := WIP_CONSTANTS.NO;

2665: ELSE
2666: IF(l_lot_ser_count = 0) THEN
2667: -- no component under lot/serial control
2668: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;
2669: x_lotSerRequired := WIP_CONSTANTS.NO;
2670: ELSE
2671: IF(l_lot_entry_type = WIP_CONSTANTS.MAN_ENTRY) THEN
2672: -- If backflush lot entry type is set to manual, no need to do lot
2673: -- derivation

Line 2671: IF(l_lot_entry_type = WIP_CONSTANTS.MAN_ENTRY) THEN

2667: -- no component under lot/serial control
2668: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;
2669: x_lotSerRequired := WIP_CONSTANTS.NO;
2670: ELSE
2671: IF(l_lot_entry_type = WIP_CONSTANTS.MAN_ENTRY) THEN
2672: -- If backflush lot entry type is set to manual, no need to do lot
2673: -- derivation
2674: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2675: x_lotSerRequired := WIP_CONSTANTS.YES;

Line 2674: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;

2670: ELSE
2671: IF(l_lot_entry_type = WIP_CONSTANTS.MAN_ENTRY) THEN
2672: -- If backflush lot entry type is set to manual, no need to do lot
2673: -- derivation
2674: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2675: x_lotSerRequired := WIP_CONSTANTS.YES;
2676: ELSE
2677: -- derive lot for both Operation Pull and Assembly Pull components
2678: wip_autoLotProc_priv.deriveLotsFromMTI

Line 2675: x_lotSerRequired := WIP_CONSTANTS.YES;

2671: IF(l_lot_entry_type = WIP_CONSTANTS.MAN_ENTRY) THEN
2672: -- If backflush lot entry type is set to manual, no need to do lot
2673: -- derivation
2674: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2675: x_lotSerRequired := WIP_CONSTANTS.YES;
2676: ELSE
2677: -- derive lot for both Operation Pull and Assembly Pull components
2678: wip_autoLotProc_priv.deriveLotsFromMTI
2679: (p_orgID => p_orgID,

Line 2692: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;

2688: IF(l_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN
2689: l_errMsg := 'wip_autoLotProc_priv.deriveLotsFromMTI failed';
2690: raise fnd_api.g_exc_unexpected_error;
2691: ELSIF(l_returnStatus = fnd_api.g_ret_sts_error) THEN
2692: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2693: x_lotSerRequired := WIP_CONSTANTS.YES;
2694: ELSE -- succesfully derived lot
2695: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2696: WIP_CONSTANTS.EXPDATE_FULL,

Line 2693: x_lotSerRequired := WIP_CONSTANTS.YES;

2689: l_errMsg := 'wip_autoLotProc_priv.deriveLotsFromMTI failed';
2690: raise fnd_api.g_exc_unexpected_error;
2691: ELSIF(l_returnStatus = fnd_api.g_ret_sts_error) THEN
2692: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2693: x_lotSerRequired := WIP_CONSTANTS.YES;
2694: ELSE -- succesfully derived lot
2695: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2696: WIP_CONSTANTS.EXPDATE_FULL,
2697: /* Added for Wilson Greatbatch Enhancement */

Line 2695: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,

2691: ELSIF(l_returnStatus = fnd_api.g_ret_sts_error) THEN
2692: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2693: x_lotSerRequired := WIP_CONSTANTS.YES;
2694: ELSE -- succesfully derived lot
2695: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2696: WIP_CONSTANTS.EXPDATE_FULL,
2697: /* Added for Wilson Greatbatch Enhancement */
2698: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2699: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;

Line 2696: WIP_CONSTANTS.EXPDATE_FULL,

2692: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2693: x_lotSerRequired := WIP_CONSTANTS.YES;
2694: ELSE -- succesfully derived lot
2695: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2696: WIP_CONSTANTS.EXPDATE_FULL,
2697: /* Added for Wilson Greatbatch Enhancement */
2698: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2699: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2700: x_lotSerRequired := WIP_CONSTANTS.NO;

Line 2698: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN

2694: ELSE -- succesfully derived lot
2695: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2696: WIP_CONSTANTS.EXPDATE_FULL,
2697: /* Added for Wilson Greatbatch Enhancement */
2698: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2699: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2700: x_lotSerRequired := WIP_CONSTANTS.NO;
2701: ELSE -- backflush lot entry page is exception only
2702: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;

Line 2699: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;

2695: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2696: WIP_CONSTANTS.EXPDATE_FULL,
2697: /* Added for Wilson Greatbatch Enhancement */
2698: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2699: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2700: x_lotSerRequired := WIP_CONSTANTS.NO;
2701: ELSE -- backflush lot entry page is exception only
2702: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;
2703: x_lotSerRequired := WIP_CONSTANTS.NO;

Line 2700: x_lotSerRequired := WIP_CONSTANTS.NO;

2696: WIP_CONSTANTS.EXPDATE_FULL,
2697: /* Added for Wilson Greatbatch Enhancement */
2698: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2699: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2700: x_lotSerRequired := WIP_CONSTANTS.NO;
2701: ELSE -- backflush lot entry page is exception only
2702: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;
2703: x_lotSerRequired := WIP_CONSTANTS.NO;
2704: END IF;

Line 2702: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;

2698: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2699: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2700: x_lotSerRequired := WIP_CONSTANTS.NO;
2701: ELSE -- backflush lot entry page is exception only
2702: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;
2703: x_lotSerRequired := WIP_CONSTANTS.NO;
2704: END IF;
2705: END IF; -- check return status
2706: END IF; -- check lot entry type

Line 2703: x_lotSerRequired := WIP_CONSTANTS.NO;

2699: x_bfRequired := WIP_CONSTANTS.WBF_BF_PAGE;
2700: x_lotSerRequired := WIP_CONSTANTS.NO;
2701: ELSE -- backflush lot entry page is exception only
2702: x_bfRequired := WIP_CONSTANTS.WBF_BF_NOPAGE;
2703: x_lotSerRequired := WIP_CONSTANTS.NO;
2704: END IF;
2705: END IF; -- check return status
2706: END IF; -- check lot entry type
2707: END IF; -- l_lot_ser_count = 0

Line 2710: IF(p_tblName = WIP_CONSTANTS.MMTT_TBL) THEN

2706: END IF; -- check lot entry type
2707: END IF; -- l_lot_ser_count = 0
2708: END IF; -- l_bf_count = 0
2709:
2710: IF(p_tblName = WIP_CONSTANTS.MMTT_TBL) THEN
2711: -- Move record from mti to mmtt
2712: wip_mtlTempProc_priv.validateInterfaceTxns(
2713: p_txnHdrID => p_txnHdrID,
2714: p_addMsgToStack => fnd_api.g_true,

Line 2726: IF(x_bfRequired = WIP_CONSTANTS.WBF_BF_PAGE)THEN

2722: END IF;
2723:
2724: -- Insert all necessary info that need to be used by inventory form to
2725: -- gather lot/serial from the user
2726: IF(x_bfRequired = WIP_CONSTANTS.WBF_BF_PAGE)THEN
2727: UPDATE mtl_material_transactions_temp mmtt
2728: SET (mmtt.item_segments,
2729: mmtt.item_description,
2730: mmtt.item_trx_enabled_flag,

Line 2785: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,

2781: WHERE mmtt.transaction_header_id = p_txnHdrID
2782: AND mmtt.department_id IS NOT NULL;
2783:
2784: /*Update MMTT Lot number if only one lot is derived */
2785: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2786: WIP_CONSTANTS.EXPDATE_FULL,
2787: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2788:
2789: UPDATE mtl_material_transactions_temp mmtt

Line 2786: WIP_CONSTANTS.EXPDATE_FULL,

2782: AND mmtt.department_id IS NOT NULL;
2783:
2784: /*Update MMTT Lot number if only one lot is derived */
2785: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2786: WIP_CONSTANTS.EXPDATE_FULL,
2787: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2788:
2789: UPDATE mtl_material_transactions_temp mmtt
2790: SET mmtt.lot_number =

Line 2787: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN

2783:
2784: /*Update MMTT Lot number if only one lot is derived */
2785: IF(l_lot_entry_type IN (WIP_CONSTANTS.RECDATE_FULL,
2786: WIP_CONSTANTS.EXPDATE_FULL,
2787: WIP_CONSTANTS.TXNHISTORY_FULL)) THEN
2788:
2789: UPDATE mtl_material_transactions_temp mmtt
2790: SET mmtt.lot_number =
2791: ( SELECT mtlt.lot_number

Line 2799: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,

2795: FROM mtl_transaction_lots_temp mtlt
2796: WHERE mmtt.transaction_temp_id = mtlt.transaction_temp_id)
2797: )
2798: WHERE mmtt.transaction_header_id = p_txnHdrID
2799: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2800: WIP_CONSTANTS.RETCOMP_ACTION,
2801: WIP_CONSTANTS.ISSNEGC_ACTION,
2802: WIP_CONSTANTS.RETNEGC_ACTION);
2803:

Line 2800: WIP_CONSTANTS.RETCOMP_ACTION,

2796: WHERE mmtt.transaction_temp_id = mtlt.transaction_temp_id)
2797: )
2798: WHERE mmtt.transaction_header_id = p_txnHdrID
2799: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2800: WIP_CONSTANTS.RETCOMP_ACTION,
2801: WIP_CONSTANTS.ISSNEGC_ACTION,
2802: WIP_CONSTANTS.RETNEGC_ACTION);
2803:
2804: /* Bug 6342487 - FP of Bug 6111292 - Moved this delete statement from below */

Line 2801: WIP_CONSTANTS.ISSNEGC_ACTION,

2797: )
2798: WHERE mmtt.transaction_header_id = p_txnHdrID
2799: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2800: WIP_CONSTANTS.RETCOMP_ACTION,
2801: WIP_CONSTANTS.ISSNEGC_ACTION,
2802: WIP_CONSTANTS.RETNEGC_ACTION);
2803:
2804: /* Bug 6342487 - FP of Bug 6111292 - Moved this delete statement from below */
2805: DELETE FROM mtl_transaction_lots_temp mtlt

Line 2802: WIP_CONSTANTS.RETNEGC_ACTION);

2798: WHERE mmtt.transaction_header_id = p_txnHdrID
2799: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.ISSCOMP_ACTION,
2800: WIP_CONSTANTS.RETCOMP_ACTION,
2801: WIP_CONSTANTS.ISSNEGC_ACTION,
2802: WIP_CONSTANTS.RETNEGC_ACTION);
2803:
2804: /* Bug 6342487 - FP of Bug 6111292 - Moved this delete statement from below */
2805: DELETE FROM mtl_transaction_lots_temp mtlt
2806: WHERE EXISTS

Line 2813: AND we.entity_type = wip_constants.lotbased

2809: wip_entities we
2810: WHERE mmtt.transaction_header_id = p_txnHdrID
2811: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
2812: AND mmtt.transaction_source_id = we.wip_entity_id
2813: AND we.entity_type = wip_constants.lotbased
2814: AND 1 = (SELECT count(*)
2815: FROM mtl_transaction_lots_temp mtlt2
2816: WHERE mtlt2.transaction_temp_id =
2817: mtlt.transaction_temp_id

Line 2836: AND we.entity_type = wip_constants.lotbased

2832: WHERE mmtt.transaction_temp_id =
2833: mtlt.transaction_temp_id
2834: )
2835: AND mmtt.transaction_source_id = we.wip_entity_id
2836: AND we.entity_type = wip_constants.lotbased
2837: ) ;
2838: */
2839: /* Bug 6342487 - FP of Bug 6111292 - Moved this delete statement above inside the IF condition. The rows should be deleted from MTLT
2840: only for the case of Lot Verification=All after the lot has been stamped on MMTT. For Lot Verification=Exception Only

Line 2850: AND we.entity_type = wip_constants.lotbased

2846: wip_entities we
2847: WHERE mmtt.transaction_header_id = p_txnHdrID
2848: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
2849: AND mmtt.transaction_source_id = we.wip_entity_id
2850: AND we.entity_type = wip_constants.lotbased
2851: AND 1 = (SELECT count(*)
2852: FROM mtl_transaction_lots_temp mtlt2
2853: WHERE mtlt2.transaction_temp_id =
2854: mtlt.transaction_temp_id

Line 2870: AND (mmtt.item_serial_control_code IN(WIP_CONSTANTS.FULL_SN,

2866: (SELECT NVL(SUM(mtlt.transaction_quantity),0)
2867: FROM mtl_transaction_lots_temp mtlt
2868: WHERE mmtt.transaction_temp_id = mtlt.transaction_temp_id)
2869: WHERE mmtt.transaction_header_id = p_txnHdrID
2870: AND (mmtt.item_serial_control_code IN(WIP_CONSTANTS.FULL_SN,
2871: WIP_CONSTANTS.DYN_RCV_SN)
2872: OR
2873: mmtt.item_lot_control_code = WIP_CONSTANTS.LOT);
2874: */

Line 2871: WIP_CONSTANTS.DYN_RCV_SN)

2867: FROM mtl_transaction_lots_temp mtlt
2868: WHERE mmtt.transaction_temp_id = mtlt.transaction_temp_id)
2869: WHERE mmtt.transaction_header_id = p_txnHdrID
2870: AND (mmtt.item_serial_control_code IN(WIP_CONSTANTS.FULL_SN,
2871: WIP_CONSTANTS.DYN_RCV_SN)
2872: OR
2873: mmtt.item_lot_control_code = WIP_CONSTANTS.LOT);
2874: */
2875: END IF; -- x_bfRequired = WIP_CONSTANTS.WBF_BF_PAGE

Line 2873: mmtt.item_lot_control_code = WIP_CONSTANTS.LOT);

2869: WHERE mmtt.transaction_header_id = p_txnHdrID
2870: AND (mmtt.item_serial_control_code IN(WIP_CONSTANTS.FULL_SN,
2871: WIP_CONSTANTS.DYN_RCV_SN)
2872: OR
2873: mmtt.item_lot_control_code = WIP_CONSTANTS.LOT);
2874: */
2875: END IF; -- x_bfRequired = WIP_CONSTANTS.WBF_BF_PAGE
2876: END IF; -- WIP_CONSTANTS.MMTT_TBL
2877:

Line 2875: END IF; -- x_bfRequired = WIP_CONSTANTS.WBF_BF_PAGE

2871: WIP_CONSTANTS.DYN_RCV_SN)
2872: OR
2873: mmtt.item_lot_control_code = WIP_CONSTANTS.LOT);
2874: */
2875: END IF; -- x_bfRequired = WIP_CONSTANTS.WBF_BF_PAGE
2876: END IF; -- WIP_CONSTANTS.MMTT_TBL
2877:
2878: x_returnStatus := fnd_api.g_ret_sts_success;
2879: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 2876: END IF; -- WIP_CONSTANTS.MMTT_TBL

2872: OR
2873: mmtt.item_lot_control_code = WIP_CONSTANTS.LOT);
2874: */
2875: END IF; -- x_bfRequired = WIP_CONSTANTS.WBF_BF_PAGE
2876: END IF; -- WIP_CONSTANTS.MMTT_TBL
2877:
2878: x_returnStatus := fnd_api.g_ret_sts_success;
2879: IF (l_logLevel <= wip_constants.trace_logging) THEN
2880: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.backflush',

Line 2879: IF (l_logLevel <= wip_constants.trace_logging) THEN

2875: END IF; -- x_bfRequired = WIP_CONSTANTS.WBF_BF_PAGE
2876: END IF; -- WIP_CONSTANTS.MMTT_TBL
2877:
2878: x_returnStatus := fnd_api.g_ret_sts_success;
2879: IF (l_logLevel <= wip_constants.trace_logging) THEN
2880: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.backflush',
2881: p_procReturnStatus => x_returnStatus,
2882: p_msg => 'Succesfully inserted components into MMTT',
2883: x_returnStatus => l_returnStatus);

Line 2889: IF (l_logLevel <= wip_constants.trace_logging) THEN

2885: EXCEPTION
2886: WHEN fnd_api.g_exc_unexpected_error THEN
2887: ROLLBACK TO SAVEPOINT s_backflush;
2888: x_returnStatus := fnd_api.g_ret_sts_error;
2889: IF (l_logLevel <= wip_constants.trace_logging) THEN
2890: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.backflush',
2891: p_procReturnStatus => x_returnStatus,
2892: p_msg => l_errMsg,
2893: x_returnStatus => l_returnStatus);

Line 2898: IF (l_logLevel <= wip_constants.trace_logging) THEN

2894: END IF;
2895: WHEN others THEN
2896: ROLLBACK TO SAVEPOINT s_backflush;
2897: x_returnStatus := fnd_api.g_ret_sts_error;
2898: IF (l_logLevel <= wip_constants.trace_logging) THEN
2899: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.backflush',
2900: p_procReturnStatus => x_returnStatus,
2901: p_msg => 'Unexpected error : ' || SQLERRM,
2902: x_returnStatus => l_returnStatus);

Line 2913: IF(l_curItem.transaction_action_id = WIP_CONSTANTS.RETNEGC_ACTION

2909: l_curItem system.wip_component_obj_t;
2910: BEGIN
2911: LOOP
2912: IF(p_compInfo.getCurrentItem(l_curItem)) THEN
2913: IF(l_curItem.transaction_action_id = WIP_CONSTANTS.RETNEGC_ACTION
2914: AND
2915: (l_curItem.lot_control_code = WIP_CONSTANTS.LOT
2916: OR
2917: l_curItem.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,

Line 2915: (l_curItem.lot_control_code = WIP_CONSTANTS.LOT

2911: LOOP
2912: IF(p_compInfo.getCurrentItem(l_curItem)) THEN
2913: IF(l_curItem.transaction_action_id = WIP_CONSTANTS.RETNEGC_ACTION
2914: AND
2915: (l_curItem.lot_control_code = WIP_CONSTANTS.LOT
2916: OR
2917: l_curItem.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2918: WIP_CONSTANTS.DYN_RCV_SN))
2919: ) THEN

Line 2917: l_curItem.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,

2913: IF(l_curItem.transaction_action_id = WIP_CONSTANTS.RETNEGC_ACTION
2914: AND
2915: (l_curItem.lot_control_code = WIP_CONSTANTS.LOT
2916: OR
2917: l_curItem.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2918: WIP_CONSTANTS.DYN_RCV_SN))
2919: ) THEN
2920: -- Return after the first negative lot/serial component found.
2921: RETURN WIP_CONSTANTS.YES;

Line 2918: WIP_CONSTANTS.DYN_RCV_SN))

2914: AND
2915: (l_curItem.lot_control_code = WIP_CONSTANTS.LOT
2916: OR
2917: l_curItem.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2918: WIP_CONSTANTS.DYN_RCV_SN))
2919: ) THEN
2920: -- Return after the first negative lot/serial component found.
2921: RETURN WIP_CONSTANTS.YES;
2922: END IF;

Line 2921: RETURN WIP_CONSTANTS.YES;

2917: l_curItem.serial_number_control_code IN(WIP_CONSTANTS.FULL_SN,
2918: WIP_CONSTANTS.DYN_RCV_SN))
2919: ) THEN
2920: -- Return after the first negative lot/serial component found.
2921: RETURN WIP_CONSTANTS.YES;
2922: END IF;
2923: END IF; -- getCurrentItem
2924: EXIT WHEN NOT p_compInfo.setNextItem;
2925: END LOOP;

Line 2927: RETURN WIP_CONSTANTS.NO;

2923: END IF; -- getCurrentItem
2924: EXIT WHEN NOT p_compInfo.setNextItem;
2925: END LOOP;
2926: -- No negative lot/serial component.
2927: RETURN WIP_CONSTANTS.NO;
2928: END NegLSCompExist;
2929:
2930: PROCEDURE backflush(p_wipEntityID IN NUMBER,
2931: p_orgID IN NUMBER,

Line 2964: l_backwardMove NUMBER := WIP_CONSTANTS.NO;

2960: l_last_bf_op NUMBER;
2961: l_bf_qty NUMBER;
2962: l_compTbl system.wip_component_tbl_t;
2963: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2964: l_backwardMove NUMBER := WIP_CONSTANTS.NO;
2965: BEGIN
2966: SAVEPOINT s_backflush2;
2967: -- write parameter value to log file
2968: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 2968: IF (l_logLevel <= wip_constants.trace_logging) THEN

2964: l_backwardMove NUMBER := WIP_CONSTANTS.NO;
2965: BEGIN
2966: SAVEPOINT s_backflush2;
2967: -- write parameter value to log file
2968: IF (l_logLevel <= wip_constants.trace_logging) THEN
2969: l_params(1).paramName := 'p_wipEntityID';
2970: l_params(1).paramValue := p_wipEntityID;
2971: l_params(2).paramName := 'p_orgID';
2972: l_params(2).paramValue := p_orgID;

Line 3011: AND wdj.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)

3007: FROM wip_operations wo,
3008: wip_discrete_jobs wdj
3009: WHERE wdj.organization_id = wo.organization_id
3010: AND wdj.wip_entity_id = wo.wip_entity_id
3011: AND wdj.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)
3012: AND wdj.wip_entity_id = p_wipEntityID
3013: AND wdj.organization_id = p_orgID;
3014:
3015: IF(l_first_op IS NULL) THEN

Line 3030: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN

3026:
3027: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
3028: p_toOp IS NULL OR p_toStep IS NULL) THEN
3029: -- Completion/return transactions
3030: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
3031: -- Completion transaction
3032: l_fm_op := l_last_op;
3033: l_fm_step := WIP_CONSTANTS.TOMOVE;
3034: l_to_op := NULL;

Line 3033: l_fm_step := WIP_CONSTANTS.TOMOVE;

3029: -- Completion/return transactions
3030: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
3031: -- Completion transaction
3032: l_fm_op := l_last_op;
3033: l_fm_step := WIP_CONSTANTS.TOMOVE;
3034: l_to_op := NULL;
3035: l_to_step := NULL;
3036: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN
3037: -- Return transaction

Line 3036: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN

3032: l_fm_op := l_last_op;
3033: l_fm_step := WIP_CONSTANTS.TOMOVE;
3034: l_to_op := NULL;
3035: l_to_step := NULL;
3036: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN
3037: -- Return transaction
3038: l_fm_op := NULL;
3039: l_fm_step := NULL;
3040: l_to_op := l_last_op;

Line 3041: l_to_step := WIP_CONSTANTS.TOMOVE;

3037: -- Return transaction
3038: l_fm_op := NULL;
3039: l_fm_step := NULL;
3040: l_to_op := l_last_op;
3041: l_to_step := WIP_CONSTANTS.TOMOVE;
3042: END IF;
3043: ELSE -- Move related transactions
3044: l_fm_op := p_fmOp;
3045: l_fm_step := p_fmStep;

Line 3051: l_backwardMove := WIP_CONSTANTS.YES;

3047: l_to_step := p_toStep;
3048: -- Check whether it is a backward move
3049: IF (l_fm_op > l_to_op OR
3050: (l_fm_op = l_to_op AND l_fm_step > l_to_step)) THEN
3051: l_backwardMove := WIP_CONSTANTS.YES;
3052: ELSE
3053: l_backwardMove := WIP_CONSTANTS.NO;
3054: END IF;
3055: END IF;

Line 3053: l_backwardMove := WIP_CONSTANTS.NO;

3049: IF (l_fm_op > l_to_op OR
3050: (l_fm_op = l_to_op AND l_fm_step > l_to_step)) THEN
3051: l_backwardMove := WIP_CONSTANTS.YES;
3052: ELSE
3053: l_backwardMove := WIP_CONSTANTS.NO;
3054: END IF;
3055: END IF;
3056:
3057: -- Check whether it is move related transactions or not

Line 3091: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,

3087: p_movTxnID => p_movTxnID,
3088: p_orgID => p_orgID,
3089: p_assyQty => l_bf_qty,
3090: p_txnDate => p_txnDate,
3091: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,
3092: p_txnHdrID => p_txnHdrID,
3093: p_firstOp => l_first_bf_op,
3094: p_lastOP => l_last_bf_op,
3095: p_firstMoveOp => l_fm_op,

Line 3100: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,

3096: p_lastMoveOp => l_to_op,
3097: p_mergeMode => fnd_api.g_false,
3098: p_initMsgList => fnd_api.g_false,
3099: p_endDebug => fnd_api.g_false,
3100: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,
3101: x_compTbl => l_compTbl,
3102: x_returnStatus => l_returnStatus);
3103:
3104: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 3145: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

3141: p_movTxnID => p_movTxnID,
3142: p_orgID => p_orgID,
3143: p_assyQty => l_bf_qty,
3144: p_txnDate => p_txnDate,
3145: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
3146: p_txnHdrID => p_txnHdrID,
3147: p_firstOp => l_first_bf_op,
3148: p_lastOP => l_last_bf_op,
3149: p_firstMoveOp => l_fm_op,

Line 3154: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,

3150: p_lastMoveOp => l_to_op,
3151: p_mergeMode => fnd_api.g_false,
3152: p_initMsgList => fnd_api.g_false,
3153: p_endDebug => fnd_api.g_false,
3154: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,
3155: x_compTbl => l_compTbl,
3156: x_returnStatus => l_returnStatus);
3157:
3158: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 3165: IF(p_txnType = WIP_CONSTANTS.COMP_TXN OR

3161: END IF;
3162: END IF; -- l_first_bf_op <> -1
3163: END IF; -- Move related transactions
3164:
3165: IF(p_txnType = WIP_CONSTANTS.COMP_TXN OR
3166: p_txnType = WIP_CONSTANTS.RET_TXN) THEN
3167:
3168: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
3169: l_bf_qty := p_primaryQty;

Line 3166: p_txnType = WIP_CONSTANTS.RET_TXN) THEN

3162: END IF; -- l_first_bf_op <> -1
3163: END IF; -- Move related transactions
3164:
3165: IF(p_txnType = WIP_CONSTANTS.COMP_TXN OR
3166: p_txnType = WIP_CONSTANTS.RET_TXN) THEN
3167:
3168: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
3169: l_bf_qty := p_primaryQty;
3170: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN

Line 3168: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN

3164:
3165: IF(p_txnType = WIP_CONSTANTS.COMP_TXN OR
3166: p_txnType = WIP_CONSTANTS.RET_TXN) THEN
3167:
3168: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
3169: l_bf_qty := p_primaryQty;
3170: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN
3171: l_bf_qty := -1 * p_primaryQty;
3172: END IF;

Line 3170: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN

3166: p_txnType = WIP_CONSTANTS.RET_TXN) THEN
3167:
3168: IF(p_txnType = WIP_CONSTANTS.COMP_TXN) THEN
3169: l_bf_qty := p_primaryQty;
3170: ELSIF(p_txnType = WIP_CONSTANTS.RET_TXN) THEN
3171: l_bf_qty := -1 * p_primaryQty;
3172: END IF;
3173: wip_bflProc_priv.processRequirements
3174: (p_wipEntityID => p_wipEntityID,

Line 3184: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

3180: p_movTxnID => p_movTxnID,
3181: p_orgID => p_orgID,
3182: p_assyQty => l_bf_qty,
3183: p_txnDate => p_txnDate,
3184: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
3185: p_txnHdrID => p_txnHdrID,
3186: p_firstOp => -1,
3187: p_lastOP => l_last_op,
3188: p_firstMoveOp => null,

Line 3193: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,

3189: p_lastMoveOp => null,
3190: p_mergeMode => fnd_api.g_false,
3191: p_initMsgList => fnd_api.g_false,
3192: p_endDebug => fnd_api.g_false,
3193: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,
3194: x_compTbl => l_compTbl,
3195: x_returnStatus => l_returnStatus);
3196:
3197: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 3207: l_fm_step := WIP_CONSTANTS.QUEUE;

3203: -- Check whether overcompletion
3204: IF(p_childMovTxnID IS NOT NULL AND p_ocQty IS NOT NULL) THEN
3205: -- overmove/overcomplete
3206: l_fm_op := l_first_op;
3207: l_fm_step := WIP_CONSTANTS.QUEUE;
3208: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
3209: p_toOp IS NULL OR p_toStep IS NULL) THEN
3210: -- Call from Completion form
3211: l_to_op := l_last_op;

Line 3212: l_to_step := WIP_CONSTANTS.TOMOVE;

3208: IF(p_fmOp IS NULL OR p_fmStep IS NULL OR
3209: p_toOp IS NULL OR p_toStep IS NULL) THEN
3210: -- Call from Completion form
3211: l_to_op := l_last_op;
3212: l_to_step := WIP_CONSTANTS.TOMOVE;
3213: ELSE -- Call from WIP Move or OSFM Move forms
3214: l_to_op := p_fmOp;
3215: l_to_step := p_fmStep;
3216: END IF;

Line 3250: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,

3246: p_movTxnID => p_childMovTxnID,
3247: p_orgID => p_orgID,
3248: p_assyQty => l_bf_qty,
3249: p_txnDate => p_txnDate,
3250: p_wipSupplyType => WIP_CONSTANTS.OP_PULL,
3251: p_txnHdrID => p_txnHdrID,
3252: p_firstOp => l_first_bf_op,
3253: p_lastOP => l_last_bf_op,
3254: p_firstMoveOp => l_fm_op,

Line 3259: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,

3255: p_lastMoveOp => l_to_op,
3256: p_mergeMode => fnd_api.g_false,
3257: p_initMsgList => fnd_api.g_false,
3258: p_endDebug => fnd_api.g_false,
3259: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,
3260: x_compTbl => l_compTbl,
3261: x_returnStatus => l_returnStatus);
3262:
3263: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 3304: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,

3300: p_movTxnID => p_childMovTxnID,
3301: p_orgID => p_orgID,
3302: p_assyQty => l_bf_qty,
3303: p_txnDate => p_txnDate,
3304: p_wipSupplyType => WIP_CONSTANTS.ASSY_PULL,
3305: p_txnHdrID => p_txnHdrID,
3306: p_firstOp => l_first_bf_op,
3307: p_lastOP => l_last_bf_op,
3308: p_firstMoveOp => l_fm_op,

Line 3313: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,

3309: p_lastMoveOp => l_to_op,
3310: p_mergeMode => fnd_api.g_false,
3311: p_initMsgList => fnd_api.g_false,
3312: p_endDebug => fnd_api.g_false,
3313: p_mtlTxnMode => WIP_CONSTANTS.ONLINE,
3314: x_compTbl => l_compTbl,
3315: x_returnStatus => l_returnStatus);
3316:
3317: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 3324: if (l_logLevel <= wip_constants.full_logging) then

3320: END IF;
3321: END IF; -- l_first_bf_op <> -1
3322: END IF; -- Overmove/ Overcompletion
3323:
3324: if (l_logLevel <= wip_constants.full_logging) then
3325: wip_logger.log(p_msg => 'before system.wip_lot_serial_obj_t',
3326: x_returnStatus => l_returnStatus);
3327: end if;
3328: x_compInfo := system.wip_lot_serial_obj_t(null, null, null, l_compTbl,

Line 3330: if (l_logLevel <= wip_constants.full_logging) then

3326: x_returnStatus => l_returnStatus);
3327: end if;
3328: x_compInfo := system.wip_lot_serial_obj_t(null, null, null, l_compTbl,
3329: null, null);
3330: if (l_logLevel <= wip_constants.full_logging) then
3331: wip_logger.log(p_msg => 'after system.wip_lot_serial_obj_t',
3332: x_returnStatus => l_returnStatus);
3333: end if;
3334: x_compInfo.initialize;

Line 3335: if (l_logLevel <= wip_constants.full_logging) then

3331: wip_logger.log(p_msg => 'after system.wip_lot_serial_obj_t',
3332: x_returnStatus => l_returnStatus);
3333: end if;
3334: x_compInfo.initialize;
3335: if (l_logLevel <= wip_constants.full_logging) then
3336: wip_logger.log(p_msg => 'after x_compInfo.initialize',
3337: x_returnStatus => l_returnStatus);
3338: end if;
3339:

Line 3343: (p_txnType = WIP_CONSTANTS.RET_TXN OR

3339:
3340: -- If serialized return or serialized backward move, we have to derive
3341: -- lot and serial information from genealogy.
3342: IF (p_objectID IS NOT NULL AND
3343: (p_txnType = WIP_CONSTANTS.RET_TXN OR
3344: l_backwardMove = WIP_CONSTANTS.YES)) THEN
3345: -- Derive lot control only from genealogy
3346: wip_autoLotProc_priv.deriveLotsFromMOG(x_compLots => x_compInfo,
3347: p_orgID => p_orgID,

Line 3344: l_backwardMove = WIP_CONSTANTS.YES)) THEN

3340: -- If serialized return or serialized backward move, we have to derive
3341: -- lot and serial information from genealogy.
3342: IF (p_objectID IS NOT NULL AND
3343: (p_txnType = WIP_CONSTANTS.RET_TXN OR
3344: l_backwardMove = WIP_CONSTANTS.YES)) THEN
3345: -- Derive lot control only from genealogy
3346: wip_autoLotProc_priv.deriveLotsFromMOG(x_compLots => x_compInfo,
3347: p_orgID => p_orgID,
3348: p_objectID => p_objectID,

Line 3366: IF(NegLSCompExist(p_compInfo => x_compInfo) = WIP_CONSTANTS.YES) THEN

3362: IF(x_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN
3363: raise fnd_api.g_exc_unexpected_error;
3364: END IF;
3365:
3366: IF(NegLSCompExist(p_compInfo => x_compInfo) = WIP_CONSTANTS.YES) THEN
3367: x_lotSerRequired := WIP_CONSTANTS.YES;
3368: ELSE
3369: x_lotSerRequired := WIP_CONSTANTS.NO;
3370: END IF;

Line 3367: x_lotSerRequired := WIP_CONSTANTS.YES;

3363: raise fnd_api.g_exc_unexpected_error;
3364: END IF;
3365:
3366: IF(NegLSCompExist(p_compInfo => x_compInfo) = WIP_CONSTANTS.YES) THEN
3367: x_lotSerRequired := WIP_CONSTANTS.YES;
3368: ELSE
3369: x_lotSerRequired := WIP_CONSTANTS.NO;
3370: END IF;
3371: ELSE

Line 3369: x_lotSerRequired := WIP_CONSTANTS.NO;

3365:
3366: IF(NegLSCompExist(p_compInfo => x_compInfo) = WIP_CONSTANTS.YES) THEN
3367: x_lotSerRequired := WIP_CONSTANTS.YES;
3368: ELSE
3369: x_lotSerRequired := WIP_CONSTANTS.NO;
3370: END IF;
3371: ELSE
3372: -- derive lot if the component under lot control, if return status
3373: -- is 'E' mean cannot derive lot, so the user need to provide more

Line 3390: x_lotSerRequired := WIP_CONSTANTS.YES;

3386: IF(x_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN
3387: l_errMsg := 'wip_autoLotProc_priv.deriveLots failed';
3388: raise fnd_api.g_exc_unexpected_error;
3389: ELSIF(x_returnStatus = fnd_api.g_ret_sts_error) THEN
3390: x_lotSerRequired := WIP_CONSTANTS.YES;
3391: ELSE -- succesfully derived lot
3392: x_lotSerRequired := WIP_CONSTANTS.NO;
3393: END IF;-- check return status
3394: END IF; -- check serialized return or serialized backward move

Line 3392: x_lotSerRequired := WIP_CONSTANTS.NO;

3388: raise fnd_api.g_exc_unexpected_error;
3389: ELSIF(x_returnStatus = fnd_api.g_ret_sts_error) THEN
3390: x_lotSerRequired := WIP_CONSTANTS.YES;
3391: ELSE -- succesfully derived lot
3392: x_lotSerRequired := WIP_CONSTANTS.NO;
3393: END IF;-- check return status
3394: END IF; -- check serialized return or serialized backward move
3395:
3396: x_returnStatus := fnd_api.g_ret_sts_success;

Line 3397: IF (l_logLevel <= wip_constants.trace_logging) THEN

3393: END IF;-- check return status
3394: END IF; -- check serialized return or serialized backward move
3395:
3396: x_returnStatus := fnd_api.g_ret_sts_success;
3397: IF (l_logLevel <= wip_constants.trace_logging) THEN
3398: wip_logger.exitPoint(
3399: p_procName => 'wip_bflProc_priv.backflush',
3400: p_procReturnStatus => x_returnStatus,
3401: p_msg => 'Succesfully inserted components into PL/SQL object',

Line 3408: IF (l_logLevel <= wip_constants.trace_logging) THEN

3404: EXCEPTION
3405: WHEN fnd_api.g_exc_unexpected_error THEN
3406: ROLLBACK TO SAVEPOINT s_backflush2;
3407: x_returnStatus := fnd_api.g_ret_sts_error;
3408: IF (l_logLevel <= wip_constants.trace_logging) THEN
3409: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.backflush',
3410: p_procReturnStatus => x_returnStatus,
3411: p_msg => l_errMsg,
3412: x_returnStatus => l_returnStatus);

Line 3417: IF (l_logLevel <= wip_constants.trace_logging) THEN

3413: END IF;
3414: WHEN others THEN
3415: ROLLBACK TO SAVEPOINT s_backflush2;
3416: x_returnStatus := fnd_api.g_ret_sts_error;
3417: IF (l_logLevel <= wip_constants.trace_logging) THEN
3418: wip_logger.exitPoint(p_procName => 'wip_bflProc_priv.backflush',
3419: p_procReturnStatus => x_returnStatus,
3420: p_msg => 'Unexpected error : ' || SQLERRM,
3421: x_returnStatus => l_returnStatus);