DBA Data[Home] [Help]

APPS.MSC_ATP_UTILS dependencies on MRP_ATP_DETAILS_TEMP

Line 52: 'DELETE FROM MRP_ATP_DETAILS_TEMP'||l_dynstring||

48: IF x_mode = RESULTS_MODE AND x_dblink IS NOT NULL THEN
49: -- Deletes any records in the
50: -- cchen : add database link to the subquery
51: sql_stmt :=
52: 'DELETE FROM MRP_ATP_DETAILS_TEMP'||l_dynstring||
53: ' WHERE session_id = :x_session_id '||
54: ' and order_line_id in ( '||
55: ' select order_line_id from mrp_atp_schedule_temp'||l_dynstring||
56: ' where session_id = :x_session_id_1 '||

Line 69: -- moved deleting old records from mrp_atp_details_temp to call_schedule_remote

65: END IF;
66: END IF;
67: /* -- bug3378648:we dont need this sql as this should be done locally
68:
69: -- moved deleting old records from mrp_atp_details_temp to call_schedule_remote
70:
71: /*
72: MSC_ATP_UTILS.PUT_SD_DATA(x_atp_supply_demand, x_dblink, x_session_id);
73: IF PG_DEBUG in ('Y', 'C') THEN

Line 192: delete mrp_atp_details_temp

188: and status_flag in (1, 2, 99);
189: --and status_flag in (1, 99);
190:
191: --delete local detail data
192: delete mrp_atp_details_temp
193: where session_id = x_session_id;
194:
195: --transfer the date from source to dest mrp_atp_schedule_temp
196: MSC_ATP_UTILS.Transfer_scheduling_data(x_session_id, x_dblink, REQUEST_MODE);

Line 1485: INSERT INTO mrp_atp_details_temp

1481:
1482: IF p_dblink IS NULL THEN
1483: FORALL j IN 1..p_atp_period.level.COUNT
1484:
1485: INSERT INTO mrp_atp_details_temp
1486: (
1487: session_id,
1488: scenario_id,
1489: order_line_id,

Line 1571: INSERT INTO mrp_atp_details_temp'||p_dblink||'

1567: -- dsting: added stuff for creation_date, created_by,
1568: -- last_update_date, last_updated_by, last_update_login
1569:
1570: sql_stmt := '
1571: INSERT INTO mrp_atp_details_temp'||p_dblink||'
1572: (
1573: session_id,
1574: scenario_id,
1575: order_line_id,

Line 1743: INSERT INTO mrp_atp_details_temp@'||p_dblink|| '

1739: -- dsting: added creation_date, created_by,
1740: -- last_update_date, last_updated_by, last_update_login
1741:
1742: sql_stmt := '
1743: INSERT INTO mrp_atp_details_temp@'||p_dblink|| '
1744: (session_id,
1745: order_line_id,
1746: pegging_id,
1747: parent_pegging_id,

Line 1830: FROM mrp_atp_details_temp

1826: , :created_by
1827: , sysdate
1828: , :created_by
1829: , :created_by
1830: FROM mrp_atp_details_temp
1831: WHERE record_type = 3
1832: AND session_id = :x_session_id ';
1833:
1834: EXECUTE IMMEDIATE sql_stmt USING

Line 1849: DELETE from mrp_atp_details_temp

1845:
1846: -- after the insert is done, delete the pegging records
1847: -- at the server since they are not needed anymore
1848: begin
1849: DELETE from mrp_atp_details_temp
1850: WHERE record_type = 3
1851: AND session_id = p_session_id;
1852: exception
1853: when others then null;

Line 1982: FROM mrp_atp_details_temp

1978: x_atp_period.identifier1,
1979: x_atp_period.identifier2,
1980: x_atp_period.pegging_id,
1981: x_atp_period.end_pegging_id
1982: FROM mrp_atp_details_temp
1983: WHERE session_id = p_session_id
1984: and record_type = 1
1985: and pegging_id in (select pegging_id from mrp_atp_details_temp
1986: where session_id = p_session_id

Line 1985: and pegging_id in (select pegging_id from mrp_atp_details_temp

1981: x_atp_period.end_pegging_id
1982: FROM mrp_atp_details_temp
1983: WHERE session_id = p_session_id
1984: and record_type = 1
1985: and pegging_id in (select pegging_id from mrp_atp_details_temp
1986: where session_id = p_session_id
1987: and record_type = 3);
1988:
1989: IF PG_DEBUG in ('Y', 'C') THEN

Line 2056: FROM mrp_atp_details_temp

2052: x_atp_supply_demand.disposition_type,
2053: x_atp_supply_demand.disposition_name,
2054: x_atp_supply_demand.Supply_Demand_Source_Type_name,
2055: x_atp_supply_demand.end_pegging_id
2056: FROM mrp_atp_details_temp
2057: WHERE session_id = p_session_id
2058: and record_type = 2
2059: and pegging_id in (select pegging_id from mrp_atp_details_temp
2060: where session_id = p_session_id

Line 2059: and pegging_id in (select pegging_id from mrp_atp_details_temp

2055: x_atp_supply_demand.end_pegging_id
2056: FROM mrp_atp_details_temp
2057: WHERE session_id = p_session_id
2058: and record_type = 2
2059: and pegging_id in (select pegging_id from mrp_atp_details_temp
2060: where session_id = p_session_id
2061: and record_type = 3);
2062:
2063:

Line 2074: * transfer data from dest mrp_atp_details_temp to src

2070: /*
2071: * dsting 10/1/02
2072: *
2073: * IF dblink is set then
2074: * transfer data from dest mrp_atp_details_temp to src
2075: * ELSE it's a nondistributed setup
2076: * transfer data from mrp_atp_Details_temp to pl/sql tables
2077: *
2078: */

