DBA Data[Home] [Help]

APPS.MSC_ATP_UTILS dependencies on MSC_ATP_PVT

Line 217: l_mso_lead_time_factor := MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR;

213: --- can't use bulk collect in case of distributed set up becauase its not supported.
214: --s_cto_rearch
215: -- IF l_dynstring is null THEN
216: --e_cto_rearch
217: l_mso_lead_time_factor := MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR;
218: IF x_mode = results_mode THEN
219: l_status_flag := 2; -- changed form 1 to 2
220: ELSE
221: l_status_flag := 99;

Line 273: ,DECODE(MSC_ATP_PVT.G_INV_CTP, 5,

269: ,MDI_ROWID
270: ,DEMAND_SOURCE_TYPE
271: ,DEMAND_SOURCE_DELIVERY
272: /* --bug 4078703: always pass atp_lead_time back to OM
273: ,DECODE(MSC_ATP_PVT.G_INV_CTP, 5,
274: Decode(order_line_id, ato_model_line_id,
275: decode(bom_item_type, 1,
276: (fixed_lt + (variable_lt * QUANTITY_ORDERED)) * (1 + l_mso_lead_time_factor), 0), 0), 0)
277: */

Line 693: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN

689: ,CUSTOMER_CONTACT
690: ,SUBST_FLAG ' ;
691:
692: --diag_atp
693: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN
694: sql_stmt := sql_stmt || ', diagnostic_atp_flag ';
695: ELSE
696: sql_stmt := sql_stmt || ', 2'; -- non-diagnostic for older sources
697: END IF;

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 2226: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN

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;
2229: ELSE
2230: sql_stmt := sql_stmt || l_std_cols ||

Line 2314: MSC_ATP_PVT.G_SESSION_ID,

2310: last_updated_by,
2311: last_update_login
2312: )
2313: SELECT
2314: MSC_ATP_PVT.G_SESSION_ID,
2315: scenario_id,
2316: order_line_id,
2317: ATP_Level,
2318: Inventory_Item_Id,

Line 2750: decode(MSC_ATP_PVT.G_INV_CTP, 5,

2746: --other module. Here we populte it on top model line only. This value is populated
2747: -- option class and items in put_sch_data_resulst_mode procedure
2748: set (atp_flag, atp_components_flag, bom_item_type, pick_components_flag, fixed_lt, variable_lt, atp_lead_time) =
2749: (Select msi.atp_flag,
2750: decode(MSC_ATP_PVT.G_INV_CTP, 5,
2751: --IF ATP flag for PTO model/ATO model is other than 'N' then we still go to destination
2752: -- Thats why atp components flag is set as it is for PTO ato models
2753: decode(mast.order_line_id, mast.ato_model_line_id, msi.atp_components_flag,
2754: decode(msi.pick_components_flag, 'Y', msi.atp_components_flag, 'N')) ,

Line 2763: (NVL(msi.fixed_lead_time, 0) + (NVL(msi.VARIABLE_LEAD_TIME, 0) * mast.quantity_ordered)) * (1 + MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR), 0), null))

2759: msi.VARIABLE_LEAD_TIME,
2760: ---bug 4078703: populate ATP lead time
2761: CEIL(decode(mast.order_line_id, mast.ato_model_line_id,
2762: decode(bom_item_type, 1,
2763: (NVL(msi.fixed_lead_time, 0) + (NVL(msi.VARIABLE_LEAD_TIME, 0) * mast.quantity_ordered)) * (1 + MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR), 0), null))
2764: from mtl_system_items msi
2765: where msi.organization_id = nvl(mast.source_organization_id, mast.validation_org)
2766: and msi.inventory_item_id = mast.inventory_item_id)
2767: where mast.session_id = p_session_id

