DBA Data[Home] [Help]

APPS.MSC_ATP_UTILS dependencies on MSC_ATP_PVT

Line 215: l_mso_lead_time_factor := MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR;

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

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

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

Line 691: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN

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

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

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

Line 2224: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN

2220: END IF;
2221:
2222: sql_stmt := 'Insert into mrp_atp_details_temp@' || p_dblink || ' (';
2223:
2224: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN
2225: sql_stmt := sql_stmt || l_std_cols || l_apps_v3_cols ||
2226: ' ) select ' || l_std_cols || l_apps_v3_cols;
2227: ELSE
2228: sql_stmt := sql_stmt || l_std_cols ||

Line 2312: MSC_ATP_PVT.G_SESSION_ID,

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

Line 2748: decode(MSC_ATP_PVT.G_INV_CTP, 5,

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
2746: set (atp_flag, atp_components_flag, bom_item_type, pick_components_flag, fixed_lt, variable_lt, atp_lead_time) =
2747: (Select msi.atp_flag,
2748: decode(MSC_ATP_PVT.G_INV_CTP, 5,
2749: --IF ATP flag for PTO model/ATO model is other than 'N' then we still go to destination
2750: -- Thats why atp components flag is set as it is for PTO ato models
2751: decode(mast.order_line_id, mast.ato_model_line_id, msi.atp_components_flag,
2752: decode(msi.pick_components_flag, 'Y', msi.atp_components_flag, 'N')) ,

Line 2761: (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))

2757: msi.VARIABLE_LEAD_TIME,
2758: ---bug 4078703: populate ATP lead time
2759: CEIL(decode(mast.order_line_id, mast.ato_model_line_id,
2760: decode(bom_item_type, 1,
2761: (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))
2762: from mtl_system_items msi
2763: where msi.organization_id = nvl(mast.source_organization_id, mast.validation_org)
2764: and msi.inventory_item_id = mast.inventory_item_id)
2765: where mast.session_id = p_session_id

Line 2960: MSC_ATP_PVT.G_INSTANCE_ID,

2956: (
2957: p_atp_rec.row_id(j),
2958: p_session_id,
2959: NVL(p_atp_rec.scenario_id(j), -1),
2960: MSC_ATP_PVT.G_INSTANCE_ID,
2961: --p_atp_rec.instance_id(j),
2962: p_atp_rec.inventory_item_id(j) ,
2963: p_atp_rec.inventory_item_name(j),
2964: p_atp_rec.source_organization_id(j),

Line 3084: IF MSC_ATP_PVT.G_CALLING_MODULE <> 724 THEN

3080: msc_sch_wb.atp_debug('After Inserting the data in request mode');
3081: msc_sch_wb.atp_debug('rows inserted = ' || SQL%ROWCOUNT);
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,

Line 3089: decode(MSC_ATP_PVT.G_INV_CTP, 5,

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
3091: -- Thats why atp components flag is set as it is for PTO ato models
3092: decode(mast.order_line_id, mast.ato_model_line_id, msi.atp_components_flag,
3093: decode(msi.pick_components_flag, 'Y', msi.atp_components_flag, 'N')) ,

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

3112: */
3113: MSC_ATP_UTILS.Update_Line_item_properties(p_session_id, p_atp_rec.action(1)); --3720018
3114: /*
3115: -- Bug 3449812 - Removed IF to populate internal_org in all cases
3116: -- IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
3117: --add condition to fiter based on atp query
3118: --removing the condition below to suport OE flag for all modules.
3119: --and (MSC_ATP_PVT.G_CALLING_MODULE IN (-1, 660)) THEN
3120: IF PG_DEBUG in ('Y', 'C') THEN

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

3115: -- Bug 3449812 - Removed IF to populate internal_org in all cases
3116: -- IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
3117: --add condition to fiter based on atp query
3118: --removing the condition below to suport OE flag for all modules.
3119: --and (MSC_ATP_PVT.G_CALLING_MODULE IN (-1, 660)) THEN
3120: IF PG_DEBUG in ('Y', 'C') THEN
3121: msc_sch_wb.atp_debug('Check if OE flag has been turned on or not');
3122: END IF;
3123: select count(*)

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

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
3142: where prha.requisition_header_id = mast.source_doc_id),
3143: INTERNAL_ORG_ID = -- Bug 3449812

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

3280: Decode(nvl(cascade_model_info_to_comp, 1), 1,
3281: p_atp_rec.group_arrival_date(j),null)),
3282: error_code = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3283: p_atp_rec.error_code(j),
3284: Decode(error_code, null,decode(p_atp_rec.error_code(j), 150, 0, 61, 0, 0, 0, MSC_ATP_PVT.GROUPEL_ERROR))),
3285: error_Message = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3286: p_atp_rec.message(j), null),
3287: status_flag = 2,
3288: end_pegging_id = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),

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

3309: p_atp_rec.sales_rep(j), null),
3310: customer_contact = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3311: p_atp_rec.customer_contact(j), null),
3312: compile_designator = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3313: DECODE(MSC_ATP_PVT.G_INV_CTP, 4, p_atp_rec.attribute_07(j), null), null),
3314: subst_flag = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3315: p_atp_rec.subst_flag(j), null),
3316: match_item_id = Decode(order_line_id, NVL(ato_model_line_id, order_line_id),
3317: p_atp_rec.match_item_id(j), null),

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

3505: l_atp_rec.req_item_available_date_qty(j),
3506: l_atp_rec.req_item_available_date(j),
3507: l_atp_rec.sales_rep(j),
3508: l_atp_rec.customer_contact(j),
3509: DECODE(MSC_ATP_PVT.G_INV_CTP, 4, l_atp_rec.attribute_07(j), null ),
3510: l_atp_rec.subst_flag(j),
3511: sysdate,
3512: l_user_id,
3513: sysdate,

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

3551: plan_id,
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)

Line 3736: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN

3732: sales_rep,
3733: customer_contact,
3734: compile_designator,
3735: subst_flag';
3736: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN
3737: l_sql_stmt := l_sql_stmt ||
3738: ', creation_date,
3739: created_by,
3740: last_update_date,

Line 3863: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN

3859: customer_contact,
3860: compile_designator,
3861: subst_flag';
3862:
3863: IF MSC_ATP_PVT.G_APPS_VER >= 3 THEN
3864: l_sql_stmt := l_sql_stmt ||
3865: ',creation_date,
3866: created_by,
3867: last_update_date,