DBA Data[Home] [Help]

APPS.MSC_ATP_UTILS dependencies on MRP_ATP_SCHEDULE_TEMP

Line 53: ' select order_line_id from mrp_atp_schedule_temp'||l_dynstring||

49: sql_stmt :=
50: 'DELETE FROM MRP_ATP_DETAILS_TEMP'||l_dynstring||
51: ' WHERE session_id = :x_session_id '||
52: ' and order_line_id in ( '||
53: ' select order_line_id from mrp_atp_schedule_temp'||l_dynstring||
54: ' where session_id = :x_session_id_1 '||
55: ' and status_flag = 1) '||
56: ' and record_type <> 3';
57:

Line 184: Delete mrp_atp_schedule_temp

180: IF x_dblink is not null and x_mode = REQUEST_MODE THEN
181:
182: --bug 3378648
183: --delete the old data if any; This data will exist in case of Global order promising
184: Delete mrp_atp_schedule_temp
185: where session_id = x_session_id
186: and status_flag in (1, 2, 99);
187: --and status_flag in (1, 99);
188:

Line 193: --transfer the date from source to dest mrp_atp_schedule_temp

189: --delete local detail data
190: delete mrp_atp_details_temp
191: where session_id = x_session_id;
192:
193: --transfer the date from source to dest mrp_atp_schedule_temp
194: MSC_ATP_UTILS.Transfer_scheduling_data(x_session_id, x_dblink, REQUEST_MODE);
195: END IF;
196: ---e_cto_rearch
197:

Line 546: FROM mrp_atp_schedule_temp

