DBA Data[Home] [Help]

APPS.GMI_ALLOCATE_INVENTORY_PVT dependencies on OP_ALOT_PRM

Line 17: | allocation parameters op_alot_prm. |

13: | DESCRIPTION |
14: | Analyze available inventory at the most detailed level to locate |
15: | stock suitable for allocation to the current shipment/order line. |
16: | Allocation must be in accordance with the rules defined in the |
17: | allocation parameters op_alot_prm. |
18: | The quantity successfully allocated is returned expressed in the |
19: | inventory item primary and secondary unit of measure. |
20: | |
21: | PARAMETERS |

Line 26: | p_op_alot_prm IN op_alot_prm%ROWTYPE |

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 |
29: | x_return_status OUT VARCHAR2 |
30: | x_msg_count OUT NUMBER |

Line 43: , p_op_alot_prm IN op_alot_prm%ROWTYPE

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
46: , x_allocated_qty2 OUT NOCOPY NUMBER
47: , x_return_status OUT NOCOPY VARCHAR2

Line 187: l_lot_qty := p_op_alot_prm.lot_qty;

183: l_override_rules := 1;
184: ELSE l_override_rules := 0;
185: END IF;
186:
187: l_lot_qty := p_op_alot_prm.lot_qty;
188:
189: /*Check allocation horizon
190: =========================*/
191:

Line 193: /* ('allocation horizon is set to '|| p_op_alot_prm.alloc_horizon); */

189: /*Check allocation horizon
190: =========================*/
191:
192: /* dbms_output.put_line */
193: /* ('allocation horizon is set to '|| p_op_alot_prm.alloc_horizon); */
194: /* dbms_output.put_line */
195: /* ('trans date ' || p_allocation_rec.trans_date || ' vs system date ' || SYSDATE); */
196:
197: gmi_reservation_util.println

Line 198: ('OPM Allocation Engine - allocation parameter used is ' || p_op_alot_prm.allocrule_id);

194: /* dbms_output.put_line */
195: /* ('trans date ' || p_allocation_rec.trans_date || ' vs system date ' || SYSDATE); */
196:
197: gmi_reservation_util.println
198: ('OPM Allocation Engine - allocation parameter used is ' || p_op_alot_prm.allocrule_id);
199: gmi_reservation_util.println
200: ('OPM Allocation Engine - allocation horizon is ' || p_op_alot_prm.alloc_horizon);
201:
202: IF (l_override_rules = 0 AND p_op_alot_prm.alloc_horizon > 0) AND

Line 200: ('OPM Allocation Engine - allocation horizon is ' || p_op_alot_prm.alloc_horizon);

196:
197: gmi_reservation_util.println
198: ('OPM Allocation Engine - allocation parameter used is ' || p_op_alot_prm.allocrule_id);
199: gmi_reservation_util.println
200: ('OPM Allocation Engine - allocation horizon is ' || p_op_alot_prm.alloc_horizon);
201:
202: IF (l_override_rules = 0 AND p_op_alot_prm.alloc_horizon > 0) AND
203: (p_allocation_rec.trans_date > (SYSDATE + p_op_alot_prm.alloc_horizon)) THEN
204: /* dbms_output.put_line('allocation horizon is out - using '|| p_op_alot_prm.alloc_horizon); */

Line 202: IF (l_override_rules = 0 AND p_op_alot_prm.alloc_horizon > 0) AND

198: ('OPM Allocation Engine - allocation parameter used is ' || p_op_alot_prm.allocrule_id);
199: gmi_reservation_util.println
200: ('OPM Allocation Engine - allocation horizon is ' || p_op_alot_prm.alloc_horizon);
201:
202: IF (l_override_rules = 0 AND p_op_alot_prm.alloc_horizon > 0) AND
203: (p_allocation_rec.trans_date > (SYSDATE + p_op_alot_prm.alloc_horizon)) THEN
204: /* dbms_output.put_line('allocation horizon is out - using '|| p_op_alot_prm.alloc_horizon); */
205: GMI_RESERVATION_UTIL.println('Allocation Horizon error: Scheduled ship date falls outside the allocation horizon');
206: FND_MESSAGE.SET_NAME('GML','SO_E_ALLOC_HORIZON_ERR');

Line 203: (p_allocation_rec.trans_date > (SYSDATE + p_op_alot_prm.alloc_horizon)) THEN

199: gmi_reservation_util.println
200: ('OPM Allocation Engine - allocation horizon is ' || p_op_alot_prm.alloc_horizon);
201:
202: IF (l_override_rules = 0 AND p_op_alot_prm.alloc_horizon > 0) AND
203: (p_allocation_rec.trans_date > (SYSDATE + p_op_alot_prm.alloc_horizon)) THEN
204: /* dbms_output.put_line('allocation horizon is out - using '|| p_op_alot_prm.alloc_horizon); */
205: GMI_RESERVATION_UTIL.println('Allocation Horizon error: Scheduled ship date falls outside the allocation horizon');
206: FND_MESSAGE.SET_NAME('GML','SO_E_ALLOC_HORIZON_ERR');
207: FND_MSG_PUB.Add;

Line 204: /* dbms_output.put_line('allocation horizon is out - using '|| p_op_alot_prm.alloc_horizon); */

