DBA Data[Home] [Help]

APPS.GML_BATCH_OM_RES_PVT dependencies on GML_BATCH_SO_RESERVATIONS

Line 39: p_res_row IN gml_batch_so_reservations%rowtype

35: , x_trans_rec IN OUT NOCOPY GMI_TRANS_ENGINE_PUB.ictran_rec
36: );
37: PROCEDURE build_res_rec
38: (
39: p_res_row IN gml_batch_so_reservations%rowtype
40: , x_res_rec OUT NOCOPY GML_BATCH_OM_UTIL.gme_om_reservation_rec
41: ) ;
42: PROCEDURE PRINT_DEBUG
43: (

Line 77: From gml_batch_so_reservations

73: l_plan_cmplt_date date;
74:
75: Cursor check_whse (p_batch_line_id IN NUMBER) IS
76: Select distinct whse_code
77: From gml_batch_so_reservations
78: Where batch_line_id = p_batch_line_id;
79:
80: Cursor get_batch_line (p_batch_id IN NUMBER) IS
81: Select material_detail_id

Line 91: From gml_batch_so_reservations

87:
88: Cursor get_res_for_whse (p_whse_code IN VARCHAR2
89: , p_batch_line_id IN NUMBER) IS
90: Select *
91: From gml_batch_so_reservations
92: Where batch_line_id = p_batch_line_id
93: and whse_code = p_whse_code
94: and delete_mark = 0
95: and reserved_qty <> 0

Line 113: From gml_batch_so_reservations

109: ;
110: Cursor get_res_count(p_batch_line_id IN NUMBER
111: , p_whse_code IN VARCHAR2) Is
112: Select count(1)
113: From gml_batch_so_reservations
114: Where batch_line_id = p_batch_line_id
115: and whse_code = p_whse_code
116: and delete_mark = 0
117: and reserved_qty <> 0

Line 242: Update gml_batch_so_reservations

238: , X_msg_data => x_msg_data
239: );
240: l_remaining_qty := l_remaining_qty - l_reserved_qty;
241: /* update the fpo reservation records */
242: Update gml_batch_so_reservations
243: Set reserved_qty = reserved_qty - l_reserved_qty
244: , reserved_qty2 = reserved_qty2 - l_reserved_qty2
245: Where batch_res_id = each_rec.batch_res_id;
246: <>

Line 323: From gml_batch_so_reservations res

319: , res.batch_line_id
320: , res.so_line_id
321: , res.delivery_detail_id
322: , res.batch_id
323: From gml_batch_so_reservations res
324: , wsh_delivery_details wdd
325: Where res.batch_line_id = p_batch_line_id
326: and res.delete_mark = 0
327: and res.reserved_qty <> 0

Line 341: From gml_batch_so_reservations res

337: , res.batch_line_id
338: , res.so_line_id
339: , res.delivery_detail_id
340: , res.batch_id
341: From gml_batch_so_reservations res
342: , oe_order_lines_all ol
343: Where res.batch_line_id = p_batch_line_id
344: and res.delete_mark = 0
345: and res.reserved_qty <> 0

Line 391: From gml_batch_so_reservations

387: IF l_rule_rec.allocation_priority = 2 THEN /* distribute evenly*/
388: GMI_RESERVATION_UTIL.println('Create Allocations: distribute evenly');
389: Select count(1)
390: Into l_res_count
391: From gml_batch_so_reservations
392: Where batch_line_id = p_batch_line_rec.batch_line_id
393: and delete_mark = 0
394: and reserved_qty <> 0
395: and whse_code = l_gme_trans_row.whse_code -- beta testing

Line 617: Update gml_batch_so_reservations

613: l_remaining_alloc_qty := l_remaining_alloc_qty - abs(l_tran_rec.trans_qty);
614: l_remaining_alloc_qty2 := l_remaining_alloc_qty2 - abs(l_tran_rec.trans_qty2);
615: IF l_alloc_done = 1 THEN
616: /* update the reservation record */
617: Update gml_batch_so_reservations
618: Set allocated_ind = 1
619: , reserved_qty = reserved_qty - abs(l_tran_row.trans_qty)
620: , reserved_qty2 = reserved_qty2 - abs(l_tran_row.trans_qty2)
621: Where batch_res_id = res_rec.batch_res_id;