542: x_atp_rec.first_valid_ship_arrival_date, --bug 3328421
543: x_atp_rec.party_site_id, --2814895
544: x_atp_rec.part_of_set --4500382
545:
546: FROM mrp_atp_schedule_temp
547: WHERE session_id = x_session_id
548: AND status_flag = l_status_flag
549: AND NVL(mandatory_item_flag, 2) = 2
550: AND ORDER_LINE_ID = DECODE( x_mode, MSC_ATP_UTILS.RESULTS_MODE, ORDER_LINE_ID,

Line 698: 'FROM mrp_atp_schedule_temp'||l_dynstring||'

694: sql_stmt := sql_stmt || ', 2'; -- non-diagnostic for older sources
695: END IF;
696:
697: sql_stmt := sql_stmt ||
698: 'FROM mrp_atp_schedule_temp'||l_dynstring||'
699: WHERE session_id = :x_session_id';
700:
701: IF PG_DEBUG in ('Y', 'C') THEN
702: msc_sch_wb.atp_debug('get_from_temp_table: ' || 'sql_stmt ' || sql_stmt);

Line 1195: PROCEDURE extend_mast( mast_rec IN OUT NoCopy mrp_atp_utils.mrp_atp_schedule_temp_typ,

1191: p_err_message := substr(sqlerrm,1,100);
1192: return(INV_EXTATP_GRP.G_RETURN_ERROR);
1193: End Call_ATP_11;
1194:
1195: PROCEDURE extend_mast( mast_rec IN OUT NoCopy mrp_atp_utils.mrp_atp_schedule_temp_typ,
1196: x_ret_code OUT NoCopy varchar2,
1197: x_ret_status OUT NoCopy varchar2) IS
1198: BEGIN
1199: mast_rec.rowid_char.extend(1);

Line 1233: PROCEDURE trim_mast( mast_rec IN OUT NoCopy mrp_atp_utils.mrp_atp_schedule_temp_typ,

1229: END IF;
1230: END extend_mast;
1231:
1232:
1233: PROCEDURE trim_mast( mast_rec IN OUT NoCopy mrp_atp_utils.mrp_atp_schedule_temp_typ,
1234: x_ret_code OUT NoCopy varchar2,
1235: x_ret_status OUT NoCopy varchar2) IS
1236: BEGIN
1237: mast_rec.rowid_char.trim(1);

Line 1872: mast_rec mrp_atp_utils.mrp_atp_schedule_temp_typ;

1868: l_status_flag NUMBER := 99; -- bug 2974324. Initialize l_status_flag to 99 here.
1869: l_sequence_number MRP_ATP_PUB.number_arr := MRP_ATP_PUB.number_arr(); -- for bug 2974324.
1870: found NUMBER;
1871:
1872: mast_rec mrp_atp_utils.mrp_atp_schedule_temp_typ;
1873: mast_rec_insert mrp_atp_utils.mrp_atp_schedule_temp_typ;
1874: TYPE mastcurtyp IS REF CURSOR;
1875: mast_cursor mastcurtyp;
1876: l_ret_code VARCHAR2(1);

Line 1873: mast_rec_insert mrp_atp_utils.mrp_atp_schedule_temp_typ;

1869: l_sequence_number MRP_ATP_PUB.number_arr := MRP_ATP_PUB.number_arr(); -- for bug 2974324.
1870: found NUMBER;
1871:
1872: mast_rec mrp_atp_utils.mrp_atp_schedule_temp_typ;
1873: mast_rec_insert mrp_atp_utils.mrp_atp_schedule_temp_typ;
1874: TYPE mastcurtyp IS REF CURSOR;
1875: mast_cursor mastcurtyp;
1876: l_ret_code VARCHAR2(1);
1877: l_ret_status VARCHAR2(100);

Line 2741: update mrp_atp_schedule_temp mast

2737: IF PG_DEBUG in ('Y', 'C') THEN
2738: msc_sch_wb.atp_debug('Inside Update_Line_Item_Properties');
2739: msc_sch_wb.atp_debug('Update item properties');
2740: END IF;
2741: update mrp_atp_schedule_temp mast
2742: --bug 4078703: Populate atp_lead time as this lead time is required
2743: --on OM sales order lies to support misc. functionalities in inv and
2744: --other module. Here we populte it on top model line only. This value is populated
2745: -- option class and items in put_sch_data_resulst_mode procedure

Line 2779: update mrp_atp_schedule_temp mast

2775:
2776: --3720018, this query will update old_source_organization_id and old_demand_class
2777: -- in case of atp inquiry for a scheduled line from sales order pad
2778: IF ( NVL(Action, -1) = 100 ) THEN
2779: update mrp_atp_schedule_temp mast
2780: set (mast.old_source_organization_id, mast.Old_Demand_Class )=
2781: (SELECT mast.Source_Organization_Id,
2782: NVL(mast.Old_Demand_Class, mast.demand_class)
2783: from oe_order_lines_all o

Line 2816: Delete from mrp_atp_schedule_temp where session_id = p_session_id

2812:
2813: l_user_id := FND_GLOBAL.USER_ID;
2814: l_count := p_atp_rec.inventory_item_id.count;
2815: --- Delete Old Data
2816: Delete from mrp_atp_schedule_temp where session_id = p_session_id
2817: --bug 3378648: delete only ATP relevent data
2818: and status_flag in (1,2, 99);
2819:
2820: IF PG_DEBUG in ('Y', 'C') THEN

Line 2841: INSERT INTO mrp_atp_schedule_temp

2837: END IF;
2838:
2839:
2840: FORALL j in 1..l_count
2841: INSERT INTO mrp_atp_schedule_temp
2842: (
2843: mdi_rowid,
2844: session_id,
2845: scenario_id,

Line 3086: update mrp_atp_schedule_temp mast

3082: END IF;
3083:
3084: IF MSC_ATP_PVT.G_CALLING_MODULE <> 724 THEN
3085: /*
3086: update mrp_atp_schedule_temp mast
3087: set (atp_flag, atp_components_flag, bom_item_type, pick_components_flag, fixed_lt, variable_lt) =
3088: (Select msi.atp_flag,
3089: decode(MSC_ATP_PVT.G_INV_CTP, 5,
3090: --IF ATP flag for PTO model/ATO model is other than 'N' then we still go to destination

Line 3125: from mrp_atp_schedule_temp mast

3121: msc_sch_wb.atp_debug('Check if OE flag has been turned on or not');
3122: END IF;
3123: select count(*)
3124: into l_count
3125: from mrp_atp_schedule_temp mast
3126: where mast.session_id = p_session_id
3127: --bug 3378648
3128: and status_flag = 99
3129: and mast.OE_FLAG = 'Y';

Line 3137: update mrp_atp_schedule_temp mast

3133: END IF;
3134:
3135: IF l_count > 0 then
3136:
3137: update mrp_atp_schedule_temp mast
3138: set OE_FLAG =
3139: (Select decode(MSC_ATP_PVT.G_INV_CTP, 5, mast.OE_FLAG,
3140: decode( prha.interface_source_code, 'MRP', 'Y', 'MSC', 'Y', 'N'))
3141: from po_requisition_headers_all prha

Line 3188: mast_rec mrp_atp_utils.mrp_atp_schedule_temp_typ;

3184: l_status_flag NUMBER := 99; -- bug 2974324. Initialize l_status_flag to 99 here.
3185: l_sequence_number MRP_ATP_PUB.number_arr := MRP_ATP_PUB.number_arr(); -- for bug 2974324.
3186: found NUMBER;
3187:
3188: mast_rec mrp_atp_utils.mrp_atp_schedule_temp_typ;
3189: mast_rec_insert mrp_atp_utils.mrp_atp_schedule_temp_typ;
3190: TYPE mastcurtyp IS REF CURSOR;
3191: mast_cursor mastcurtyp;
3192: l_ret_code VARCHAR2(1);

Line 3189: mast_rec_insert mrp_atp_utils.mrp_atp_schedule_temp_typ;

3185: l_sequence_number MRP_ATP_PUB.number_arr := MRP_ATP_PUB.number_arr(); -- for bug 2974324.
3186: found NUMBER;
3187:
3188: mast_rec mrp_atp_utils.mrp_atp_schedule_temp_typ;
3189: mast_rec_insert mrp_atp_utils.mrp_atp_schedule_temp_typ;
3190: TYPE mastcurtyp IS REF CURSOR;
3191: mast_cursor mastcurtyp;
3192: l_ret_code VARCHAR2(1);
3193: l_ret_status VARCHAR2(1000);

Line 3235: UPDATE MRP_ATP_SCHEDULE_TEMP

3231:
3232: FORALL j in 1..l_count
3233: ---bug 3295956: Merge two update sqls in 1. Update ship method on component lines from
3234: -- model line. Cascade info to components based on value of cascade_model_info_to_comp attribute
3235: UPDATE MRP_ATP_SCHEDULE_TEMP
3236: SET
3237:
3238: scenario_id = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3239: NVL(p_atp_rec.scenario_id(j), -1), scenario_id),

Line 3370: INSERT INTO mrp_atp_schedule_temp

3366: msc_sch_wb.atp_debug('Number of included items := ' || l_atp_rec.inventory_item_id.count);
3367: END IF;
3368: l_count := l_atp_rec.inventory_item_id.count;
3369: FORALL j in 1..l_count
3370: INSERT INTO mrp_atp_schedule_temp
3371: (
3372: mdi_rowid,
3373: session_id,
3374: scenario_id,

Line 3541: /* Update mrp_atp_schedule_temp mast_1

3537: msc_sch_wb.atp_debug('Model is present, update model component data');
3538: END IF;
3539: --bug 3295956: cascade ship method and delivery lead time from model to components
3540: -- Cascade info from model to components based on cascade_model_info_to_comp attribute. This is for istore.
3541: /* Update mrp_atp_schedule_temp mast_1
3542: set (scheduled_ship_date, end_pegging_id, scheduled_arrival_date, status_flag,
3543: group_ship_date, group_arrival_date, plan_id, ship_method, delivery_lead_time,
3544: source_organization_id, error_code) =
3545: (select Decode(NVL(mast_1.cascade_model_info_to_comp, 1), 1, scheduled_ship_date, null),

Line 3556: from mrp_atp_schedule_temp mast_2 where

3552: Decode(NVL(mast_1.cascade_model_info_to_comp, 1), 1, ship_method, null),
3553: Decode(NVL(mast_1.cascade_model_info_to_comp, 1), 1, delivery_lead_time, null),
3554: Decode(NVL(mast_1.cascade_model_info_to_comp, 1), 1, source_organization_id, null),
3555: decode(error_code, 150, 0, 61, 0, 0, 0, MSC_ATP_PVT.GROUPEL_ERROR)
3556: from mrp_atp_schedule_temp mast_2 where
3557: mast_2.session_id = p_session_id and
3558: mast_2.order_line_id = mast_1.ato_model_line_id and
3559: mast_2.source_organization_id = NVL(mast_1.source_organization_id, mast_2.source_organization_id)
3560: )

Line 3572: from mrp_atp_schedule_temp mast

3568:
3569: ---update plan_id on msc_cto_bom and msc_cto_sources for 24x7
3570: update msc_cto_bom mcb
3571: set plan_id = (select plan_id
3572: from mrp_atp_schedule_temp mast
3573: where mast.session_id = p_session_id
3574: and mast.order_line_id = mcb.line_id
3575: )
3576: where mcb.session_id = p_session_id;

Line 3584: from mrp_atp_schedule_temp mast

3580: END IF;
3581:
3582: update msc_cto_sources mcs
3583: set plan_id = (select plan_id
3584: from mrp_atp_schedule_temp mast
3585: where mast.session_id = p_session_id
3586: and mast.order_line_id = mcs.line_id
3587: )
3588: where mcs.session_id = p_session_id;

Line 3648: 'DELETE FROM MRP_ATP_SCHEDULE_TEMP'||L_source_DBLINK||

3644: /* bug 3378649: delete any data locally
3645: --delete any old data
3646: IF p_mode = RESULTS_MODE THEN
3647: l_sql_stmt :=
3648: 'DELETE FROM MRP_ATP_SCHEDULE_TEMP'||L_source_DBLINK||
3649: ' WHERE session_id = :p_session_id '||
3650: ' and status_flag in (1, 99, 2) ';
3651:
3652: EXECUTE IMMEDIATE l_sql_stmt USING p_session_id;

Line 3658: DELETE FROM MRP_ATP_SCHEDULE_TEMP

3654: IF PG_DEBUG in ('Y', 'C') THEN
3655: msc_sch_wb.atp_debug('deleting old data in local table');
3656: END IF;
3657:
3658: DELETE FROM MRP_ATP_SCHEDULE_TEMP
3659: WHERE session_id = p_session_id
3660: and status_flag in (1, 99, 2);
3661: END IF;
3662: */

Line 3672: 'Insert into mrp_atp_schedule_temp' || L_source_DBLINK ||

3668: msc_sch_wb.atp_debug('l_tnsfer_sts_flag := ' || l_tnsfer_sts_flag);
3669: END IF;
3670:
3671: l_sql_stmt :=
3672: 'Insert into mrp_atp_schedule_temp' || L_source_DBLINK ||
3673: ' (mdi_rowid,
3674: session_id,
3675: scenario_id,
3676: sr_instance_id,

Line 3924: l_sql_stmt := l_sql_stmt || ' from MRP_ATP_SCHEDULE_TEMP' || l_dest_dblink ||

3920: part_of_set --4500382
3921: ';
3922: END IF;
3923:
3924: l_sql_stmt := l_sql_stmt || ' from MRP_ATP_SCHEDULE_TEMP' || l_dest_dblink ||
3925: ' where session_id = :p_session_id
3926: and status_flag = ' || l_tnsfer_sts_flag ;
3927:
3928: