DBA Data[Home] [Help]

APPS.MSC_SDA_PKG dependencies on MSC_SUPPLIES

Line 128: c_msc_supplies constant number := 1;

124: c_all_region_type_text varchar2(300) := msc_sda_utils.c_all_region_type_text;
125: c_all_org_type_text varchar2(300) := msc_sda_utils.c_all_org_type_text;
126:
127: --constants for p_souce_type
128: c_msc_supplies constant number := 1;
129: c_msc_demands constant number := 2;
130:
131: --constants for p_type_flag
132: c_row_type_flag constant number := 1;

Line 398: -- msc_supplies order type 81

394: -- msc_demands origination_type 65 //pabram..need to check
395: c_row2_total_ret_fcst constant integer:= 9;
396: -- nvl(returns manual forecast, returns fcst + returns dmd schedule) //pabram..need to check
397: c_row2_ret_fcst constant integer:= 10;
398: -- msc_supplies order type 81
399: c_row2_ret_dmd_schd constant integer:= 11;
400: -- msc_supplies order type 82
401: c_row2_ret_manual_fcst constant integer:= 12;
402: -- msc_supplies order type 83

Line 400: -- msc_supplies order type 82

396: -- nvl(returns manual forecast, returns fcst + returns dmd schedule) //pabram..need to check
397: c_row2_ret_fcst constant integer:= 10;
398: -- msc_supplies order type 81
399: c_row2_ret_dmd_schd constant integer:= 11;
400: -- msc_supplies order type 82
401: c_row2_ret_manual_fcst constant integer:= 12;
402: -- msc_supplies order type 83
403: c_row2_ret_bestfit_fcst constant integer:= 13;
404: -- msc_supplies order type 84

Line 402: -- msc_supplies order type 83

398: -- msc_supplies order type 81
399: c_row2_ret_dmd_schd constant integer:= 11;
400: -- msc_supplies order type 82
401: c_row2_ret_manual_fcst constant integer:= 12;
402: -- msc_supplies order type 83
403: c_row2_ret_bestfit_fcst constant integer:= 13;
404: -- msc_supplies order type 84
405: c_row2_usage_fcst constant integer:= 14;
406: -- Usage Forecast

Line 404: -- msc_supplies order type 84

400: -- msc_supplies order type 82
401: c_row2_ret_manual_fcst constant integer:= 12;
402: -- msc_supplies order type 83
403: c_row2_ret_bestfit_fcst constant integer:= 13;
404: -- msc_supplies order type 84
405: c_row2_usage_fcst constant integer:= 14;
406: -- Usage Forecast
407: c_row2_popultn_fcst constant integer:= 15;
408: -- Population based Forecast

Line 431: -- returns history ,msc_supplies

427: -- pivot row types
428: c_row_dmd_hist constant integer:= 1;
429: -- demand history ,msc_demands
430: c_row_returns_hist constant integer:= 2;
431: -- returns history ,msc_supplies
432: --
433: -- history view ends
434: --
435:

Line 1761: msc_supplies ms,

1757: null, nvl(ms.firm_quantity,ms.new_order_quantity),
1758: ms.daily_rate) )) new_quantity,
1759: sum(nvl(ms.old_order_quantity,0)) old_quantity
1760: from
1761: msc_supplies ms,
1762: msc_analysis_query maq,
1763: msc_form_query mfq1, -- org-list
1764: msc_form_query mfq2, -- item-list
1765: msc_plans mp,

Line 2447: msc_supplies ms,

2443: null, ms.new_order_quantity,
2444: ms.daily_rate) )) new_quantity,
2445: 0 old_quantity
2446: from
2447: msc_supplies ms,
2448: msc_analysis_query maq,
2449: msc_form_query mfq1, -- region-to-org-list
2450: msc_form_query mfq2, -- item-list
2451: msc_plans mp,

Line 2518: msc_supplies ms,

2514: null, ms.new_order_quantity,
2515: ms.daily_rate) )) new_quantity,
2516: 0 old_quantity
2517: from
2518: msc_supplies ms,
2519: msc_analysis_query maq,
2520: msc_form_query mfq1, -- region-to-org-list
2521: msc_form_query mfq2, -- item-list
2522: msc_plans mp,

Line 2586: msc_supplies ms,

2582: null, ms.new_order_quantity,
2583: ms.daily_rate) ))) new_quantity,
2584: 0 old_quantity
2585: from
2586: msc_supplies ms,
2587: msc_analysis_query maq,
2588: msc_form_query mfq1, -- region-to-org-list
2589: msc_form_query mfq2, -- item-list
2590: msc_form_query mfq4, -- msc_supplies duplicate rows

Line 2590: msc_form_query mfq4, -- msc_supplies duplicate rows

2586: msc_supplies ms,
2587: msc_analysis_query maq,
2588: msc_form_query mfq1, -- region-to-org-list
2589: msc_form_query mfq2, -- item-list
2590: msc_form_query mfq4, -- msc_supplies duplicate rows
2591: msc_plans mp,
2592: msc_system_items msi,
2593: msc_form_query mfq3 --g_plan_bkts_query_id
2594: where maq.query_id = p_query_id

Line 2660: --engine will not flush demand history and returns history into msc_supplies/msc_demands

2656: ---------------------------
2657: --- HISTORY VIEW CUSROR ---
2658: ---------------------------
2659:
2660: --engine will not flush demand history and returns history into msc_supplies/msc_demands
2661: --ui needs to look at msd views to get this information
2662: cursor hist_snapshot_cur is
2663: select
2664: maq.row_index,

Line 2711: msc_supplies ms,

2707: msc_sda_pkg.getHistEndDate(mfq3.date2, l_min_date, l_max_date, ms.new_schedule_date) old_date,
2708: sum(ms.new_order_quantity) new_quantity,
2709: 0 old_quantity
2710: from
2711: msc_supplies ms,
2712: msc_analysis_query maq,
2713: msc_form_query mfq1, -- region-to-org-list
2714: msc_form_query mfq2, -- item-list
2715: msc_form_query mfq3 -- history calendar

Line 3332: --we need to duplicate returns forecast rows into msc_supplies, so we can get returns manual forecast also from one select in forecast view cursor

3328:
3329: insert into msc_form_query (query_id, creation_date, created_by, last_updated_by, last_update_date, number1, number2)
3330: values (g_md_dup_rows_qid, sysdate, -1, -1, sysdate, c_dmd2_net_fcst, c_dmd2_manual_fcst);
3331:
3332: --we need to duplicate returns forecast rows into msc_supplies, so we can get returns manual forecast also from one select in forecast view cursor
3333: g_ms_dup_rows_qid := msc_sda_utils.getNewFormQueryId;
3334:
3335: insert into msc_form_query (query_id, creation_date, created_by, last_updated_by, last_update_date, number1, number2)
3336: values (g_ms_dup_rows_qid, sysdate, -1, -1, sysdate, c_sup2_rtns_fcst, c_sup2_rtns_fcst);

Line 3819: p_from_table := 'msc_supplies';

3815: elsif (p_row_offset = c_row2_bestfit_fcst) then
3816: p_from_table := 'msc_demands';
3817: p_order_type_list := c_dmd2_bestfit_fcst;
3818: elsif (p_row_offset = c_row2_total_ret_fcst) then
3819: p_from_table := 'msc_supplies';
3820: p_order_type_list := to_char(c_sup2_rtns_fcst) ||','|| to_char(c_sup2_rtns_dmd_schd);
3821: elsif (p_row_offset = c_row2_ret_fcst) then
3822: p_from_table := 'msc_supplies';
3823: p_order_type_list := c_sup2_rtns_fcst;

Line 3822: p_from_table := 'msc_supplies';

3818: elsif (p_row_offset = c_row2_total_ret_fcst) then
3819: p_from_table := 'msc_supplies';
3820: p_order_type_list := to_char(c_sup2_rtns_fcst) ||','|| to_char(c_sup2_rtns_dmd_schd);
3821: elsif (p_row_offset = c_row2_ret_fcst) then
3822: p_from_table := 'msc_supplies';
3823: p_order_type_list := c_sup2_rtns_fcst;
3824: elsif (p_row_offset = c_row2_ret_dmd_schd) then
3825: p_from_table := 'msc_supplies';
3826: p_order_type_list := c_sup2_rtns_dmd_schd;

Line 3825: p_from_table := 'msc_supplies';

3821: elsif (p_row_offset = c_row2_ret_fcst) then
3822: p_from_table := 'msc_supplies';
3823: p_order_type_list := c_sup2_rtns_fcst;
3824: elsif (p_row_offset = c_row2_ret_dmd_schd) then
3825: p_from_table := 'msc_supplies';
3826: p_order_type_list := c_sup2_rtns_dmd_schd;
3827: elsif (p_row_offset = c_row2_ret_manual_fcst) then
3828: p_from_table := 'msc_supplies';
3829: p_order_type_list := c_sup2_rtns_fcst;

Line 3828: p_from_table := 'msc_supplies';

3824: elsif (p_row_offset = c_row2_ret_dmd_schd) then
3825: p_from_table := 'msc_supplies';
3826: p_order_type_list := c_sup2_rtns_dmd_schd;
3827: elsif (p_row_offset = c_row2_ret_manual_fcst) then
3828: p_from_table := 'msc_supplies';
3829: p_order_type_list := c_sup2_rtns_fcst;
3830: elsif (p_row_offset = c_row2_ret_bestfit_fcst) then
3831: p_from_table := 'msc_supplies';
3832: p_order_type_list := c_sup2_rtns_bestfit_fcst;

Line 3831: p_from_table := 'msc_supplies';

3827: elsif (p_row_offset = c_row2_ret_manual_fcst) then
3828: p_from_table := 'msc_supplies';
3829: p_order_type_list := c_sup2_rtns_fcst;
3830: elsif (p_row_offset = c_row2_ret_bestfit_fcst) then
3831: p_from_table := 'msc_supplies';
3832: p_order_type_list := c_sup2_rtns_bestfit_fcst;
3833: elsif (p_row_offset = c_row2_usage_fcst) then
3834: p_from_table := 'msc_demands';
3835: p_order_type_list := c_dmd2_usage_fcst;

Line 3877: p_from_table := 'msc_supplies';

3873: p_order_type_list := to_char(c_dmd_fcst) ||', '|| to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds)
3874: ||', '|| to_char(c_dmd_pod)
3875: ||', '|| to_char(c_dmd_mps) ||', '|| to_char(c_dmd_manual_mds);
3876: elsif (p_row_offset = c_row_onhand) then --10;
3877: p_from_table := 'msc_supplies';
3878: p_order_type_list := c_sup_onhand;
3879: elsif (p_row_offset = c_row_transit) then --11;
3880: p_from_table := 'msc_supplies';
3881: p_order_type_list := c_sup_intrnst_shpmt;

Line 3880: p_from_table := 'msc_supplies';

3876: elsif (p_row_offset = c_row_onhand) then --10;
3877: p_from_table := 'msc_supplies';
3878: p_order_type_list := c_sup_onhand;
3879: elsif (p_row_offset = c_row_transit) then --11;
3880: p_from_table := 'msc_supplies';
3881: p_order_type_list := c_sup_intrnst_shpmt;
3882: elsif (p_row_offset = c_row_receiving) then --12;
3883: p_from_table := 'msc_supplies';
3884: p_order_type_list := c_sup_intrnst_rec;

Line 3883: p_from_table := 'msc_supplies';

3879: elsif (p_row_offset = c_row_transit) then --11;
3880: p_from_table := 'msc_supplies';
3881: p_order_type_list := c_sup_intrnst_shpmt;
3882: elsif (p_row_offset = c_row_receiving) then --12;
3883: p_from_table := 'msc_supplies';
3884: p_order_type_list := c_sup_intrnst_rec;
3885: elsif (p_row_offset = c_row_new_buy_po) then --13;
3886: p_from_table := 'msc_supplies';
3887: p_order_type_list := c_sup_new_buy_po;

Line 3886: p_from_table := 'msc_supplies';

3882: elsif (p_row_offset = c_row_receiving) then --12;
3883: p_from_table := 'msc_supplies';
3884: p_order_type_list := c_sup_intrnst_rec;
3885: elsif (p_row_offset = c_row_new_buy_po) then --13;
3886: p_from_table := 'msc_supplies';
3887: p_order_type_list := c_sup_new_buy_po;
3888: elsif (p_row_offset = c_row_new_buy_po_req) then --14;
3889: p_from_table := 'msc_supplies';
3890: p_order_type_list := c_sup_new_buy_po_req;

Line 3889: p_from_table := 'msc_supplies';

3885: elsif (p_row_offset = c_row_new_buy_po) then --13;
3886: p_from_table := 'msc_supplies';
3887: p_order_type_list := c_sup_new_buy_po;
3888: elsif (p_row_offset = c_row_new_buy_po_req) then --14;
3889: p_from_table := 'msc_supplies';
3890: p_order_type_list := c_sup_new_buy_po_req;
3891: elsif (p_row_offset = c_row_intrnl_rpr_ordr) then --15;
3892: p_from_table := 'msc_supplies';
3893: p_order_type_list := to_char(c_sup_intrnl_rpr_ordr);

Line 3892: p_from_table := 'msc_supplies';

3888: elsif (p_row_offset = c_row_new_buy_po_req) then --14;
3889: p_from_table := 'msc_supplies';
3890: p_order_type_list := c_sup_new_buy_po_req;
3891: elsif (p_row_offset = c_row_intrnl_rpr_ordr) then --15;
3892: p_from_table := 'msc_supplies';
3893: p_order_type_list := to_char(c_sup_intrnl_rpr_ordr);
3894: elsif (p_row_offset = c_row_xtrnl_rpr_ordr) then --16;
3895: p_from_table := 'msc_supplies';
3896: p_order_type_list := to_char(c_sup_xtrnl_rpr_ordr)||', '|| to_char(c_sup_ext_rep_req);

Line 3895: p_from_table := 'msc_supplies';

3891: elsif (p_row_offset = c_row_intrnl_rpr_ordr) then --15;
3892: p_from_table := 'msc_supplies';
3893: p_order_type_list := to_char(c_sup_intrnl_rpr_ordr);
3894: elsif (p_row_offset = c_row_xtrnl_rpr_ordr) then --16;
3895: p_from_table := 'msc_supplies';
3896: p_order_type_list := to_char(c_sup_xtrnl_rpr_ordr)||', '|| to_char(c_sup_ext_rep_req);
3897: elsif (p_row_offset = c_row_inbnd_ship) then --17;
3898: p_from_table := 'msc_supplies';
3899: p_order_type_list := c_sup_new_buy_po_req;

Line 3898: p_from_table := 'msc_supplies';

3894: elsif (p_row_offset = c_row_xtrnl_rpr_ordr) then --16;
3895: p_from_table := 'msc_supplies';
3896: p_order_type_list := to_char(c_sup_xtrnl_rpr_ordr)||', '|| to_char(c_sup_ext_rep_req);
3897: elsif (p_row_offset = c_row_inbnd_ship) then --17;
3898: p_from_table := 'msc_supplies';
3899: p_order_type_list := c_sup_new_buy_po_req;
3900: elsif (p_row_offset = c_row_rpr_wo) then --18;
3901: p_from_table := 'msc_supplies';
3902: p_order_type_list := c_sup_rpr_wo ||', '|| to_char(c_sup_rpr_wo_ext_rep_supp) ;

Line 3901: p_from_table := 'msc_supplies';

3897: elsif (p_row_offset = c_row_inbnd_ship) then --17;
3898: p_from_table := 'msc_supplies';
3899: p_order_type_list := c_sup_new_buy_po_req;
3900: elsif (p_row_offset = c_row_rpr_wo) then --18;
3901: p_from_table := 'msc_supplies';
3902: p_order_type_list := c_sup_rpr_wo ||', '|| to_char(c_sup_rpr_wo_ext_rep_supp) ;
3903: elsif (p_row_offset = c_row_plnd_new_buy_ordr) then --19;
3904: p_from_table := 'msc_supplies';
3905: p_order_type_list := c_sup_plnd_new_buy_ordr;

Line 3904: p_from_table := 'msc_supplies';

3900: elsif (p_row_offset = c_row_rpr_wo) then --18;
3901: p_from_table := 'msc_supplies';
3902: p_order_type_list := c_sup_rpr_wo ||', '|| to_char(c_sup_rpr_wo_ext_rep_supp) ;
3903: elsif (p_row_offset = c_row_plnd_new_buy_ordr) then --19;
3904: p_from_table := 'msc_supplies';
3905: p_order_type_list := c_sup_plnd_new_buy_ordr;
3906: elsif (p_row_offset = c_row_plnd_intrnl_rpr_ordr) then --20;
3907: p_from_table := 'msc_supplies';
3908: p_order_type_list := c_sup_plnd_intrnl_rpr_ordr;

Line 3907: p_from_table := 'msc_supplies';

3903: elsif (p_row_offset = c_row_plnd_new_buy_ordr) then --19;
3904: p_from_table := 'msc_supplies';
3905: p_order_type_list := c_sup_plnd_new_buy_ordr;
3906: elsif (p_row_offset = c_row_plnd_intrnl_rpr_ordr) then --20;
3907: p_from_table := 'msc_supplies';
3908: p_order_type_list := c_sup_plnd_intrnl_rpr_ordr;
3909: elsif (p_row_offset = c_row_plnd_xtrnl_rpr_ordr) then --21;
3910: p_from_table := 'msc_supplies';
3911: p_order_type_list := c_sup_plnd_xtrnl_rpr_ordr;

Line 3910: p_from_table := 'msc_supplies';

3906: elsif (p_row_offset = c_row_plnd_intrnl_rpr_ordr) then --20;
3907: p_from_table := 'msc_supplies';
3908: p_order_type_list := c_sup_plnd_intrnl_rpr_ordr;
3909: elsif (p_row_offset = c_row_plnd_xtrnl_rpr_ordr) then --21;
3910: p_from_table := 'msc_supplies';
3911: p_order_type_list := c_sup_plnd_xtrnl_rpr_ordr;
3912: elsif (p_row_offset = c_row_plnd_inbnd_ship) then --22;
3913: p_from_table := 'msc_supplies';
3914: p_order_type_list := c_sup_plnd_inbnd_ship;

Line 3913: p_from_table := 'msc_supplies';

3909: elsif (p_row_offset = c_row_plnd_xtrnl_rpr_ordr) then --21;
3910: p_from_table := 'msc_supplies';
3911: p_order_type_list := c_sup_plnd_xtrnl_rpr_ordr;
3912: elsif (p_row_offset = c_row_plnd_inbnd_ship) then --22;
3913: p_from_table := 'msc_supplies';
3914: p_order_type_list := c_sup_plnd_inbnd_ship;
3915: elsif (p_row_offset = c_row_plnd_rpr_wo) then --23;
3916: p_from_table := 'msc_supplies';
3917: p_order_type_list := c_sup_plnd_rpr_wo;

Line 3916: p_from_table := 'msc_supplies';

3912: elsif (p_row_offset = c_row_plnd_inbnd_ship) then --22;
3913: p_from_table := 'msc_supplies';
3914: p_order_type_list := c_sup_plnd_inbnd_ship;
3915: elsif (p_row_offset = c_row_plnd_rpr_wo) then --23;
3916: p_from_table := 'msc_supplies';
3917: p_order_type_list := c_sup_plnd_rpr_wo;
3918: elsif (p_row_offset = c_row_plnd_warr_ordr) then --24;
3919: p_from_table := null;
3920: p_order_type_list := null;

Line 3922: p_from_table := 'msc_supplies';

3918: elsif (p_row_offset = c_row_plnd_warr_ordr) then --24;
3919: p_from_table := null;
3920: p_order_type_list := null;
3921: elsif (p_row_offset = c_row_total_supply) then --25;
3922: p_from_table := 'msc_supplies';
3923: p_order_type_list := to_char(c_sup_intrnst_shpmt) ||','|| to_char(c_sup_intrnst_rec) ||','|| to_char(c_sup_new_buy_po) ||','||
3924: to_char(c_sup_new_buy_po_req) ||','|| to_char(c_sup_intrnl_rpr_ordr) ||','|| to_char(c_sup_xtrnl_rpr_ordr) ||','||
3925: to_char(c_sup_rpr_wo) ||','|| to_char(c_row_plnd_new_buy_ordr) ||','|| to_char(c_sup_plnd_intrnl_rpr_ordr) ||','||
3926: to_char(c_sup_plnd_xtrnl_rpr_ordr) ||','|| to_char(c_sup_plnd_inbnd_ship) ||','|| to_char(c_sup_plnd_rpr_wo)

Line 3970: p_from_table := 'msc_supplies';

3966: p_from_table := 'msc_demands';
3967: p_order_type_list := to_char(c_dmd_defc_part_dmd)||','||to_char(c_dmd_defc_plnd_part_dmd);
3968: p_part_condition := c_part_bad;
3969: elsif (p_row_offset = c_row_defc_onhand) then --37;
3970: p_from_table := 'msc_supplies';
3971: p_order_type_list := c_sup_defc_onhand;
3972: p_part_condition := c_part_bad;
3973: elsif (p_row_offset = c_row_returns) then --38;
3974: p_from_table := 'msc_supplies';

Line 3974: p_from_table := 'msc_supplies';

3970: p_from_table := 'msc_supplies';
3971: p_order_type_list := c_sup_defc_onhand;
3972: p_part_condition := c_part_bad;
3973: elsif (p_row_offset = c_row_returns) then --38;
3974: p_from_table := 'msc_supplies';
3975: p_order_type_list := c_sup_defc_returns;
3976: p_part_condition := c_part_bad;
3977: elsif (p_row_offset = c_row_defc_inbnd_ship) then --39;
3978: p_from_table := 'msc_supplies';

Line 3978: p_from_table := 'msc_supplies';

3974: p_from_table := 'msc_supplies';
3975: p_order_type_list := c_sup_defc_returns;
3976: p_part_condition := c_part_bad;
3977: elsif (p_row_offset = c_row_defc_inbnd_ship) then --39;
3978: p_from_table := 'msc_supplies';
3979: p_order_type_list := c_sup_defc_inbnd_ship;
3980: p_part_condition := c_part_bad;
3981: elsif (p_row_offset = c_row_defc_plnd_inbnd_ship) then --40;
3982: p_from_table := 'msc_supplies';

Line 3982: p_from_table := 'msc_supplies';

3978: p_from_table := 'msc_supplies';
3979: p_order_type_list := c_sup_defc_inbnd_ship;
3980: p_part_condition := c_part_bad;
3981: elsif (p_row_offset = c_row_defc_plnd_inbnd_ship) then --40;
3982: p_from_table := 'msc_supplies';
3983: p_order_type_list := c_sup_defc_plnd_inbnd_ship;
3984: p_part_condition := c_part_bad;
3985: elsif (p_row_offset = c_row_defc_transit) then --41;
3986: p_from_table := 'msc_supplies';

Line 3986: p_from_table := 'msc_supplies';

