DBA Data[Home] [Help]

APPS.GMI_ALLOCATE_INVENTORY_PVT dependencies on IC_TRAN_PND

Line 73: l_lot_status IC_TRAN_PND.LOT_STATUS%TYPE;

69: l_lot_no IC_LOTS_MST.LOT_NO%TYPE :=0;
70: l_sublot_no IC_LOTS_MST.SUBLOT_NO%TYPE :=0;
71: l_loct_ctl NUMBER(2);
72: l_lot_id IC_LOTS_MST.LOT_ID%TYPE :=0;
73: l_lot_status IC_TRAN_PND.LOT_STATUS%TYPE;
74: l_lot_created IC_LOTS_MST.LOT_CREATED%TYPE;
75: l_location IC_TRAN_PND.LOCATION%TYPE;
76: l_expire_date IC_LOTS_MST.EXPIRE_DATE%TYPE;
77: l_qc_grade IC_LOTS_MST.QC_GRADE%TYPE;

Line 75: l_location IC_TRAN_PND.LOCATION%TYPE;

71: l_loct_ctl NUMBER(2);
72: l_lot_id IC_LOTS_MST.LOT_ID%TYPE :=0;
73: l_lot_status IC_TRAN_PND.LOT_STATUS%TYPE;
74: l_lot_created IC_LOTS_MST.LOT_CREATED%TYPE;
75: l_location IC_TRAN_PND.LOCATION%TYPE;
76: l_expire_date IC_LOTS_MST.EXPIRE_DATE%TYPE;
77: l_qc_grade IC_LOTS_MST.QC_GRADE%TYPE;
78: l_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;
79:

Line 78: l_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;

74: l_lot_created IC_LOTS_MST.LOT_CREATED%TYPE;
75: l_location IC_TRAN_PND.LOCATION%TYPE;
76: l_expire_date IC_LOTS_MST.EXPIRE_DATE%TYPE;
77: l_qc_grade IC_LOTS_MST.QC_GRADE%TYPE;
78: l_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;
79:
80: ll_shelf_date VARCHAR2(32);
81: l_from_expiration_date VARCHAR2(32);
82: l_to_expiration_date VARCHAR2(32);

Line 86: ll_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;

82: l_to_expiration_date VARCHAR2(32);
83: l_from_creation_date VARCHAR2(32);
84: l_to_creation_date VARCHAR2(32);
85: /*
86: ll_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;
87: l_from_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
88: l_to_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
89: l_from_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
90: l_to_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;

Line 87: l_from_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;

83: l_from_creation_date VARCHAR2(32);
84: l_to_creation_date VARCHAR2(32);
85: /*
86: ll_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;
87: l_from_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
88: l_to_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
89: l_from_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
90: l_to_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
91: */

Line 88: l_to_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;

84: l_to_creation_date VARCHAR2(32);
85: /*
86: ll_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;
87: l_from_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
88: l_to_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
89: l_from_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
90: l_to_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
91: */
92: l_override_rules NUMBER DEFAULT 0;

Line 89: l_from_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;

85: /*
86: ll_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;
87: l_from_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
88: l_to_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
89: l_from_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
90: l_to_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
91: */
92: l_override_rules NUMBER DEFAULT 0;
93: l_whse_code IC_WHSE_MST.WHSE_CODE%TYPE;

Line 90: l_to_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;

86: ll_shelf_date IC_TRAN_PND.TRANS_DATE%TYPE;
87: l_from_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
88: l_to_expiration_date IC_TRAN_PND.TRANS_DATE%TYPE;
89: l_from_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
90: l_to_creation_date IC_TRAN_PND.TRANS_DATE%TYPE;
91: */
92: l_override_rules NUMBER DEFAULT 0;
93: l_whse_code IC_WHSE_MST.WHSE_CODE%TYPE;
94: l_IC$DEFAULT_LOCT IC_LOCT_MST.LOCATION%TYPE;

Line 98: l_tran_row IC_TRAN_PND%ROWTYPE;

94: l_IC$DEFAULT_LOCT IC_LOCT_MST.LOCATION%TYPE;
95: l_where_clause VARCHAR2(3000):= NULL;
96: l_order_by VARCHAR2(1000):= NULL;
97: l_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
98: l_tran_row IC_TRAN_PND%ROWTYPE;
99: l_allocation_rec GMI_AUTO_ALLOCATE_PUB.gmi_allocation_rec;
100: l_batch_rec GMI_AUTO_ALLOCATION_BATCH%ROWTYPE;
101: l_lot_indivisible NUMBER;
102: l_lot_qty NUMBER;