Line 2815: decode(MSC_ATP_PVT.G_INV_CTP, 5,

2811: --other module. Here we populte it on top model line only. This value is populated
2812: -- option class and items in put_sch_data_resulst_mode procedure
2813: set (atp_flag, atp_components_flag, bom_item_type, pick_components_flag, fixed_lt, variable_lt, atp_lead_time) =
2814: (Select msi.atp_flag,
2815: decode(MSC_ATP_PVT.G_INV_CTP, 5,
2816: --IF ATP flag for PTO model/ATO model is other than 'N' then we still go to destination
2817: -- Thats why atp components flag is set as it is for PTO ato models
2818: decode(mast.order_line_id, mast.ato_model_line_id, msi.atp_components_flag,
2819: decode(msi.pick_components_flag, 'Y', msi.atp_components_flag, 'N')) ,

Line 2828: (NVL(msi.fixed_lead_time, 0) + (NVL(msi.VARIABLE_LEAD_TIME, 0) * mast.quantity_ordered)) * (1 + MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR), 0), null))

2824: msi.VARIABLE_LEAD_TIME,
2825: ---bug 4078703: populate ATP lead time
2826: CEIL(decode(mast.order_line_id, mast.ato_model_line_id,
2827: decode(bom_item_type, 1,
2828: (NVL(msi.fixed_lead_time, 0) + (NVL(msi.VARIABLE_LEAD_TIME, 0) * mast.quantity_ordered)) * (1 + MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR), 0), null))
2829: from msc_system_items msi
2830: where msi.organization_id = nvl(mast.source_organization_id, mast.validation_org)
2831: and msi.sr_inventory_item_id = mast.inventory_item_id
2832: and msi.plan_id = -1

Line 3009: MSC_ATP_PVT.G_INSTANCE_ID,