Line 624: Update gml_batch_so_reservations

620: , reserved_qty2 = reserved_qty2 - abs(l_tran_row.trans_qty2)
621: Where batch_res_id = res_rec.batch_res_id;
622: /* delete the reservation record if over allocated */
623: IF l_over_alloc = 1 THEN
624: Update gml_batch_so_reservations
625: Set delete_mark = 1
626: Where batch_res_id = res_rec.batch_res_id;
627: END IF;
628: END IF;

Line 863: Update gml_batch_so_reservations

859: GMI_reservation_Util.PrintLn('cancel_res_for_batch_line: batch_line_id '||p_batch_line_id);
860: GMI_reservation_Util.PrintLn('cancel_res_for_batch_line: whse_code '||p_whse_code);
861: /* this would remove all the un-staged trans */
862: IF p_batch_line_id is not null and p_whse_code is null THEN
863: Update gml_batch_so_reservations
864: Set delete_mark = 1
865: Where batch_line_id = p_batch_line_id
866: and delete_mark = 0;
867: IF SQL%NOTFOUND THEN

Line 872: Update gml_batch_so_reservations

868: GMI_reservation_Util.PrintLn('cancel_res_for_batch_line: no reservations');
869: END IF;
870: END IF;
871: IF p_batch_line_id is not null and p_whse_code is not null THEN
872: Update gml_batch_so_reservations
873: Set delete_mark = 1
874: Where batch_line_id = p_batch_line_id
875: and whse_code = p_whse_code
876: and delete_mark = 0;

Line 898: Update gml_batch_so_reservations

894: x_return_status := FND_API.G_RET_STS_SUCCESS;
895: GMI_reservation_Util.PrintLn('cancel_res_for_so_line: so_line_id '||p_so_line_id);
896: /* this would remove all the un-staged trans */
897: IF p_so_line_id is not null THEN
898: Update gml_batch_so_reservations
899: Set delete_mark = 1
900: Where so_line_id = p_so_line_id
901: and delete_mark = 0;
902: IF SQL%NOTFOUND THEN

Line 921: Update gml_batch_so_reservations

917: x_return_status := FND_API.G_RET_STS_SUCCESS;
918: GMI_reservation_Util.PrintLn('cancel_res_for_batch: batch_id '||p_batch_id);
919: /* this would remove all the un-staged trans */
920: IF p_batch_id is not null THEN
921: Update gml_batch_so_reservations
922: Set delete_mark = 1
923: Where batch_id = p_batch_id
924: and delete_mark = 0;
925: IF SQL%NOTFOUND THEN

Line 994: FROM gml_batch_so_reservations

990:
991:
992: CURSOR So_line_id_for_batch(p_batch_id IN NUMBER) Is
993: SELECT Distinct so_line_id
994: FROM gml_batch_so_reservations
995: WHERE batch_id = p_batch_id
996: and delete_mark = 0
997: and reserved_qty <> 0;
998:

Line 1007: FROM gml_batch_so_reservations

1003:
1004:
1005: CURSOR So_line_id_for_batch_line(p_batch_line_id IN NUMBER) Is
1006: SELECT Distinct so_line_id
1007: FROM gml_batch_so_reservations
1008: WHERE batch_line_id = p_batch_line_id
1009: and delete_mark = 0
1010: and reserved_qty <> 0;
1011:

Line 1072: From gml_batch_so_reservations

