162: GMI_RESERVATION_UTIL.PrintLn (' After initialize IN Auto_allocation_batch');
163:
164: IF( NVL(p_batch_id,0) = 0 ) THEN
165: GMI_RESERVATION_UTIL.PrintLn('Batch id is missing');
166: FND_MESSAGE.Set_Name('GMI','Missing');
167: FND_MESSAGE.Set_Token('MISSING', 'Batch_Id');
168: FND_MSG_PUB.Add;
169: RAISE FND_API.G_EXC_ERROR;
170: END IF;
163:
164: IF( NVL(p_batch_id,0) = 0 ) THEN
165: GMI_RESERVATION_UTIL.PrintLn('Batch id is missing');
166: FND_MESSAGE.Set_Name('GMI','Missing');
167: FND_MESSAGE.Set_Token('MISSING', 'Batch_Id');
168: FND_MSG_PUB.Add;
169: RAISE FND_API.G_EXC_ERROR;
170: END IF;
171:
174:
175: IF(get_batch_rec_cur%NOTFOUND) THEN
176: CLOSE get_batch_rec_cur;
177: GMI_RESERVATION_UTIL.PrintLn('No record in the batch table for batch id: '|| p_batch_id );
178: FND_MESSAGE.Set_Name('GMI','Missing');
179: FND_MESSAGE.Set_Token('Missing','Batch_id');
180: FND_MSG_PUB.Add;
181: RAISE FND_API.G_EXC_ERROR;
182: END IF;
175: IF(get_batch_rec_cur%NOTFOUND) THEN
176: CLOSE get_batch_rec_cur;
177: GMI_RESERVATION_UTIL.PrintLn('No record in the batch table for batch id: '|| p_batch_id );
178: FND_MESSAGE.Set_Name('GMI','Missing');
179: FND_MESSAGE.Set_Token('Missing','Batch_id');
180: FND_MSG_PUB.Add;
181: RAISE FND_API.G_EXC_ERROR;
182: END IF;
183:
376: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
377: THEN
378: GMI_reservation_Util.PrintLn('Return_status from Auto_Alloc_Wdd_Line : '||l_return_status);
379: l_temp := FND_CONCURRENT.SET_COMPLETION_STATUS( 'WARNING', '');
380: FND_MESSAGE.Set_Name('GMI','GMI_AUTO_ALLOC_WDD_LINE_ERROR');
381: FND_MSG_PUB.Add;
382: RAISE FND_API.G_EXC_ERROR;
383: END IF;
384: x_return_status := l_return_status;
418: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
419: THEN
420: l_temp := FND_CONCURRENT.SET_COMPLETION_STATUS( 'WARNING', '');
421: GMI_reservation_Util.PrintLn('Return_status from call_pick_confirm : '||x_return_status);
422: FND_MESSAGE.Set_Name('GMI','GMI_PICK_CONFIRM_ERROR');
423: FND_MSG_PUB.Add;
424: RAISE FND_API.G_EXC_ERROR;
425: END IF;
426:
939: FETCH cur_txn_no_default INTO l_total_qty, l_total_qty2;
940: IF cur_txn_no_default%NOTFOUND THEN
941: CLOSE cur_txn_no_default;
942: GMI_Reservation_Util.PrintLn('txn_no_default : NOTFOUND ');
943: FND_MESSAGE.SET_NAME('GMI','GMI_REQUIRED_MISSING');
944: RAISE FND_API.G_EXC_ERROR;
945: END IF;
946: CLOSE cur_txn_no_default;
947:
1161:
1162: GMI_RESERVATION_UTIL.PrintLn('After Calling GMI_Pick_Wave_Confirm_PVT.Check_Shipping_Tolerances');
1163: GMI_RESERVATION_UTIL.PrintLn('Status from Check_Shipping_Tolerances : '||x_return_status);
1164: IF x_return_status <> 'S' THEN
1165: fnd_message.set_name('INV', 'INV_CHECK_TOLERANCE_ERROR');
1166: RAISE FND_API.G_EXC_ERROR;
1167: ELSE
1168: IF l_allowed = 'N' THEN
1169: GMI_Reservation_Util.PrintLn('WARNING!');
1202:
1203: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS )
1204: THEN
1205: GMI_Reservation_Util.PrintLn('return error');
1206: FND_MESSAGE.Set_Name('GMI','PICK_CONFIRM_ERROR');
1207: FND_MESSAGE.Set_Token('WHERE', 'AFTER_CALL_PICK_CONFIRM');
1208: FND_MESSAGE.Set_Token('WHAT', 'UnexpectedError');
1209: FND_MSG_PUB.Add;
1210: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1203: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS )
1204: THEN
1205: GMI_Reservation_Util.PrintLn('return error');
1206: FND_MESSAGE.Set_Name('GMI','PICK_CONFIRM_ERROR');
1207: FND_MESSAGE.Set_Token('WHERE', 'AFTER_CALL_PICK_CONFIRM');
1208: FND_MESSAGE.Set_Token('WHAT', 'UnexpectedError');
1209: FND_MSG_PUB.Add;
1210: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1211: END IF;
1204: THEN
1205: GMI_Reservation_Util.PrintLn('return error');
1206: FND_MESSAGE.Set_Name('GMI','PICK_CONFIRM_ERROR');
1207: FND_MESSAGE.Set_Token('WHERE', 'AFTER_CALL_PICK_CONFIRM');
1208: FND_MESSAGE.Set_Token('WHAT', 'UnexpectedError');
1209: FND_MSG_PUB.Add;
1210: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1211: END IF;
1212:
1212:
1213: IF ( ll_mo_line_tbl.count = 0 )
1214: THEN
1215: GMI_Reservation_Util.PrintLn('return error');
1216: FND_MESSAGE.Set_Name('GMI','PICK_CONFIRM_ERROR');
1217: FND_MESSAGE.Set_Token('WHERE', 'MO_LINE_COUNT_0');
1218: FND_MESSAGE.Set_Token('WHAT', 'UnexpectedError');
1219: FND_MSG_PUB.Add;
1220: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1213: IF ( ll_mo_line_tbl.count = 0 )
1214: THEN
1215: GMI_Reservation_Util.PrintLn('return error');
1216: FND_MESSAGE.Set_Name('GMI','PICK_CONFIRM_ERROR');
1217: FND_MESSAGE.Set_Token('WHERE', 'MO_LINE_COUNT_0');
1218: FND_MESSAGE.Set_Token('WHAT', 'UnexpectedError');
1219: FND_MSG_PUB.Add;
1220: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1221: END IF;
1214: THEN
1215: GMI_Reservation_Util.PrintLn('return error');
1216: FND_MESSAGE.Set_Name('GMI','PICK_CONFIRM_ERROR');
1217: FND_MESSAGE.Set_Token('WHERE', 'MO_LINE_COUNT_0');
1218: FND_MESSAGE.Set_Token('WHAT', 'UnexpectedError');
1219: FND_MSG_PUB.Add;
1220: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1221: END IF;
1222:
1368: IF (c_customer_and_so_info%NOTFOUND) THEN
1369: CLOSE c_customer_and_so_info;
1370: GMI_reservation_Util.PrintLn('Customer info not found');
1371: GMI_reservation_Util.PrintLn('in Util v: cust_no=NOTFOUND');
1372: FND_MESSAGE.Set_Name('GMI','GMI_CUST_INFO');
1373: FND_MESSAGE.Set_Token('SO_LINE_ID', x_allocation_rec.line_id);
1374: FND_MSG_PUB.Add;
1375: RAISE FND_API.G_EXC_ERROR;
1376: ELSE
1369: CLOSE c_customer_and_so_info;
1370: GMI_reservation_Util.PrintLn('Customer info not found');
1371: GMI_reservation_Util.PrintLn('in Util v: cust_no=NOTFOUND');
1372: FND_MESSAGE.Set_Name('GMI','GMI_CUST_INFO');
1373: FND_MESSAGE.Set_Token('SO_LINE_ID', x_allocation_rec.line_id);
1374: FND_MSG_PUB.Add;
1375: RAISE FND_API.G_EXC_ERROR;
1376: ELSE
1377: GMI_reservation_Util.PrintLn(' in Util v: cust_id='||x_allocation_rec.of_cust_id||',
1387: GMI_RESERVATION_UTIL.PrintLn('Set up Trans rec');
1388: x_allocation_rec.doc_id := INV_SALESORDER.GET_SALESORDER_FOR_OEHEADER(l_header_id);
1389:
1390: IF ( x_allocation_rec.doc_id IS NULL ) THEN
1391: FND_MESSAGE.SET_NAME('GMI','INV_COULD_NOT_GET_MSO_HEADER');
1392: FND_MESSAGE.Set_Token('OE_HEADER_ID', l_header_id);
1393: FND_MSG_PUB.Add;
1394: RAISE FND_API.G_EXC_ERROR;
1395: END IF;
1388: x_allocation_rec.doc_id := INV_SALESORDER.GET_SALESORDER_FOR_OEHEADER(l_header_id);
1389:
1390: IF ( x_allocation_rec.doc_id IS NULL ) THEN
1391: FND_MESSAGE.SET_NAME('GMI','INV_COULD_NOT_GET_MSO_HEADER');
1392: FND_MESSAGE.Set_Token('OE_HEADER_ID', l_header_id);
1393: FND_MSG_PUB.Add;
1394: RAISE FND_API.G_EXC_ERROR;
1395: END IF;
1396:
1447: FETCH cur_get_process_org INTO x_allocation_rec.whse_code,l_co_code,x_orgn_code;
1448: IF(Cur_get_process_org%NOTFOUND) THEN
1449: CLOSE Cur_get_process_org;
1450: GMI_reservation_Util.PrintLn(' in end of Get_Allocation__Record ERROR:No rows found for cur_get_process_org.');
1451: FND_MESSAGE.Set_Name('GMI','GMI_GET_PROCESS_ORG');
1452: FND_MESSAGE.Set_Token('ORGANIZATION_ID', p_wdd_line.organization_id);
1453: FND_MSG_PUB.Add;
1454: RAISE FND_API.G_EXC_ERROR;
1455: ELSE
1448: IF(Cur_get_process_org%NOTFOUND) THEN
1449: CLOSE Cur_get_process_org;
1450: GMI_reservation_Util.PrintLn(' in end of Get_Allocation__Record ERROR:No rows found for cur_get_process_org.');
1451: FND_MESSAGE.Set_Name('GMI','GMI_GET_PROCESS_ORG');
1452: FND_MESSAGE.Set_Token('ORGANIZATION_ID', p_wdd_line.organization_id);
1453: FND_MSG_PUB.Add;
1454: RAISE FND_API.G_EXC_ERROR;
1455: ELSE
1456: CLOSE Cur_get_process_org;
1478: THEN
1479: GMI_RESERVATION_UTIL.PrintLn('Status get opm item from apps '|| x_return_status);
1480: GMI_reservation_Util.PrintLn(' in end of GMI_Reservation_Util.Get_Allocation_Record
1481: ERROR:Returned by Get_OPM_item_from_Apps.');
1482: FND_MESSAGE.Set_Name('GMI','GMI_OPM_ITEM');
1483: FND_MESSAGE.Set_Token('ORGANIZATION_ID', p_wdd_line.organization_id);
1484: FND_MESSAGE.Set_Token('INVENTORY_ITEM_ID', p_wdd_line.inventory_item_id);
1485: FND_MSG_PUB.Add;
1486: RAISE FND_API.G_EXC_ERROR;
1479: GMI_RESERVATION_UTIL.PrintLn('Status get opm item from apps '|| x_return_status);
1480: GMI_reservation_Util.PrintLn(' in end of GMI_Reservation_Util.Get_Allocation_Record
1481: ERROR:Returned by Get_OPM_item_from_Apps.');
1482: FND_MESSAGE.Set_Name('GMI','GMI_OPM_ITEM');
1483: FND_MESSAGE.Set_Token('ORGANIZATION_ID', p_wdd_line.organization_id);
1484: FND_MESSAGE.Set_Token('INVENTORY_ITEM_ID', p_wdd_line.inventory_item_id);
1485: FND_MSG_PUB.Add;
1486: RAISE FND_API.G_EXC_ERROR;
1487: ELSE
1480: GMI_reservation_Util.PrintLn(' in end of GMI_Reservation_Util.Get_Allocation_Record
1481: ERROR:Returned by Get_OPM_item_from_Apps.');
1482: FND_MESSAGE.Set_Name('GMI','GMI_OPM_ITEM');
1483: FND_MESSAGE.Set_Token('ORGANIZATION_ID', p_wdd_line.organization_id);
1484: FND_MESSAGE.Set_Token('INVENTORY_ITEM_ID', p_wdd_line.inventory_item_id);
1485: FND_MSG_PUB.Add;
1486: RAISE FND_API.G_EXC_ERROR;
1487: ELSE
1488: x_allocation_rec.item_no := x_ic_item_mst_rec.item_no;
1697: '','','','','','','','','','',
1698: '','','','','','','','','','');
1699: */
1700: IF(l_request_id = 0 )THEN
1701: FND_MESSAGE.RETRIEVE(l_msg);
1702: GMI_RESERVATION_UTIL.println('l_msg is :'|| l_msg);
1703: END IF;
1704:
1705: GMI_RESERVATION_UTIL.println('request_id is : '||l_request_id);