Line 2076: * transfer data from mrp_atp_Details_temp to pl/sql tables

2072: *
2073: * IF dblink is set then
2074: * transfer data from dest mrp_atp_details_temp to src
2075: * ELSE it's a nondistributed setup
2076: * transfer data from mrp_atp_Details_temp to pl/sql tables
2077: *
2078: */
2079: PROCEDURE Transfer_mrp_atp_details_temp(
2080: p_dblink IN VARCHAR2,

Line 2079: PROCEDURE Transfer_mrp_atp_details_temp(

2075: * ELSE it's a nondistributed setup
2076: * transfer data from mrp_atp_Details_temp to pl/sql tables
2077: *
2078: */
2079: PROCEDURE Transfer_mrp_atp_details_temp(
2080: p_dblink IN VARCHAR2,
2081: p_session_id IN NUMBER
2082: ) IS
2083: sql_stmt VARCHAR2(10000);

Line 2214: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'PROCEDURE Transfer_SD_And_Period_Data');

2210:
2211: BEGIN
2212:
2213: IF PG_DEBUG in ('Y', 'C') THEN
2214: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'PROCEDURE Transfer_SD_And_Period_Data');
2215: END IF;
2216:
2217: IF p_dblink IS NOT NULL THEN
2218: -- transfer period (record_type 1) and s/d (2) and pegging (3) data

Line 2221: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'apps_ver: ' || MSC_ATP_PVT.G_APPS_VER);

2217: IF p_dblink IS NOT NULL THEN
2218: -- transfer period (record_type 1) and s/d (2) and pegging (3) data
2219: -- that appear in the pegging tree
2220: IF PG_DEBUG in ('Y', 'C') THEN
2221: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'apps_ver: ' || MSC_ATP_PVT.G_APPS_VER);
2222: END IF;
2223:
2224: sql_stmt := 'Insert into mrp_atp_details_temp@' || p_dblink || ' (';
2225:

Line 2224: sql_stmt := 'Insert into mrp_atp_details_temp@' || p_dblink || ' (';

2220: IF PG_DEBUG in ('Y', 'C') THEN
2221: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'apps_ver: ' || MSC_ATP_PVT.G_APPS_VER);
2222: END IF;
2223:
2224: sql_stmt := 'Insert into mrp_atp_details_temp@' || p_dblink || ' (';
2225:
2226: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN
2227: sql_stmt := sql_stmt || l_std_cols || l_apps_v3_cols ||
2228: ' ) select ' || l_std_cols || l_apps_v3_cols;

Line 2235: 'from mrp_atp_details_temp

2231: ' ) select ' || l_std_cols;
2232: END IF;
2233:
2234: sql_stmt := sql_stmt ||
2235: 'from mrp_atp_details_temp
2236: where session_id = :p_session_id
2237: and record_type in (1, 2, 3)
2238: and pegging_id in (Select pegging_id from mrp_atp_details_temp
2239: where session_id = :p_session_id

Line 2238: and pegging_id in (Select pegging_id from mrp_atp_details_temp

2234: sql_stmt := sql_stmt ||
2235: 'from mrp_atp_details_temp
2236: where session_id = :p_session_id
2237: and record_type in (1, 2, 3)
2238: and pegging_id in (Select pegging_id from mrp_atp_details_temp
2239: where session_id = :p_session_id
2240: and record_type = 3)';
2241: IF PG_DEBUG in ('Y', 'C') THEN
2242: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'dsting: '||sql_stmt);

Line 2242: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'dsting: '||sql_stmt);

2238: and pegging_id in (Select pegging_id from mrp_atp_details_temp
2239: where session_id = :p_session_id
2240: and record_type = 3)';
2241: IF PG_DEBUG in ('Y', 'C') THEN
2242: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'dsting: '||sql_stmt);
2243: END IF;
2244: execute immediate sql_stmt using p_session_id , p_session_id;
2245:
2246: IF PG_DEBUG in ('Y', 'C') THEN

Line 2247: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'dsting: '|| SQL%ROWCOUNT);