200: ('OPM Allocation Engine - allocation horizon is ' || p_op_alot_prm.alloc_horizon);
201:
202: IF (l_override_rules = 0 AND p_op_alot_prm.alloc_horizon > 0) AND
203: (p_allocation_rec.trans_date > (SYSDATE + p_op_alot_prm.alloc_horizon)) THEN
204: /* dbms_output.put_line('allocation horizon is out - using '|| p_op_alot_prm.alloc_horizon); */
205: GMI_RESERVATION_UTIL.println('Allocation Horizon error: Scheduled ship date falls outside the allocation horizon');
206: FND_MESSAGE.SET_NAME('GML','SO_E_ALLOC_HORIZON_ERR');
207: FND_MSG_PUB.Add;
208: RAISE FND_API.G_EXC_ERROR;

Line 236: l_shelf_date := p_allocation_rec.trans_date + p_op_alot_prm.shelf_days;

232: IF (l_override_rules = 1)
233: THEN
234: l_shelf_date := p_allocation_rec.trans_date;
235: ELSE
236: l_shelf_date := p_allocation_rec.trans_date + p_op_alot_prm.shelf_days;
237: END IF;
238: ll_shelf_date := TO_CHAR(l_shelf_date,'DD-MON-YYYY, HH:MI:SS');
239:
240: l_whse_code := p_ic_whse_mst.whse_code;

Line 292: GMI_Reservation_Util.PrintLn('(Alloc PVT) p_op_alot_prm.prefqc_grade = ' || p_op_alot_prm.prefqc_grade);

288: /*Apply preferred QC grade if appropriate
289: ========================================*/
290: GMI_RESERVATION_UTIL.println('(ALLOC PVT) :l_allocation_rec.prefqc_grade'|| l_allocation_rec.prefqc_grade);
291: GMI_Reservation_Util.PrintLn('(Alloc PVT) p_allocation_rec.prefqc_grade = ' || p_allocation_rec.prefqc_grade);
292: GMI_Reservation_Util.PrintLn('(Alloc PVT) p_op_alot_prm.prefqc_grade = ' || p_op_alot_prm.prefqc_grade);
293:
294: --2722339 EMC Auto Alloc QC Spec Match Project
295: --If matching on Grade, preference is given to grade taken from sales order
296: --line. Otherwise, grade is taken from Sales Order/Shipping Parameter form.

Line 304: l_grade_or_qcmatch_flag := p_op_alot_prm.grade_or_qc_flag;

300: THEN
301: l_grade_or_qcmatch_flag := 0;
302: l_prm_prefqc_grade := NULL;
303: ELSE
304: l_grade_or_qcmatch_flag := p_op_alot_prm.grade_or_qc_flag;
305: l_prm_prefqc_grade := p_op_alot_prm.prefqc_grade;
306: END IF;
307:
308:

Line 305: l_prm_prefqc_grade := p_op_alot_prm.prefqc_grade;

301: l_grade_or_qcmatch_flag := 0;
302: l_prm_prefqc_grade := NULL;
303: ELSE
304: l_grade_or_qcmatch_flag := p_op_alot_prm.grade_or_qc_flag;
305: l_prm_prefqc_grade := p_op_alot_prm.prefqc_grade;
306: END IF;
307:
308:
309: l_allocation_rec.prefqc_grade := p_allocation_rec.prefqc_grade;

Line 524: IF (p_op_alot_prm.alloc_method = 0) THEN /* FIFO */

520:
521: /*Order rows according to the allocation method chosen
522: =====================================================*/
523: IF ( l_override_rules = 0 ) THEN
524: IF (p_op_alot_prm.alloc_method = 0) THEN /* FIFO */
525: l_order_by := ' lot_created' ;
526: ELSE /* FEFO */
527: l_order_by := ' expire_date';
528: END IF;

Line 722: GMI_RESERVATION_UTIL.PrintLn('what is lot_qty config '|| p_op_alot_prm.lot_qty);

718:
719: GMI_RESERVATION_UTIL.PrintLn('onhand is ' || l_loct_onhand);
720: GMI_RESERVATION_UTIL.PrintLn('committed is ' || l_commit_qty );
721: GMI_RESERVATION_UTIL.PrintLn('available is ' || l_available_inventory1);
722: GMI_RESERVATION_UTIL.PrintLn('what is lot_qty config '|| p_op_alot_prm.lot_qty);
723:
724:
725: --2722339 EMC Auto Alloc QC Spec Match Project
726: --If Customer Spec indicated, allocate only to matched result rows

Line 738: l_lot_qty := p_op_alot_prm.lot_qty;

734: l_batch_rec.lots_indivisible_flag = 'Y')
735: THEN
736: l_lot_indivisible := 1;
737: END IF;
738: l_lot_qty := p_op_alot_prm.lot_qty;
739: IF(l_batch_rec.override_rules = 'Y')
740: THEN
741: l_lot_qty := 0;
742: END IF;

Line 889: IF (l_unallocated_qty1 > 0 and (p_op_alot_prm.partial_ind = 0 AND (l_override_rules = 0 ) ) )

885: record a partial allocation; the whole quantity must be written against
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'); */

Line 895: GMI_Reservation_Util.PrintLn('(Alloc PVT) partial _ind'|| p_op_alot_prm.partial_ind);

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 ');
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;