Line 790: /*If suitable stock has been located, write a transaction to ic_tran_pnd

786: l_allocation_successful := 'Y';
787: END IF;
788: END IF;
789:
790: /*If suitable stock has been located, write a transaction to ic_tran_pnd
791: =======================================================================*/
792: GMI_Reservation_Util.PrintLn('(Alloc PVT) l_allocation_successful = ' || l_allocation_successful);
793: If l_allocation_successful = 'Y' THEN
794: /*Convert allocated qty to secondary UM where appropriate

Line 1029: l_tran_row IC_TRAN_PND%ROWTYPE;

1025: l_msg_count NUMBER :=0;
1026: l_msg_data VARCHAR2(2000);
1027: l_return_status VARCHAR2(1);
1028: l_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
1029: l_tran_row IC_TRAN_PND%ROWTYPE;
1030: l_default_trans ic_tran_pnd%ROWTYPE;
1031:
1032: CURSOR ic_tran_pnd_c1 is
1033: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */ *

Line 1030: l_default_trans ic_tran_pnd%ROWTYPE;

1026: l_msg_data VARCHAR2(2000);
1027: l_return_status VARCHAR2(1);
1028: l_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
1029: l_tran_row IC_TRAN_PND%ROWTYPE;
1030: l_default_trans ic_tran_pnd%ROWTYPE;
1031:
1032: CURSOR ic_tran_pnd_c1 is
1033: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */ *
1034: FROM ic_tran_pnd

Line 1032: CURSOR ic_tran_pnd_c1 is

1028: l_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
1029: l_tran_row IC_TRAN_PND%ROWTYPE;
1030: l_default_trans ic_tran_pnd%ROWTYPE;
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

Line 1033: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */ *

1029: l_tran_row IC_TRAN_PND%ROWTYPE;
1030: l_default_trans ic_tran_pnd%ROWTYPE;
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

Line 1034: FROM ic_tran_pnd

1030: l_default_trans ic_tran_pnd%ROWTYPE;
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

Line 1057: OPEN ic_tran_pnd_c1;

1053: /* dbms_output.put_line('DEFAULT LOT retrieved as '|| IC$DEFAULT_LOCT); */
1054:
1055: /*Determine whether or not a row exists for the DEFAULT LOT
1056: ==========================================================*/
1057: OPEN ic_tran_pnd_c1;
1058: FETCH ic_tran_pnd_c1 INTO l_default_trans;
1059: IF ic_tran_pnd_c1%NOTFOUND THEN
1060: CLOSE ic_tran_pnd_c1;
1061: /*Set up parameters in readiness for writing a pending transaction

Line 1058: FETCH ic_tran_pnd_c1 INTO l_default_trans;

1054:
1055: /*Determine whether or not a row exists for the DEFAULT LOT
1056: ==========================================================*/
1057: OPEN ic_tran_pnd_c1;
1058: FETCH ic_tran_pnd_c1 INTO l_default_trans;
1059: IF ic_tran_pnd_c1%NOTFOUND THEN
1060: CLOSE ic_tran_pnd_c1;
1061: /*Set up parameters in readiness for writing a pending transaction
1062: =================================================================*/

Line 1059: IF ic_tran_pnd_c1%NOTFOUND THEN

1055: /*Determine whether or not a row exists for the DEFAULT LOT
1056: ==========================================================*/
1057: OPEN ic_tran_pnd_c1;
1058: FETCH ic_tran_pnd_c1 INTO l_default_trans;
1059: IF ic_tran_pnd_c1%NOTFOUND THEN
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;

Line 1060: CLOSE ic_tran_pnd_c1;

1056: ==========================================================*/
1057: OPEN ic_tran_pnd_c1;
1058: FETCH ic_tran_pnd_c1 INTO l_default_trans;
1059: IF ic_tran_pnd_c1%NOTFOUND THEN
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;

Line 1123: CLOSE ic_tran_pnd_c1;

1119: /* dbms_output.put_line('unexpected error return from txn engine'); */
1120: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1121: END IF;
1122: ELSE
1123: CLOSE ic_tran_pnd_c1;
1124:
1125: /*This is a UPDATE scenario so ..........
1126: Set up parameters in readiness for updating the pending transaction
1127: ====================================================================*/

Line 1219: | This function checks ic_tran_pnd for outstanding allocations |

1215: | Used to determine whether allocations already exist against the |
1216: | order/shipment line in question |
1217: | |
1218: | DESCRIPTION |
1219: | This function checks ic_tran_pnd for outstanding allocations |
1220: | against the order/shipment line. |
1221: | |
1222: | PARAMETERS |
1223: | p_doc_id Surrogate key relating to the order/shipment |

