DBA Data[Home] [Help]

APPS.GMI_ALLOCATE_INVENTORY_PVT dependencies on IC_ITEM_MST

Line 24: | p_ic_item_mst IN ic_item_mst%ROWTYPE |

20: | |
21: | PARAMETERS |
22: | p_line_id IN NUMBER |
23: | p_trans_date IN DATE |
24: | p_ic_item_mst IN ic_item_mst%ROWTYPE |
25: | p_ic_whse_mst IN ic_whse_mst%ROWTYPE |
26: | p_op_alot_prm IN op_alot_prm%ROWTYPE |
27: | x_allocated_qty1 OUT NUMBER |
28: | x_allocated_qty2 OUT NUMBER |

Line 41: , p_ic_item_mst IN ic_item_mst%ROWTYPE

37: +=========================================================================+
38: */
39: PROCEDURE ALLOCATE_LINE
40: ( p_allocation_rec IN GMI_AUTO_ALLOCATE_PUB.gmi_allocation_rec
41: , p_ic_item_mst IN ic_item_mst%ROWTYPE
42: , p_ic_whse_mst IN ic_whse_mst%ROWTYPE
43: , p_op_alot_prm IN op_alot_prm%ROWTYPE
44: , p_batch_id IN NUMBER
45: , x_allocated_qty1 OUT NOCOPY NUMBER

Line 214: IF (p_allocation_rec.order_um1 <> p_ic_item_mst.item_um) THEN

210:
211: /*If order UM differs from inventory UM, conversion is required.
212: The allocations are recorded as transactions written in the inventory UM
213: =======================================================================*/
214: IF (p_allocation_rec.order_um1 <> p_ic_item_mst.item_um) THEN
215: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
216: plot_id => l_lot_id,
217: pcur_qty => p_allocation_rec.order_qty1,
218: pcur_uom => p_allocation_rec.order_um1,

Line 215: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,

211: /*If order UM differs from inventory UM, conversion is required.
212: The allocations are recorded as transactions written in the inventory UM
213: =======================================================================*/
214: IF (p_allocation_rec.order_um1 <> p_ic_item_mst.item_um) THEN
215: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
216: plot_id => l_lot_id,
217: pcur_qty => p_allocation_rec.order_qty1,
218: pcur_uom => p_allocation_rec.order_um1,
219: pnew_uom => p_ic_item_mst.item_um,

Line 219: pnew_uom => p_ic_item_mst.item_um,

215: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
216: plot_id => l_lot_id,
217: pcur_qty => p_allocation_rec.order_qty1,
218: pcur_uom => p_allocation_rec.order_um1,
219: pnew_uom => p_ic_item_mst.item_um,
220: onew_qty => l_inventory_qty1);
221: ELSE
222: l_inventory_qty1 := p_allocation_rec.order_qty1;
223: END IF;

Line 243: 'item_id = '|| p_ic_item_mst.item_id ;

239:
240: l_whse_code := p_ic_whse_mst.whse_code;
241:
242: l_where_clause :=
243: 'item_id = '|| p_ic_item_mst.item_id ;
244: l_where_clause := l_where_clause ||' AND whse_code = ';
245: l_where_clause := l_where_clause || '''';
246: l_where_clause := l_where_clause || l_whse_code ;
247: l_where_clause := l_where_clause || '''';

Line 262: IF (p_ic_item_mst.lot_ctl = 0) THEN

