DBA Data[Home] [Help]

APPS.PO_NEGOTIATIONS4_PVT dependencies on MTL_SUPPLY

Line 1291: -- mtl_supply entries for old req lines. Second for

1287:
1288: --
1289: --
1290: -- SQL What: Doing two bulk statements. One to delete from
1291: -- mtl_supply entries for old req lines. Second for
1292: -- inserting into mtl_supply newly created lines
1293: -- SQL Why : To take care of update to MTL_SUPPLY tables in case of
1294: -- req-split
1295: BEGIN

Line 1292: -- inserting into mtl_supply newly created lines

1288: --
1289: --
1290: -- SQL What: Doing two bulk statements. One to delete from
1291: -- mtl_supply entries for old req lines. Second for
1292: -- inserting into mtl_supply newly created lines
1293: -- SQL Why : To take care of update to MTL_SUPPLY tables in case of
1294: -- req-split
1295: BEGIN
1296:

Line 1293: -- SQL Why : To take care of update to MTL_SUPPLY tables in case of

1289: --
1290: -- SQL What: Doing two bulk statements. One to delete from
1291: -- mtl_supply entries for old req lines. Second for
1292: -- inserting into mtl_supply newly created lines
1293: -- SQL Why : To take care of update to MTL_SUPPLY tables in case of
1294: -- req-split
1295: BEGIN
1296:
1297: l_progress :='145';

Line 1301: 'Before: Update MTL_SUPPLY');

1297: l_progress :='145';
1298: l_module := G_MODULE_PREFIX||l_api_name||'.'||'145'||'.';
1299: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1300: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
1301: 'Before: Update MTL_SUPPLY');
1302: END IF;
1303:
1304: FORALL l_update_mtl_supply_index in 1.. new_req_line_id_rslt_tbl.COUNT
1305: -- Insert New Supply for each new Line created by the Reqsplit

Line 1304: FORALL l_update_mtl_supply_index in 1.. new_req_line_id_rslt_tbl.COUNT

1300: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
1301: 'Before: Update MTL_SUPPLY');
1302: END IF;
1303:
1304: FORALL l_update_mtl_supply_index in 1.. new_req_line_id_rslt_tbl.COUNT
1305: -- Insert New Supply for each new Line created by the Reqsplit
1306: INSERT INTO mtl_supply(supply_type_code,
1307: supply_source_id,
1308: last_updated_by,

Line 1306: INSERT INTO mtl_supply(supply_type_code,

1302: END IF;
1303:
1304: FORALL l_update_mtl_supply_index in 1.. new_req_line_id_rslt_tbl.COUNT
1305: -- Insert New Supply for each new Line created by the Reqsplit
1306: INSERT INTO mtl_supply(supply_type_code,
1307: supply_source_id,
1308: last_updated_by,
1309: last_update_date,
1310: last_update_login,

Line 1363: new_req_line_id_rslt_tbl(l_update_mtl_supply_index)

1359: decode(prl.item_id, null, null, prl.need_by_date + nvl(msi.postprocessing_lead_time,0))
1360: FROM po_requisition_lines_all prl, --
1361: mtl_system_items msi
1362: WHERE prl.requisition_line_id =
1363: new_req_line_id_rslt_tbl(l_update_mtl_supply_index)
1364: AND prl.destination_organization_id = msi.organization_id(+)
1365: AND prl.item_id = msi.inventory_item_id(+)
1366: AND EXISTS
1367: (select 'Supply Exists'

Line 1368: from mtl_supply

1364: AND prl.destination_organization_id = msi.organization_id(+)
1365: AND prl.item_id = msi.inventory_item_id(+)
1366: AND EXISTS
1367: (select 'Supply Exists'
1368: from mtl_supply
1369: where supply_type_code = 'REQ'
1370: AND supply_source_id =
1371: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));
1372:

Line 1371: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));

1367: (select 'Supply Exists'
1368: from mtl_supply
1369: where supply_type_code = 'REQ'
1370: AND supply_source_id =
1371: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));
1372:
1373: --Delete the entry in mtl_supply for original req line
1374: FORALL l_delete_mtl_supply_index in
1375: 1.. requisition_line_id_rslt_tbl.COUNT

Line 1373: --Delete the entry in mtl_supply for original req line

1369: where supply_type_code = 'REQ'
1370: AND supply_source_id =
1371: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));
1372:
1373: --Delete the entry in mtl_supply for original req line
1374: FORALL l_delete_mtl_supply_index in
1375: 1.. requisition_line_id_rslt_tbl.COUNT
1376: DELETE FROM mtl_supply
1377: WHERE supply_type_code = 'REQ'

Line 1374: FORALL l_delete_mtl_supply_index in

1370: AND supply_source_id =
1371: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));
1372:
1373: --Delete the entry in mtl_supply for original req line
1374: FORALL l_delete_mtl_supply_index in
1375: 1.. requisition_line_id_rslt_tbl.COUNT
1376: DELETE FROM mtl_supply
1377: WHERE supply_type_code = 'REQ'
1378: AND supply_source_id =

Line 1376: DELETE FROM mtl_supply

1372:
1373: --Delete the entry in mtl_supply for original req line
1374: FORALL l_delete_mtl_supply_index in
1375: 1.. requisition_line_id_rslt_tbl.COUNT
1376: DELETE FROM mtl_supply
1377: WHERE supply_type_code = 'REQ'
1378: AND supply_source_id =
1379: requisition_line_id_rslt_tbl(l_delete_mtl_supply_index);
1380:

Line 1379: requisition_line_id_rslt_tbl(l_delete_mtl_supply_index);

1375: 1.. requisition_line_id_rslt_tbl.COUNT
1376: DELETE FROM mtl_supply
1377: WHERE supply_type_code = 'REQ'
1378: AND supply_source_id =
1379: requisition_line_id_rslt_tbl(l_delete_mtl_supply_index);
1380:
1381: l_progress :='146';
1382: l_module := G_MODULE_PREFIX||l_api_name||'.'||'146'||'.';
1383: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

Line 1385: 'After: Update MTL_SUPPLY;Updated'

1381: l_progress :='146';
1382: l_module := G_MODULE_PREFIX||l_api_name||'.'||'146'||'.';
1383: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1384: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
1385: 'After: Update MTL_SUPPLY;Updated'
1386: ||sql%rowcount||' requisition lines ');
1387: END IF;
1388:
1389: EXCEPTION

Line 1398: 'Exception: Update MTL_SUPPLY');

1394: sqlcode);
1395: FND_MSG_PUB.Add;
1396: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1397: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
1398: 'Exception: Update MTL_SUPPLY');
1399: END IF;
1400: RAISE;
1401:
1402: END;