Line 1234: ( p_doc_id IN ic_tran_pnd.doc_id%TYPE

1230: | 06-JAN-2000 Karen Y. Hunt Created |
1231: +=========================================================================+
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

Line 1235: , p_line_id IN ic_tran_pnd.line_id%TYPE

1231: +=========================================================================+
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: )

Line 1248: CURSOR ic_tran_pnd_c1 IS

1244: IC$DEFAULT_LOCT VARCHAR2(255);
1245:
1246: /* Scenario a) item has lot control */
1247: /* ================================ */
1248: CURSOR ic_tran_pnd_c1 IS
1249: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1250: sum(trans_qty)
1251: FROM
1252: ic_tran_pnd

Line 1249: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */

1245:
1246: /* Scenario a) item has lot control */
1247: /* ================================ */
1248: CURSOR ic_tran_pnd_c1 IS
1249: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1250: sum(trans_qty)
1251: FROM
1252: ic_tran_pnd
1253: WHERE

Line 1252: ic_tran_pnd

1248: CURSOR ic_tran_pnd_c1 IS
1249: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1250: sum(trans_qty)
1251: FROM
1252: ic_tran_pnd
1253: WHERE
1254: doc_id = p_doc_id AND
1255: line_id = p_line_id AND
1256: doc_type = 'OMSO' AND

Line 1263: CURSOR ic_tran_pnd_c2 IS

1259: delete_mark = 0;
1260:
1261: /* Scenario b) item has location control */
1262: /* ===================================== */
1263: CURSOR ic_tran_pnd_c2 IS
1264: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1265: sum(trans_qty)
1266: FROM
1267: ic_tran_pnd

Line 1264: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */

1260:
1261: /* Scenario b) item has location control */
1262: /* ===================================== */
1263: CURSOR ic_tran_pnd_c2 IS
1264: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1265: sum(trans_qty)
1266: FROM
1267: ic_tran_pnd
1268: WHERE

Line 1267: ic_tran_pnd

1263: CURSOR ic_tran_pnd_c2 IS
1264: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1265: sum(trans_qty)
1266: FROM
1267: ic_tran_pnd
1268: WHERE
1269: doc_id = p_doc_id AND
1270: line_id = p_line_id AND
1271: location <>IC$DEFAULT_LOCT AND

Line 1278: CURSOR ic_tran_pnd_c3 IS

1274: delete_mark = 0;
1275:
1276: /* Scenario c) item has NO lot or location control */
1277: /* =============================================== */
1278: CURSOR ic_tran_pnd_c3 IS
1279: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1280: sum(trans_qty)
1281: FROM
1282: ic_tran_pnd

Line 1279: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */

1275:
1276: /* Scenario c) item has NO lot or location control */
1277: /* =============================================== */
1278: CURSOR ic_tran_pnd_c3 IS
1279: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1280: sum(trans_qty)
1281: FROM
1282: ic_tran_pnd
1283: WHERE

Line 1282: ic_tran_pnd

1278: CURSOR ic_tran_pnd_c3 IS
1279: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1280: sum(trans_qty)
1281: FROM
1282: ic_tran_pnd
1283: WHERE
1284: doc_id = p_doc_id AND
1285: line_id = p_line_id AND
1286: doc_type = 'OMSO' AND

Line 1294: OPEN ic_tran_pnd_c1;

1290:
1291: BEGIN
1292: IF p_lot_ctl > 0 THEN
1293: /* dbms_output.put_line('check allocations for lot control '); */
1294: OPEN ic_tran_pnd_c1;
1295: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;
1296: IF (ic_tran_pnd_c1%NOTFOUND) THEN
1297: l_sum_trans_qty :=0;
1298: END IF;

Line 1295: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;

1291: BEGIN
1292: IF p_lot_ctl > 0 THEN
1293: /* dbms_output.put_line('check allocations for lot control '); */
1294: OPEN ic_tran_pnd_c1;
1295: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;
1296: IF (ic_tran_pnd_c1%NOTFOUND) THEN
1297: l_sum_trans_qty :=0;
1298: END IF;
1299: CLOSE ic_tran_pnd_c1;

Line 1296: IF (ic_tran_pnd_c1%NOTFOUND) THEN

1292: IF p_lot_ctl > 0 THEN
1293: /* dbms_output.put_line('check allocations for lot control '); */
1294: OPEN ic_tran_pnd_c1;
1295: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;
1296: IF (ic_tran_pnd_c1%NOTFOUND) THEN
1297: l_sum_trans_qty :=0;
1298: END IF;
1299: CLOSE ic_tran_pnd_c1;
1300: ELSIF (p_item_loct_ctl > 0 OR p_whse_loct_ctl > 0) THEN