1068: ;
1069: Cursor check_mul_line_id1 (p_user_id IN number
1070: , p_batch_id IN NUMBER) IS
1071: Select distinct so_line_id
1072: From gml_batch_so_reservations
1073: Where created_by = p_user_id
1074: and batch_id = p_batch_id;
1075:
1076: Cursor check_mul_line_id2 (p_user_id IN number

Line 1080: From gml_batch_so_reservations

1076: Cursor check_mul_line_id2 (p_user_id IN number
1077: , p_batch_id IN NUMBER
1078: , p_batch_line_id IN NUMBER) IS
1079: Select distinct so_line_id
1080: From gml_batch_so_reservations
1081: Where created_by = p_user_id
1082: and batch_id = p_batch_id
1083: and batch_line_id = p_batch_line_id;
1084:

Line 1464: FROM gml_batch_so_reservations

1460: cursor c_reservations IS
1461: SELECT reserved_qty
1462: , reserved_qty2
1463: , batch_res_id
1464: FROM gml_batch_so_reservations
1465: WHERE so_line_id = p_old_source_line_id
1466: AND delivery_detail_id = p_old_delivery_detail_id
1467: AND delete_mark = 0
1468: AND reserved_qty <> 0

Line 1475: FROM gml_batch_so_reservations

1471: cursor c_reservations1 IS -- Not booked
1472: SELECT reserved_qty
1473: , reserved_qty2
1474: , batch_res_id
1475: FROM gml_batch_so_reservations
1476: WHERE so_line_id = p_old_source_line_id
1477: AND delete_mark = 0
1478: AND reserved_qty <> 0
1479: ORDER BY 1; /* the smaller qty is at the top, keep in mind it is neg */

Line 1519: Update gml_batch_so_reservations

1515: GMI_RESERVATION_UTIL.Println(' p_old_source_line_id '||p_old_source_line_id);
1516: GMI_RESERVATION_UTIL.Println(' p_new_source_line_id '||p_new_source_line_id);
1517:
1518: IF p_action = 'B' THEN -- Back ordering or staging
1519: Update gml_batch_so_reservations
1520: Set so_line_id = p_new_source_line_id
1521: Where so_line_id = p_old_source_line_id
1522: And delete_mark = 0
1523: And reserved_qty <> 0;

Line 1573: update gml_batch_so_reservations

1569: GMI_RESERVATION_UTIL.Println('in split_res, reserved_qty '||res_rec.reserved_qty);
1570: l_qty_to_fulfil := l_qty_to_fulfil - abs(res_rec.reserved_qty);
1571: l_qty2_to_fulfil := l_qty2_to_fulfil - abs(res_rec.reserved_qty2);
1572: ELSIF res_rec.reserved_qty > l_qty_to_fulfil AND l_qty_to_fulfil > 0 THEN
1573: update gml_batch_so_reservations
1574: set reserved_qty = l_qty_to_fulfil
1575: , reserved_qty2 = l_qty2_to_fulfil
1576: Where batch_res_id = res_rec.batch_res_id;
1577:

Line 1612: update gml_batch_so_reservations

1608: ELSIF l_qty_to_fulfil <= 0 THEN
1609: GMI_RESERVATION_UTIL.Println('in split_res, update res '||res_rec.batch_res_id);
1610: GMI_RESERVATION_UTIL.Println('in split_res, reserved_qty '||res_rec.reserved_qty);
1611: -- simply update the rest with the new wdd id and new line_id
1612: update gml_batch_so_reservations
1613: set delivery_detail_id = p_new_delivery_detail_id
1614: , so_line_id = p_new_source_line_id
1615: Where batch_res_id = res_rec.batch_res_id;
1616: END IF;

Line 1699: update gml_batch_so_reservations

1695: THEN
1696: return;
1697: END IF;
1698:
1699: update gml_batch_so_reservations
1700: set delivery_detail_id = p_delivery_detail_id
1701: Where so_line_id = p_so_line_id
1702: and delete_mark = 0;
1703:

Line 1804: p_res_row IN gml_batch_so_reservations%rowtype

1800: END build_trans_rec;
1801:
1802: PROCEDURE build_res_rec
1803: (
1804: p_res_row IN gml_batch_so_reservations%rowtype
1805: , x_res_rec OUT NOCOPY GML_BATCH_OM_UTIL.gme_om_reservation_rec
1806: ) IS
1807: BEGIN
1808: x_res_rec.batch_res_id := null;