3005: (
3006: p_atp_rec.row_id(j),
3007: p_session_id,
3008: NVL(p_atp_rec.scenario_id(j), -1),
3009: MSC_ATP_PVT.G_INSTANCE_ID,
3010: --p_atp_rec.instance_id(j),
3011: p_atp_rec.inventory_item_id(j) ,
3012: p_atp_rec.inventory_item_name(j),
3013: p_atp_rec.source_organization_id(j),

Line 3133: IF MSC_ATP_PVT.G_CALLING_MODULE <> 724 THEN

3129: msc_sch_wb.atp_debug('After Inserting the data in request mode');
3130: msc_sch_wb.atp_debug('rows inserted = ' || SQL%ROWCOUNT);
3131: END IF;
3132:
3133: IF MSC_ATP_PVT.G_CALLING_MODULE <> 724 THEN
3134: /*
3135: update mrp_atp_schedule_temp mast
3136: set (atp_flag, atp_components_flag, bom_item_type, pick_components_flag, fixed_lt, variable_lt) =
3137: (Select msi.atp_flag,

Line 3138: decode(MSC_ATP_PVT.G_INV_CTP, 5,

3134: /*
3135: update mrp_atp_schedule_temp mast
3136: set (atp_flag, atp_components_flag, bom_item_type, pick_components_flag, fixed_lt, variable_lt) =
3137: (Select msi.atp_flag,
3138: decode(MSC_ATP_PVT.G_INV_CTP, 5,
3139: --IF ATP flag for PTO model/ATO model is other than 'N' then we still go to destination
3140: -- Thats why atp components flag is set as it is for PTO ato models
3141: decode(mast.order_line_id, mast.ato_model_line_id, msi.atp_components_flag,
3142: decode(msi.pick_components_flag, 'Y', msi.atp_components_flag, 'N')) ,

Line 3170: -- IF MSC_ATP_PVT.G_INV_CTP = 4 THEN

3166: MSC_ATP_UTILS.Update_Line_item_properties(p_session_id, p_atp_rec.action(1)); --3720018
3167: END IF;
3168: /*
3169: -- Bug 3449812 - Removed IF to populate internal_org in all cases
3170: -- IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
3171: --add condition to fiter based on atp query
3172: --removing the condition below to suport OE flag for all modules.
3173: --and (MSC_ATP_PVT.G_CALLING_MODULE IN (-1, 660)) THEN
3174: IF PG_DEBUG in ('Y', 'C') THEN

Line 3173: --and (MSC_ATP_PVT.G_CALLING_MODULE IN (-1, 660)) THEN

3169: -- Bug 3449812 - Removed IF to populate internal_org in all cases
3170: -- IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
3171: --add condition to fiter based on atp query
3172: --removing the condition below to suport OE flag for all modules.
3173: --and (MSC_ATP_PVT.G_CALLING_MODULE IN (-1, 660)) THEN
3174: IF PG_DEBUG in ('Y', 'C') THEN
3175: msc_sch_wb.atp_debug('Check if OE flag has been turned on or not');
3176: END IF;
3177: select count(*)

Line 3193: (Select decode(MSC_ATP_PVT.G_INV_CTP, 5, mast.OE_FLAG,

3189: IF l_count > 0 then
3190:
3191: update mrp_atp_schedule_temp mast
3192: set OE_FLAG =
3193: (Select decode(MSC_ATP_PVT.G_INV_CTP, 5, mast.OE_FLAG,
3194: decode( prha.interface_source_code, 'MRP', 'Y', 'MSC', 'Y', 'N'))
3195: from po_requisition_headers_all prha
3196: where prha.requisition_header_id = mast.source_doc_id),
3197: INTERNAL_ORG_ID = -- Bug 3449812

Line 3338: Decode(error_code, null,decode(p_atp_rec.error_code(j), 150, 0, 61, 0, 0, 0, MSC_ATP_PVT.GROUPEL_ERROR))),

3334: Decode(nvl(cascade_model_info_to_comp, 1), 1,
3335: p_atp_rec.group_arrival_date(j),null)),
3336: error_code = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3337: p_atp_rec.error_code(j),
3338: Decode(error_code, null,decode(p_atp_rec.error_code(j), 150, 0, 61, 0, 0, 0, MSC_ATP_PVT.GROUPEL_ERROR))),
3339: error_Message = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3340: p_atp_rec.message(j), null),
3341: status_flag = 2,
3342: end_pegging_id = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),

Line 3367: DECODE(MSC_ATP_PVT.G_INV_CTP, 4, p_atp_rec.attribute_07(j), null), null),

3363: p_atp_rec.sales_rep(j), null),
3364: customer_contact = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3365: p_atp_rec.customer_contact(j), null),
3366: compile_designator = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3367: DECODE(MSC_ATP_PVT.G_INV_CTP, 4, p_atp_rec.attribute_07(j), null), null),
3368: subst_flag = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3369: p_atp_rec.subst_flag(j), null),
3370: match_item_id = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3371: p_atp_rec.match_item_id(j), null),

Line 3563: DECODE(MSC_ATP_PVT.G_INV_CTP, 4, l_atp_rec.attribute_07(j), null ),

3559: l_atp_rec.req_item_available_date_qty(j),
3560: l_atp_rec.req_item_available_date(j),
3561: l_atp_rec.sales_rep(j),
3562: l_atp_rec.customer_contact(j),
3563: DECODE(MSC_ATP_PVT.G_INV_CTP, 4, l_atp_rec.attribute_07(j), null ),
3564: l_atp_rec.subst_flag(j),
3565: sysdate,
3566: l_user_id,
3567: sysdate,

Line 3609: decode(error_code, 150, 0, 61, 0, 0, 0, MSC_ATP_PVT.GROUPEL_ERROR)

3605: plan_id,
3606: Decode(NVL(mast_1.cascade_model_info_to_comp, 1), 1, ship_method, null),
3607: Decode(NVL(mast_1.cascade_model_info_to_comp, 1), 1, delivery_lead_time, null),
3608: Decode(NVL(mast_1.cascade_model_info_to_comp, 1), 1, source_organization_id, null),
3609: decode(error_code, 150, 0, 61, 0, 0, 0, MSC_ATP_PVT.GROUPEL_ERROR)
3610: from mrp_atp_schedule_temp mast_2 where
3611: mast_2.session_id = p_session_id and
3612: mast_2.order_line_id = mast_1.ato_model_line_id and
3613: mast_2.source_organization_id = NVL(mast_1.source_organization_id, mast_2.source_organization_id)

Line 3790: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN

3786: sales_rep,
3787: customer_contact,
3788: compile_designator,
3789: subst_flag';
3790: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN
3791: l_sql_stmt := l_sql_stmt ||
3792: ', creation_date,
3793: created_by,
3794: last_update_date,

Line 3917: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN

3913: customer_contact,
3914: compile_designator,
3915: subst_flag';
3916:
3917: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN
3918: l_sql_stmt := l_sql_stmt ||
3919: ',creation_date,
3920: created_by,
3921: last_update_date,