Line 1299: CLOSE ic_tran_pnd_c1;

1295: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;
1296: IF (ic_tran_pnd_c1%NOTFOUND) THEN
1297: l_sum_trans_qty :=0;
1298: END IF;
1299: CLOSE ic_tran_pnd_c1;
1300: ELSIF (p_item_loct_ctl > 0 OR p_whse_loct_ctl > 0) THEN
1301: /* dbms_output.put_line('check allocations for location control '); */
1302: IC$DEFAULT_LOCT := FND_PROFILE.VALUE('IC$DEFAULT_LOCT');
1303: OPEN ic_tran_pnd_c2;

Line 1303: OPEN ic_tran_pnd_c2;

1299: CLOSE ic_tran_pnd_c1;
1300: ELSIF (p_item_loct_ctl > 0 OR p_whse_loct_ctl > 0) THEN
1301: /* dbms_output.put_line('check allocations for location control '); */
1302: IC$DEFAULT_LOCT := FND_PROFILE.VALUE('IC$DEFAULT_LOCT');
1303: OPEN ic_tran_pnd_c2;
1304: FETCH ic_tran_pnd_c2 into l_sum_trans_qty;
1305: IF (ic_tran_pnd_c2%NOTFOUND) THEN
1306: l_sum_trans_qty :=0;
1307: END IF;

Line 1304: FETCH ic_tran_pnd_c2 into l_sum_trans_qty;

1300: ELSIF (p_item_loct_ctl > 0 OR p_whse_loct_ctl > 0) THEN
1301: /* dbms_output.put_line('check allocations for location control '); */
1302: IC$DEFAULT_LOCT := FND_PROFILE.VALUE('IC$DEFAULT_LOCT');
1303: OPEN ic_tran_pnd_c2;
1304: FETCH ic_tran_pnd_c2 into l_sum_trans_qty;
1305: IF (ic_tran_pnd_c2%NOTFOUND) THEN
1306: l_sum_trans_qty :=0;
1307: END IF;
1308: CLOSE ic_tran_pnd_c2;

Line 1305: IF (ic_tran_pnd_c2%NOTFOUND) THEN

1301: /* dbms_output.put_line('check allocations for location control '); */
1302: IC$DEFAULT_LOCT := FND_PROFILE.VALUE('IC$DEFAULT_LOCT');
1303: OPEN ic_tran_pnd_c2;
1304: FETCH ic_tran_pnd_c2 into l_sum_trans_qty;
1305: IF (ic_tran_pnd_c2%NOTFOUND) THEN
1306: l_sum_trans_qty :=0;
1307: END IF;
1308: CLOSE ic_tran_pnd_c2;
1309: ELSE

Line 1308: CLOSE ic_tran_pnd_c2;

1304: FETCH ic_tran_pnd_c2 into l_sum_trans_qty;
1305: IF (ic_tran_pnd_c2%NOTFOUND) THEN
1306: l_sum_trans_qty :=0;
1307: END IF;
1308: CLOSE ic_tran_pnd_c2;
1309: ELSE
1310: /* dbms_output.put_line('check allocations - no lot/loct control '); */
1311: OPEN ic_tran_pnd_c3;
1312: FETCH ic_tran_pnd_c3 into l_sum_trans_qty;

Line 1311: OPEN ic_tran_pnd_c3;

1307: END IF;
1308: CLOSE ic_tran_pnd_c2;
1309: ELSE
1310: /* dbms_output.put_line('check allocations - no lot/loct control '); */
1311: OPEN ic_tran_pnd_c3;
1312: FETCH ic_tran_pnd_c3 into l_sum_trans_qty;
1313: IF (ic_tran_pnd_c3%NOTFOUND) THEN
1314: l_sum_trans_qty :=0;
1315: END IF;

Line 1312: FETCH ic_tran_pnd_c3 into l_sum_trans_qty;

1308: CLOSE ic_tran_pnd_c2;
1309: ELSE
1310: /* dbms_output.put_line('check allocations - no lot/loct control '); */
1311: OPEN ic_tran_pnd_c3;
1312: FETCH ic_tran_pnd_c3 into l_sum_trans_qty;
1313: IF (ic_tran_pnd_c3%NOTFOUND) THEN
1314: l_sum_trans_qty :=0;
1315: END IF;
1316: CLOSE ic_tran_pnd_c3;

Line 1313: IF (ic_tran_pnd_c3%NOTFOUND) THEN