3982: p_from_table := 'msc_supplies';
3983: p_order_type_list := c_sup_defc_plnd_inbnd_ship;
3984: p_part_condition := c_part_bad;
3985: elsif (p_row_offset = c_row_defc_transit) then --41;
3986: p_from_table := 'msc_supplies';
3987: p_order_type_list := c_sup_defc_transit;
3988: p_part_condition := c_part_bad;
3989: elsif (p_row_offset = c_row_defc_rec) then --42;
3990: p_from_table := 'msc_supplies';

Line 3990: p_from_table := 'msc_supplies';

3986: p_from_table := 'msc_supplies';
3987: p_order_type_list := c_sup_defc_transit;
3988: p_part_condition := c_part_bad;
3989: elsif (p_row_offset = c_row_defc_rec) then --42;
3990: p_from_table := 'msc_supplies';
3991: p_order_type_list := c_sup_defc_rec;
3992: p_part_condition := c_part_bad;
3993: elsif (p_row_offset = c_row_total_defc_supply) then --43;
3994: p_from_table := 'msc_supplies';

Line 3994: p_from_table := 'msc_supplies';

3990: p_from_table := 'msc_supplies';
3991: p_order_type_list := c_sup_defc_rec;
3992: p_part_condition := c_part_bad;
3993: elsif (p_row_offset = c_row_total_defc_supply) then --43;
3994: p_from_table := 'msc_supplies';
3995: p_order_type_list := to_char(c_sup_defc_returns) ||','|| to_char(c_sup_defc_inbnd_ship) ||','|| to_char(c_sup_defc_onhand)
3996: ||','|| to_char(c_row_defc_plnd_inbnd_ship) ||','|| to_char(c_sup_defc_transit) ||','|| to_char(c_sup_defc_rec);
3997: p_part_condition := c_part_bad;
3998: elsif (p_row_offset = c_row_defc_pab) then --44;

Line 4086: if (p_from_table = 'msc_supplies') then

4082: sql_stmt := 'insert into msc_form_query ('||
4083: ' query_id, last_update_date, last_updated_by, creation_date, created_by,number1) '||
4084: ' select distinct '|| p_mfq_id ||', sysdate, 1, sysdate, 1, ';
4085:
4086: if (p_from_table = 'msc_supplies') then
4087: sql_stmt := sql_stmt || ' transaction_id from '|| p_from_table;
4088: elsif (p_from_table in ('msc_demands', 'msc_forecast_updates') ) then
4089: sql_stmt := sql_stmt || ' demand_id from '|| p_from_table;
4090: elsif (p_from_table = 'msc_orders_v') then

Line 4109: if (p_from_table = 'msc_supplies') then

4105: if (l_item_id_list is not null) then
4106: sql_stmt := sql_stmt || ' and inventory_item_id in ('|| l_item_id_list ||') ';
4107: end if;
4108:
4109: if (p_from_table = 'msc_supplies') then
4110: sql_stmt := sql_stmt || ' and order_type in ('|| l_order_type_list ||')';
4111: sql_stmt := sql_stmt || ' and trunc(nvl(firm_date,new_schedule_date)) between trunc(:l_date1) and trunc(:l_date2) ';
4112: sql_stmt := sql_stmt || ' and nvl(item_type_id, '||c_part_cond_id ||')= '|| c_part_cond_id ;
4113: if l_part_condition is not null then

Line 4117: msc_sda_utils.println('msc_supplies '||sql_stmt);

4113: if l_part_condition is not null then
4114: sql_stmt := sql_stmt||' and nvl(item_type_value, '|| c_part_good ||' )= '|| l_part_condition ;
4115: end if;
4116:
4117: msc_sda_utils.println('msc_supplies '||sql_stmt);
4118: execute immediate sql_stmt using l_date1, l_date2;
4119: elsif (p_from_table in ('msc_demands', 'msc_forecast_updates') ) then
4120: sql_stmt := sql_stmt || ' and origination_type in ('|| l_order_type_list ||')';
4121: sql_stmt := sql_stmt || ' and trunc(nvl(firm_date,using_assembly_demand_date)) between trunc(:l_date1) and trunc(:l_date2) ';