258: l_where_clause := l_where_clause || 'DD-MON-YYYY, HH:MI:SS';
259: l_where_clause := l_where_clause || '''';
260: l_where_clause := l_where_clause || ')';
261:
262: IF (p_ic_item_mst.lot_ctl = 0) THEN
263: l_where_clause := l_where_clause ||
264: ' and lot_id = 0 ';
265: ELSE
266: l_where_clause := l_where_clause ||

Line 272: l_loct_ctl := p_ic_item_mst.loct_ctl * p_ic_whse_mst.loct_ctl;

268: END IF;
269:
270: /*Overall location control is determined by looking at both the item and whse
271: =============================================================================*/
272: l_loct_ctl := p_ic_item_mst.loct_ctl * p_ic_whse_mst.loct_ctl;
273: GMI_RESERVATION_UTIL.PrintLn('loct ctl set to ' || l_loct_ctl || ' from ' || p_ic_item_mst.loct_ctl
274: || ' and ' || p_ic_whse_mst.loct_ctl );
275:
276: IF l_loct_ctl = 0 THEN

Line 273: GMI_RESERVATION_UTIL.PrintLn('loct ctl set to ' || l_loct_ctl || ' from ' || p_ic_item_mst.loct_ctl

269:
270: /*Overall location control is determined by looking at both the item and whse
271: =============================================================================*/
272: l_loct_ctl := p_ic_item_mst.loct_ctl * p_ic_whse_mst.loct_ctl;
273: GMI_RESERVATION_UTIL.PrintLn('loct ctl set to ' || l_loct_ctl || ' from ' || p_ic_item_mst.loct_ctl
274: || ' and ' || p_ic_whse_mst.loct_ctl );
275:
276: IF l_loct_ctl = 0 THEN
277: l_where_clause := l_where_clause || ' AND location = ';

Line 316: IF p_ic_item_mst.grade_ctl = 1 AND

312: IF (NVL(l_grade_or_qcmatch_flag,0) = 0) THEN
313: IF (l_override_rules = 1) THEN
314: l_allocation_rec.prefqc_grade := null;
315: ELSE
316: IF p_ic_item_mst.grade_ctl = 1 AND
317: l_allocation_rec.prefqc_grade is NOT NULL THEN
318: l_where_clause := l_where_clause || ' and qc_grade = :v_qc_grade ';
319: l_allocation_rec.prefqc_grade := p_allocation_rec.prefqc_grade;
320: GMI_Reservation_Util.PrintLn('(Alloc PVT) l_where_clause 1= ' || l_where_clause);

Line 321: ELSIF p_ic_item_mst.grade_ctl = 1 AND

317: l_allocation_rec.prefqc_grade is NOT NULL THEN
318: l_where_clause := l_where_clause || ' and qc_grade = :v_qc_grade ';
319: l_allocation_rec.prefqc_grade := p_allocation_rec.prefqc_grade;
320: GMI_Reservation_Util.PrintLn('(Alloc PVT) l_where_clause 1= ' || l_where_clause);
321: ELSIF p_ic_item_mst.grade_ctl = 1 AND
322: l_prm_prefqc_grade IS NOT NULL THEN
323: l_where_clause := l_where_clause || ' and qc_grade = :v_qc_grade ';
324: l_allocation_rec.prefqc_grade := l_prm_prefqc_grade;
325: GMI_Reservation_Util.PrintLn('(Alloc PVT) l_where_clause 2= ' || l_where_clause);

Line 333: IF ( p_ic_item_mst.grade_ctl = 1 AND l_allocation_rec.prefqc_grade is NOT NULL)

329:
330: /*
331: IF (NVL(l_grade_or_qcmatch_flag,0) = 0) THEN
332:
333: IF ( p_ic_item_mst.grade_ctl = 1 AND l_allocation_rec.prefqc_grade is NOT NULL)
334: THEN
335: l_allocation_rec.prefqc_grade := p_allocation_rec.prefqc_grade;
336: ELSIF( p_ic_item_mst.grade_ctl = 1 AND l_prm_prefqc_grade IS NOT NULL)
337: THEN

Line 336: ELSIF( p_ic_item_mst.grade_ctl = 1 AND l_prm_prefqc_grade IS NOT NULL)

332:
333: IF ( p_ic_item_mst.grade_ctl = 1 AND l_allocation_rec.prefqc_grade is NOT NULL)
334: THEN
335: l_allocation_rec.prefqc_grade := p_allocation_rec.prefqc_grade;
336: ELSIF( p_ic_item_mst.grade_ctl = 1 AND l_prm_prefqc_grade IS NOT NULL)
337: THEN
338: l_allocation_rec.prefqc_grade := l_prm_prefqc_grade;
339: END IF;
340:

Line 354: GMI_RESERVATION_UTIL.PrintLn('item_no item_id: ' ||p_ic_item_mst.item_no ||' '|| p_ic_item_mst.item_id);

350: */
351:
352: GMI_RESERVATION_UTIL.PrintLn('(Auto_Alloc) 1 WHERE clause is now '|| l_where_clause);
353: GMI_RESERVATION_UTIL.PrintLn('WHSE IS '|| p_ic_whse_mst.whse_code);
354: GMI_RESERVATION_UTIL.PrintLn('item_no item_id: ' ||p_ic_item_mst.item_no ||' '|| p_ic_item_mst.item_id);
355: GMI_RESERVATION_UTIL.PrintLn('QC Grade to be used is '|| p_allocation_rec.prefqc_grade);
356:
357: GMI_RESERVATION_UTIL.PrintLn('Using a shelf date of '|| l_shelf_date );
358:

Line 537: GMI_Reservation_Util.PrintLn('(Alloc PVT) p_ic_item_mst.grade_ctl = ' || p_ic_item_mst.grade_ctl);

533: GMI_Reservation_Util.PrintLn('About to open cursor for dynamic SQL');
534: gmi_reservation_util.println('OPM ALLOCATION ENGINE - open cursor for dynamic SQL',1);
535:
536: GMI_Reservation_Util.PrintLn('(Alloc PVT) l_grade_or_qcmatch_flag = ' || l_grade_or_qcmatch_flag);
537: GMI_Reservation_Util.PrintLn('(Alloc PVT) p_ic_item_mst.grade_ctl = ' || p_ic_item_mst.grade_ctl);
538:
539: --2722339 EMC Auto Alloc QC Spec Match Project
540: --When Customer Spec is indicated on OPALOTED.fmb, grade is not used
541: --in select. When Grade is specified and a grade is specified on the

Line 562: p_ic_item_mst.grade_ctl = 1 AND

558: ' HAVING sum(loct_onhand) + sum(commit_qty) > 0 ' ||
559: ' ORDER BY ' || l_order_by;
560: ELSIF
561: (NVL(l_grade_or_qcmatch_flag,0) = 0 AND
562: p_ic_item_mst.grade_ctl = 1 AND
563: l_allocation_rec.prefqc_grade is NOT NULL) THEN
564: BEGIN
565:
566: GMI_Reservation_Util.PrintLn('(Alloc PVT) Select B ') ;

Line 591: (p_ic_item_mst.grade_ctl <> 1 OR

587: END;
588: GMI_Reservation_Util.PrintLn('(Alloc PVT) Select B after query') ;
589: ELSIF
590: (NVL(l_grade_or_qcmatch_flag,0) = 0 AND
591: (p_ic_item_mst.grade_ctl <> 1 OR
592: l_allocation_rec.prefqc_grade is NULL)) THEN
593: GMI_Reservation_Util.PrintLn('(Alloc PVT) Select C ') ;
594: GMI_Reservation_Util.PrintLn('(Alloc PVT) where clause' ||l_where_clause) ;
595:

Line 625: find_cust_spec_rec.item_id := p_ic_item_mst.item_id;

621: l_org_id,
622: l_preferred_grade;
623: CLOSE Get_order_line_info;
624:
625: find_cust_spec_rec.item_id := p_ic_item_mst.item_id;
626: --find_cust_spec_rec.grade := l_allocation_rec.prefqc_grade;
627: find_cust_spec_rec.orgn_code := NULL;
628: find_cust_spec_rec.whse_code := p_ic_whse_mst.whse_code;
629: find_cust_spec_rec.cust_id := l_sold_to_org_id;

Line 683: result_lot_match_tbl(1).item_id := p_ic_item_mst.item_id;

679: --Otherwise, go through regular allocation code.
680:
681: IF ( l_spec_hdr_id >0) THEN
682: /* Commented since these dont exist in 12.0 ; P1 SCM Build bug #4561095
683: result_lot_match_tbl(1).item_id := p_ic_item_mst.item_id;
684: result_lot_match_tbl(1).lot_id := l_lot_id;
685: result_lot_match_tbl(1).whse_code := p_ic_whse_mst.whse_code;
686: result_lot_match_tbl(1).location := l_location;
687: */

Line 732: l_lot_indivisible := p_ic_item_mst.lot_indivisible;

728: GMI_Reservation_Util.PrintLn('(Alloc PVT) result flag : ' ||result_flag ) ;
729: -- Bug 3180256 (adding NVL below)
730: IF (result_flag = 1 OR NVL(l_grade_or_qcmatch_flag,0) = 0) THEN
731: GMI_Reservation_Util.PrintLn('(Alloc PVT) Following regular logic flow.') ;
732: l_lot_indivisible := p_ic_item_mst.lot_indivisible;
733: IF( l_batch_rec.alloc_all_lot_flag = 'Y' OR
734: l_batch_rec.lots_indivisible_flag = 'Y')
735: THEN
736: l_lot_indivisible := 1;

Line 797: IF p_ic_item_mst.dualum_ind > 0 THEN

793: If l_allocation_successful = 'Y' THEN
794: /*Convert allocated qty to secondary UM where appropriate
795: ========================================================*/
796: GMI_RESERVATION_UTIL.PrintLn('secondary UM conv');
797: IF p_ic_item_mst.dualum_ind > 0 THEN
798: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
799: plot_id => l_lot_id,
800: pcur_qty => l_trans_qty1,
801: pcur_uom => p_ic_item_mst.item_um,

Line 798: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,

794: /*Convert allocated qty to secondary UM where appropriate
795: ========================================================*/
796: GMI_RESERVATION_UTIL.PrintLn('secondary UM conv');
797: IF p_ic_item_mst.dualum_ind > 0 THEN
798: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
799: plot_id => l_lot_id,
800: pcur_qty => l_trans_qty1,
801: pcur_uom => p_ic_item_mst.item_um,
802: pnew_uom => p_ic_item_mst.item_um2,

Line 801: pcur_uom => p_ic_item_mst.item_um,

797: IF p_ic_item_mst.dualum_ind > 0 THEN
798: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
799: plot_id => l_lot_id,
800: pcur_qty => l_trans_qty1,
801: pcur_uom => p_ic_item_mst.item_um,
802: pnew_uom => p_ic_item_mst.item_um2,
803: onew_qty => l_trans_qty2);
804: END IF;
805: GMI_RESERVATION_UTIL.PrintLn('invoke txn engine');

Line 802: pnew_uom => p_ic_item_mst.item_um2,

798: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
799: plot_id => l_lot_id,
800: pcur_qty => l_trans_qty1,
801: pcur_uom => p_ic_item_mst.item_um,
802: pnew_uom => p_ic_item_mst.item_um2,
803: onew_qty => l_trans_qty2);
804: END IF;
805: GMI_RESERVATION_UTIL.PrintLn('invoke txn engine');
806: GMI_RESERVATION_UTIL.PrintLn('write txn for qty ' || l_trans_qty1);

Line 811: l_tran_rec.item_id := p_ic_item_mst.item_id;

807: gmi_reservation_util.println('OPM ALLOCATION ENGINE - invoke transaction engine',1);
808: /*Set up parameters in readiness for writing a pending transaction
809: =================================================================*/
810: l_tran_rec.trans_id := NULL;
811: l_tran_rec.item_id := p_ic_item_mst.item_id;
812: l_tran_rec.line_id := p_allocation_rec.line_id;
813: l_tran_rec.co_code := p_allocation_rec.co_code;
814: l_tran_rec.orgn_code := p_ic_whse_mst.orgn_code;
815: l_tran_rec.whse_code := p_ic_whse_mst.whse_code;

Line 824: IF p_ic_item_mst.dualum_ind > 0 THEN

820: l_tran_rec.doc_line := p_allocation_rec.doc_line;
821: l_tran_rec.line_type := 0;
822: l_tran_rec.trans_date := p_allocation_rec.trans_date;
823: l_tran_rec.trans_qty := l_trans_qty1 * -1;
824: IF p_ic_item_mst.dualum_ind > 0 THEN
825: l_tran_rec.trans_qty2 := l_trans_qty2 * -1;
826: ELSE
827: l_tran_rec.trans_qty2 := NULL;
828: END IF;

Line 830: IF p_ic_item_mst.grade_ctl > 0 THEN

826: ELSE
827: l_tran_rec.trans_qty2 := NULL;
828: END IF;
829:
830: IF p_ic_item_mst.grade_ctl > 0 THEN
831: l_tran_rec.qc_grade := l_qc_grade;
832: ELSE
833: l_tran_rec.qc_grade := NULL;
834: END IF;

Line 836: IF p_ic_item_mst.lot_ctl > 0 THEN

832: ELSE
833: l_tran_rec.qc_grade := NULL;
834: END IF;
835:
836: IF p_ic_item_mst.lot_ctl > 0 THEN
837: l_tran_rec.lot_status := l_lot_status;
838: ELSE
839: l_tran_rec.lot_status := NULL;
840: END IF;

Line 841: l_tran_rec.trans_um := p_ic_item_mst.item_um;

837: l_tran_rec.lot_status := l_lot_status;
838: ELSE
839: l_tran_rec.lot_status := NULL;
840: END IF;
841: l_tran_rec.trans_um := p_ic_item_mst.item_um;
842: l_tran_rec.trans_um2 := p_ic_item_mst.item_um2;
843: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;
844: l_tran_rec.create_lot_index := 0;
845: l_tran_rec.staged_ind := 0;

Line 842: l_tran_rec.trans_um2 := p_ic_item_mst.item_um2;

838: ELSE
839: l_tran_rec.lot_status := NULL;
840: END IF;
841: l_tran_rec.trans_um := p_ic_item_mst.item_um;
842: l_tran_rec.trans_um2 := p_ic_item_mst.item_um2;
843: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;
844: l_tran_rec.create_lot_index := 0;
845: l_tran_rec.staged_ind := 0;
846: l_tran_rec.text_code := NULL;

Line 843: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;

839: l_tran_rec.lot_status := NULL;
840: END IF;
841: l_tran_rec.trans_um := p_ic_item_mst.item_um;
842: l_tran_rec.trans_um2 := p_ic_item_mst.item_um2;
843: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;
844: l_tran_rec.create_lot_index := 0;
845: l_tran_rec.staged_ind := 0;
846: l_tran_rec.text_code := NULL;
847: l_tran_rec.user_id := p_allocation_rec.user_id;

Line 890: OR (l_unallocated_qty1 > 0 and p_ic_item_mst.lot_ctl = 0 AND l_loct_ctl = 0)

886: the default lot/location.
887: ========================================================================*/
888:
889: IF (l_unallocated_qty1 > 0 and (p_op_alot_prm.partial_ind = 0 AND (l_override_rules = 0 ) ) )
890: OR (l_unallocated_qty1 > 0 and p_ic_item_mst.lot_ctl = 0 AND l_loct_ctl = 0)
891: THEN
892: /* dbms_output.put_line */
893: /* ('Demand not fully met and partial alloc not allowed - special rollback'); */
894: GMI_Reservation_Util.PrintLn('(Alloc PVT) partial not allowed, roll back ');

Line 896: GMI_Reservation_Util.PrintLn('(Alloc PVT) lot_ctl '|| p_ic_item_mst.lot_ctl);

892: /* dbms_output.put_line */
893: /* ('Demand not fully met and partial alloc not allowed - special rollback'); */
894: GMI_Reservation_Util.PrintLn('(Alloc PVT) partial not allowed, roll back ');
895: GMI_Reservation_Util.PrintLn('(Alloc PVT) partial _ind'|| p_op_alot_prm.partial_ind);
896: GMI_Reservation_Util.PrintLn('(Alloc PVT) lot_ctl '|| p_ic_item_mst.lot_ctl);
897: GMI_Reservation_Util.PrintLn('(Alloc PVT) loct_ctl '|| l_loct_ctl);
898: ROLLBACK to allocate_line;
899: l_allocated_qty1 := 0;
900: l_allocated_qty2 := 0;

Line 909: IF l_allocated_qty1 > 0 AND p_ic_item_mst.dualum_ind > 0 THEN

905: /* dbms_output.put_line('carry out final UM conversions'); */
906:
907: /*Convert allocated qty to secondary um if necessary
908: ===================================================*/
909: IF l_allocated_qty1 > 0 AND p_ic_item_mst.dualum_ind > 0 THEN
910: /* dbms_output.put_line('convert allocated_qty to secondary'); */
911: l_lot_id := 0;
912: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
913: plot_id => l_lot_id,

Line 912: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,

908: ===================================================*/
909: IF l_allocated_qty1 > 0 AND p_ic_item_mst.dualum_ind > 0 THEN
910: /* dbms_output.put_line('convert allocated_qty to secondary'); */
911: l_lot_id := 0;
912: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
913: plot_id => l_lot_id,
914: pcur_qty => l_allocated_qty1,
915: pcur_uom => p_ic_item_mst.item_um,
916: pnew_uom => p_ic_item_mst.item_um2,

Line 915: pcur_uom => p_ic_item_mst.item_um,

911: l_lot_id := 0;
912: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
913: plot_id => l_lot_id,
914: pcur_qty => l_allocated_qty1,
915: pcur_uom => p_ic_item_mst.item_um,
916: pnew_uom => p_ic_item_mst.item_um2,
917: onew_qty => l_allocated_qty2);
918: l_unallocated_qty2 := p_allocation_rec.order_qty2 - l_allocated_qty2;
919: ELSIF l_allocated_qty1 = 0 AND p_ic_item_mst.dualum_ind > 0 THEN

Line 916: pnew_uom => p_ic_item_mst.item_um2,

912: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
913: plot_id => l_lot_id,
914: pcur_qty => l_allocated_qty1,
915: pcur_uom => p_ic_item_mst.item_um,
916: pnew_uom => p_ic_item_mst.item_um2,
917: onew_qty => l_allocated_qty2);
918: l_unallocated_qty2 := p_allocation_rec.order_qty2 - l_allocated_qty2;
919: ELSIF l_allocated_qty1 = 0 AND p_ic_item_mst.dualum_ind > 0 THEN
920: l_unallocated_qty2 := p_allocation_rec.order_qty2;

Line 919: ELSIF l_allocated_qty1 = 0 AND p_ic_item_mst.dualum_ind > 0 THEN

915: pcur_uom => p_ic_item_mst.item_um,
916: pnew_uom => p_ic_item_mst.item_um2,
917: onew_qty => l_allocated_qty2);
918: l_unallocated_qty2 := p_allocation_rec.order_qty2 - l_allocated_qty2;
919: ELSIF l_allocated_qty1 = 0 AND p_ic_item_mst.dualum_ind > 0 THEN
920: l_unallocated_qty2 := p_allocation_rec.order_qty2;
921: ELSIF p_ic_item_mst.dualum_ind = 0 THEN
922: l_allocated_qty2 := NULL;
923: l_unallocated_qty2 := NULL;

Line 921: ELSIF p_ic_item_mst.dualum_ind = 0 THEN

917: onew_qty => l_allocated_qty2);
918: l_unallocated_qty2 := p_allocation_rec.order_qty2 - l_allocated_qty2;
919: ELSIF l_allocated_qty1 = 0 AND p_ic_item_mst.dualum_ind > 0 THEN
920: l_unallocated_qty2 := p_allocation_rec.order_qty2;
921: ELSIF p_ic_item_mst.dualum_ind = 0 THEN
922: l_allocated_qty2 := NULL;
923: l_unallocated_qty2 := NULL;
924: END IF;
925: /*Convert allocated qty back to order_um if necessary

Line 928: (p_allocation_rec.order_um1 <> p_ic_item_mst.item_um) THEN

924: END IF;
925: /*Convert allocated qty back to order_um if necessary
926: ====================================================*/
927: IF (l_allocated_qty1) > 0 AND
928: (p_allocation_rec.order_um1 <> p_ic_item_mst.item_um) THEN
929: l_lot_id := 0;
930: /* dbms_output.put_line('convert allocated_qty to order_um'); */
931: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
932: plot_id => l_lot_id,

Line 931: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,

927: IF (l_allocated_qty1) > 0 AND
928: (p_allocation_rec.order_um1 <> p_ic_item_mst.item_um) THEN
929: l_lot_id := 0;
930: /* dbms_output.put_line('convert allocated_qty to order_um'); */
931: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
932: plot_id => l_lot_id,
933: pcur_qty => l_allocated_qty1,
934: pcur_uom => p_ic_item_mst.item_um,
935: pnew_uom => p_allocation_rec.order_um1,

Line 934: pcur_uom => p_ic_item_mst.item_um,

930: /* dbms_output.put_line('convert allocated_qty to order_um'); */
931: GMICUOM.icuomcv(pitem_id => p_ic_item_mst.item_id,
932: plot_id => l_lot_id,
933: pcur_qty => l_allocated_qty1,
934: pcur_uom => p_ic_item_mst.item_um,
935: pnew_uom => p_allocation_rec.order_um1,
936: onew_qty => x_allocated_qty1);
937: ELSE
938: x_allocated_qty1 := l_allocated_qty1;

Line 953: p_ic_item_mst => p_ic_item_mst,

949: GMI_ALLOCATE_INVENTORY_PVT.Balance_Default_Lot
950: (p_default_qty1 => l_unallocated_qty1 * -1,
951: p_default_qty2 => l_unallocated_qty2 * -1,
952: p_allocation_rec => p_allocation_rec,
953: p_ic_item_mst => p_ic_item_mst,
954: p_ic_whse_mst => p_ic_whse_mst,
955: x_return_status => l_return_status,
956: x_msg_count => l_msg_count,
957: x_msg_data => l_msg_data

Line 1015: , p_ic_item_mst IN ic_item_mst%ROWTYPE

1011: PROCEDURE BALANCE_DEFAULT_LOT
1012: ( p_default_qty1 IN NUMBER
1013: , p_default_qty2 IN NUMBER
1014: , p_allocation_rec IN GMI_AUTO_ALLOCATE_PUB.gmi_allocation_rec
1015: , p_ic_item_mst IN ic_item_mst%ROWTYPE
1016: , p_ic_whse_mst IN ic_whse_mst%ROWTYPE
1017: , x_return_status OUT NOCOPY VARCHAR2
1018: , x_msg_count OUT NOCOPY NUMBER
1019: , x_msg_data OUT NOCOPY VARCHAR2

Line 1035: WHERE item_id = p_ic_item_mst.item_id AND

1031:
1032: CURSOR ic_tran_pnd_c1 is
1033: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */ *
1034: FROM ic_tran_pnd
1035: WHERE item_id = p_ic_item_mst.item_id AND
1036: line_id = p_allocation_rec.line_id AND
1037: lot_id = 0 AND
1038: doc_type= 'OMSO' AND
1039: completed_ind = 0 AND

Line 1064: l_tran_rec.item_id := p_ic_item_mst.item_id;

1060: CLOSE ic_tran_pnd_c1;
1061: /*Set up parameters in readiness for writing a pending transaction
1062: =================================================================*/
1063: l_tran_rec.trans_id := NULL;
1064: l_tran_rec.item_id := p_ic_item_mst.item_id;
1065: l_tran_rec.line_id := p_allocation_rec.line_id;
1066: l_tran_rec.co_code := p_allocation_rec.co_code;
1067: l_tran_rec.orgn_code := p_ic_whse_mst.orgn_code;
1068: l_tran_rec.whse_code := p_ic_whse_mst.whse_code;

Line 1077: IF p_ic_item_mst.dualum_ind > 0 THEN

1073: l_tran_rec.doc_line := p_allocation_rec.doc_line;
1074: l_tran_rec.line_type := 0;
1075: l_tran_rec.trans_date := p_allocation_rec.trans_date;
1076: l_tran_rec.trans_qty := p_default_qty1;
1077: IF p_ic_item_mst.dualum_ind > 0 THEN
1078: l_tran_rec.trans_qty2 := p_default_qty2;
1079: ELSE
1080: l_tran_rec.trans_qty2 := NULL;
1081: END IF;

Line 1096: l_tran_rec.trans_um := p_ic_item_mst.item_um;

1092: the DEFAULT posting. This will highlight the quantity as nettable
1093: for MRP purposes.
1094: ===================================================================*/
1095: l_tran_rec.lot_status := NULL;
1096: l_tran_rec.trans_um := p_ic_item_mst.item_um;
1097: l_tran_rec.trans_um2 := p_ic_item_mst.item_um2;
1098: l_tran_rec.staged_ind := 0;
1099: l_tran_rec.text_code := NULL;
1100: l_tran_rec.user_id := p_allocation_rec.user_id;

Line 1097: l_tran_rec.trans_um2 := p_ic_item_mst.item_um2;

1093: for MRP purposes.
1094: ===================================================================*/
1095: l_tran_rec.lot_status := NULL;
1096: l_tran_rec.trans_um := p_ic_item_mst.item_um;
1097: l_tran_rec.trans_um2 := p_ic_item_mst.item_um2;
1098: l_tran_rec.staged_ind := 0;
1099: l_tran_rec.text_code := NULL;
1100: l_tran_rec.user_id := p_allocation_rec.user_id;
1101: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;

Line 1101: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;

1097: l_tran_rec.trans_um2 := p_ic_item_mst.item_um2;
1098: l_tran_rec.staged_ind := 0;
1099: l_tran_rec.text_code := NULL;
1100: l_tran_rec.user_id := p_allocation_rec.user_id;
1101: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;
1102: l_tran_rec.create_lot_index := 0;
1103: /* dbms_output.put_line('write a NEW default LOT txn'); */
1104: GMI_TRANS_ENGINE_PUB.create_pending_transaction
1105: (p_api_version => 1.0,

Line 1142: IF p_ic_item_mst.dualum_ind > 0 THEN

1138: l_tran_rec.doc_line := l_default_trans.doc_line;
1139: l_tran_rec.line_type := l_default_trans.line_type;
1140: l_tran_rec.trans_date := l_default_trans.trans_date;
1141: l_tran_rec.trans_qty := p_default_qty1;
1142: IF p_ic_item_mst.dualum_ind > 0 THEN
1143: l_tran_rec.trans_qty2 := p_default_qty2;
1144: ELSE
1145: l_tran_rec.trans_qty2 := NULL;
1146: END IF;

Line 1148: IF p_ic_item_mst.grade_ctl > 0 THEN

1144: ELSE
1145: l_tran_rec.trans_qty2 := NULL;
1146: END IF;
1147:
1148: IF p_ic_item_mst.grade_ctl > 0 THEN
1149: l_tran_rec.qc_grade := p_allocation_rec.prefqc_grade;
1150: ELSE
1151: l_tran_rec.qc_grade := NULL;
1152: END IF;

Line 1154: l_tran_rec.lot_status := p_ic_item_mst.lot_status;

1150: ELSE
1151: l_tran_rec.qc_grade := NULL;
1152: END IF;
1153:
1154: l_tran_rec.lot_status := p_ic_item_mst.lot_status;
1155: l_tran_rec.trans_um := l_default_trans.trans_um;
1156: l_tran_rec.trans_um2 := l_default_trans.trans_um2;
1157: l_tran_rec.staged_ind := l_default_trans.staged_ind;
1158: l_tran_rec.user_id := p_allocation_rec.user_id;

Line 1159: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;

1155: l_tran_rec.trans_um := l_default_trans.trans_um;
1156: l_tran_rec.trans_um2 := l_default_trans.trans_um2;
1157: l_tran_rec.staged_ind := l_default_trans.staged_ind;
1158: l_tran_rec.user_id := p_allocation_rec.user_id;
1159: l_tran_rec.non_inv := p_ic_item_mst.NONINV_IND;
1160: l_tran_rec.create_lot_index := 0;
1161: /* dbms_output.put_line('UPDATE the existing default LOT txn'); */
1162: GMI_TRANS_ENGINE_PUB.update_pending_transaction
1163: (p_api_version => 1.0,

Line 1236: , p_lot_ctl IN ic_item_mst.lot_ctl%TYPE

1232: */
1233: FUNCTION Check_existing_allocations
1234: ( p_doc_id IN ic_tran_pnd.doc_id%TYPE
1235: , p_line_id IN ic_tran_pnd.line_id%TYPE
1236: , p_lot_ctl IN ic_item_mst.lot_ctl%TYPE
1237: , p_item_loct_ctl IN ic_item_mst.loct_ctl%TYPE
1238: , p_whse_loct_ctl IN ic_whse_mst.loct_ctl%TYPE
1239: )
1240: RETURN BOOLEAN

Line 1237: , p_item_loct_ctl IN ic_item_mst.loct_ctl%TYPE

1233: FUNCTION Check_existing_allocations
1234: ( p_doc_id IN ic_tran_pnd.doc_id%TYPE
1235: , p_line_id IN ic_tran_pnd.line_id%TYPE
1236: , p_lot_ctl IN ic_item_mst.lot_ctl%TYPE
1237: , p_item_loct_ctl IN ic_item_mst.loct_ctl%TYPE
1238: , p_whse_loct_ctl IN ic_whse_mst.loct_ctl%TYPE
1239: )
1240: RETURN BOOLEAN
1241: IS