1309: ELSE
1310: /* dbms_output.put_line('check allocations - no lot/loct control '); */
1311: OPEN ic_tran_pnd_c3;
1312: FETCH ic_tran_pnd_c3 into l_sum_trans_qty;
1313: IF (ic_tran_pnd_c3%NOTFOUND) THEN
1314: l_sum_trans_qty :=0;
1315: END IF;
1316: CLOSE ic_tran_pnd_c3;
1317: END IF;

Line 1316: CLOSE ic_tran_pnd_c3;

1312: FETCH ic_tran_pnd_c3 into l_sum_trans_qty;
1313: IF (ic_tran_pnd_c3%NOTFOUND) THEN
1314: l_sum_trans_qty :=0;
1315: END IF;
1316: CLOSE ic_tran_pnd_c3;
1317: END IF;
1318:
1319:
1320: IF l_sum_trans_qty <> 0 THEN

Line 1345: | This function checks ic_tran_pnd for outstanding allocations |

1341: | Used to determine whether allocations already exist against the |
1342: | order/shipment line in question |
1343: | |
1344: | DESCRIPTION |
1345: | This function checks ic_tran_pnd for outstanding allocations |
1346: | against the order/shipment line. |
1347: | |
1348: | PARAMETERS |
1349: | p_doc_id Surrogate key relating to the order/shipment |

Line 1360: ( p_doc_id IN ic_tran_pnd.doc_id%TYPE

1356: | 06-JAN-2000 Karen Y. Hunt Created |
1357: +=========================================================================+
1358: */
1359: FUNCTION Unstaged_Allocations_Exist
1360: ( p_doc_id IN ic_tran_pnd.doc_id%TYPE
1361: , p_line_id IN ic_tran_pnd.line_id%TYPE
1362: )
1363: RETURN BOOLEAN
1364: IS

Line 1361: , p_line_id IN ic_tran_pnd.line_id%TYPE

1357: +=========================================================================+
1358: */
1359: FUNCTION Unstaged_Allocations_Exist
1360: ( p_doc_id IN ic_tran_pnd.doc_id%TYPE
1361: , p_line_id IN ic_tran_pnd.line_id%TYPE
1362: )
1363: RETURN BOOLEAN
1364: IS
1365: l_api_name CONSTANT VARCHAR2 (30) := 'ALLOCATIONS_EXIST';

Line 1369: CURSOR ic_tran_pnd_c1 IS

1365: l_api_name CONSTANT VARCHAR2 (30) := 'ALLOCATIONS_EXIST';
1366: l_sum_trans_qty NUMBER;
1367: IC$DEFAULT_LOCT VARCHAR2(255) := FND_PROFILE.VALUE('IC$DEFAULT_LOCT');
1368:
1369: CURSOR ic_tran_pnd_c1 IS
1370: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1371: sum(trans_qty)
1372: FROM
1373: ic_tran_pnd

Line 1370: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */

1366: l_sum_trans_qty NUMBER;
1367: IC$DEFAULT_LOCT VARCHAR2(255) := FND_PROFILE.VALUE('IC$DEFAULT_LOCT');
1368:
1369: CURSOR ic_tran_pnd_c1 IS
1370: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1371: sum(trans_qty)
1372: FROM
1373: ic_tran_pnd
1374: WHERE

Line 1373: ic_tran_pnd

1369: CURSOR ic_tran_pnd_c1 IS
1370: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */
1371: sum(trans_qty)
1372: FROM
1373: ic_tran_pnd
1374: WHERE
1375: doc_id = p_doc_id AND
1376: line_id = p_line_id AND
1377: doc_type = 'OMSO' AND

Line 1386: OPEN ic_tran_pnd_c1;

1382: completed_ind = 0 AND
1383: delete_mark = 0;
1384:
1385: BEGIN
1386: OPEN ic_tran_pnd_c1;
1387: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;
1388: IF (ic_tran_pnd_c1%NOTFOUND) THEN
1389: l_sum_trans_qty :=0;
1390: END IF;

Line 1387: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;

1383: delete_mark = 0;
1384:
1385: BEGIN
1386: OPEN ic_tran_pnd_c1;
1387: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;
1388: IF (ic_tran_pnd_c1%NOTFOUND) THEN
1389: l_sum_trans_qty :=0;
1390: END IF;
1391:

Line 1388: IF (ic_tran_pnd_c1%NOTFOUND) THEN

1384:
1385: BEGIN
1386: OPEN ic_tran_pnd_c1;
1387: FETCH ic_tran_pnd_c1 into l_sum_trans_qty;
1388: IF (ic_tran_pnd_c1%NOTFOUND) THEN
1389: l_sum_trans_qty :=0;
1390: END IF;
1391:
1392: IF l_sum_trans_qty <> 0 THEN