2243: END IF;
2244: execute immediate sql_stmt using p_session_id , p_session_id;
2245:
2246: IF PG_DEBUG in ('Y', 'C') THEN
2247: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'dsting: '|| SQL%ROWCOUNT);
2248: END IF;
2249: END IF;
2250:
2251: END Transfer_mrp_atp_details_temp;

Line 2251: END Transfer_mrp_atp_details_temp;

2247: msc_sch_wb.atp_debug('Transfer_mrp_atp_details_temp: ' || 'dsting: '|| SQL%ROWCOUNT);
2248: END IF;
2249: END IF;
2250:
2251: END Transfer_mrp_atp_details_temp;
2252:
2253: /*
2254: * dsting 10/16/02
2255: *

Line 2275: INSERT INTO mrp_atp_details_temp (

2271: msc_sch_wb.atp_debug('Copy_MRP_SD_Recs: ' || ' p_old_pegging_id: ' || p_old_pegging_id);
2272: msc_sch_wb.atp_debug('Copy_MRP_SD_Recs: ' || ' p_pegging_id: ' || p_pegging_id);
2273: END IF;
2274:
2275: INSERT INTO mrp_atp_details_temp (
2276: session_id,
2277: scenario_id,
2278: order_line_id,
2279: ATP_Level,

Line 2350: FROM mrp_atp_details_temp

2346: created_by,
2347: last_update_date,
2348: last_updated_by,
2349: last_update_login
2350: FROM mrp_atp_details_temp
2351: where pegging_id = p_old_pegging_id
2352: and record_type = 2;
2353:
2354: IF PG_DEBUG in ('Y', 'C') THEN

Line 2381: sql_stmt := 'Insert into mrp_atp_details_temp' || l_dynstring ||

2377: ---distributed database:
2378: IF PG_DEBUG in ('Y', 'C') THEN
2379: msc_sch_wb.atp_debug('Process_Supply_Demand_details: ' || 'Distributed environment. Put from dest to source table');
2380: END IF;
2381: sql_stmt := 'Insert into mrp_atp_details_temp' || l_dynstring ||
2382: '(select * from mrp_atp_details_temp
2383: where session_id = :p_session_id
2384: and record_type = 2
2385: and pegging_id in (Select pegging_id from mrp_atp_details_temp

Line 2382: '(select * from mrp_atp_details_temp

2378: IF PG_DEBUG in ('Y', 'C') THEN
2379: msc_sch_wb.atp_debug('Process_Supply_Demand_details: ' || 'Distributed environment. Put from dest to source table');
2380: END IF;
2381: sql_stmt := 'Insert into mrp_atp_details_temp' || l_dynstring ||
2382: '(select * from mrp_atp_details_temp
2383: where session_id = :p_session_id
2384: and record_type = 2
2385: and pegging_id in (Select pegging_id from mrp_atp_details_temp
2386: where session_id = :p_session_id

Line 2385: and pegging_id in (Select pegging_id from mrp_atp_details_temp

2381: sql_stmt := 'Insert into mrp_atp_details_temp' || l_dynstring ||
2382: '(select * from mrp_atp_details_temp
2383: where session_id = :p_session_id
2384: and record_type = 2
2385: and pegging_id in (Select pegging_id from mrp_atp_details_temp
2386: where session_id = :p_session_id
2387: and record_type = 3))';
2388: execute immediate sql_stmt using p_session_id , p_session_id;
2389:

Line 2456: FROM mrp_atp_details_temp

2452: x_atp_supply_demand.disposition_type,
2453: x_atp_supply_demand.disposition_name,
2454: x_atp_supply_demand.Supply_Demand_Source_Type_name,
2455: x_atp_supply_demand.end_pegging_id
2456: FROM mrp_atp_details_temp
2457: WHERE session_id = p_session_id
2458: and record_type = 2
2459: and pegging_id in (select pegging_id from mrp_atp_details_temp
2460: where session_id = p_session_id

Line 2459: and pegging_id in (select pegging_id from mrp_atp_details_temp

2455: x_atp_supply_demand.end_pegging_id
2456: FROM mrp_atp_details_temp
2457: WHERE session_id = p_session_id
2458: and record_type = 2
2459: and pegging_id in (select pegging_id from mrp_atp_details_temp
2460: where session_id = p_session_id
2461: and record_type = 3);
2462:
2463:

Line 2503: INSERT INTO mrp_atp_details_temp

2499:
2500: IF p_dblink IS NULL THEN
2501:
2502: FORALL j IN 1..p_atp_supply_demand.level.COUNT
2503: INSERT INTO mrp_atp_details_temp
2504: (
2505: session_id,
2506: scenario_id,
2507: order_line_id,

Line 2591: INSERT INTO mrp_atp_details_temp@'||p_dblink||'

2587: -- dsting: added stuff for creation_date, created_by,
2588: -- last_update_date, last_updated_by, last_update_login
2589:
2590: sql_stmt := '
2591: INSERT INTO mrp_atp_details_temp@'||p_dblink||'
2592: (
2593: session_id,
2594: scenario_id,
2595: order_line_id,