DBA Data[Home] [Help]

APPS.MSC_SDA_PKG dependencies on MSC_DEMANDS

Line 67: --msc_demands table will be populated with following values for global region data

63: c_sdview_items_messages constant varchar2(80) := msc_sda_utils.c_sdview_items_messages;
64: c_sdview_comments_messages constant varchar2(80) := msc_sda_utils.c_sdview_comments_messages;
65: c_sdview_excp_messages constant varchar2(80) := msc_sda_utils.c_sdview_excp_messages;
66:
67: --msc_demands table will be populated with following values for global region data
68: c_global_reg_id constant number := -1;
69: c_global_inst_id constant number := -1;
70: c_global_org_id constant number := -1;
71:

Line 129: c_msc_demands constant number := 2;

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;
133: c_offset_flag constant number := 2;

Line 375: -- msc_demands --old_using_requirement_quantity, old_demand_quantity, original_quantity //pabram..need to check

371: -- pivot row types
372: c_row2_total_fcst constant integer:= 1;
373: -- nvl(manual forecast, net forecast + demand schedule)
374: c_row2_orig_fcst constant integer:= 2;
375: -- msc_demands --old_using_requirement_quantity, old_demand_quantity, original_quantity //pabram..need to check
376: c_row2_consumed_fcst constant integer:= 3;
377: -- msc_forecast_updates.consumed_qty //pabram..need to check
378: c_row2_net_fcst constant integer:= 4;
379: -- msc_demands origination_type 29 //pabram..need to check

Line 379: -- msc_demands origination_type 29 //pabram..need to check

375: -- msc_demands --old_using_requirement_quantity, old_demand_quantity, original_quantity //pabram..need to check
376: c_row2_consumed_fcst constant integer:= 3;
377: -- msc_forecast_updates.consumed_qty //pabram..need to check
378: c_row2_net_fcst constant integer:= 4;
379: -- msc_demands origination_type 29 //pabram..need to check
380: c_row2_over_consmptn constant integer:= 5;
381: -- msc_forecast_updates.overconsumption_qty //pabram..need to check
382: c_row2_manual_fcst constant integer:= 6;
383: -- msc_demands origination_type 63 //pabram..need to check

Line 383: -- msc_demands origination_type 63 //pabram..need to check

379: -- msc_demands origination_type 29 //pabram..need to check
380: c_row2_over_consmptn constant integer:= 5;
381: -- msc_forecast_updates.overconsumption_qty //pabram..need to check
382: c_row2_manual_fcst constant integer:= 6;
383: -- msc_demands origination_type 63 //pabram..need to check
384: c_row2_dmd_schd constant integer:= 7;
385: -- msc_demands origination_type 64 //pabram..need to check
386: c_row2_bestfit_fcst constant integer:= 8;
387: -- msc_demands origination_type 65 //pabram..need to check

Line 385: -- msc_demands origination_type 64 //pabram..need to check

381: -- msc_forecast_updates.overconsumption_qty //pabram..need to check
382: c_row2_manual_fcst constant integer:= 6;
383: -- msc_demands origination_type 63 //pabram..need to check
384: c_row2_dmd_schd constant integer:= 7;
385: -- msc_demands origination_type 64 //pabram..need to check
386: c_row2_bestfit_fcst constant integer:= 8;
387: -- msc_demands origination_type 65 //pabram..need to check
388: c_row2_total_ret_fcst constant integer:= 9;
389: -- nvl(returns manual forecast, returns fcst + returns dmd schedule) //pabram..need to check

Line 387: -- msc_demands origination_type 65 //pabram..need to check

383: -- msc_demands origination_type 63 //pabram..need to check
384: c_row2_dmd_schd constant integer:= 7;
385: -- msc_demands origination_type 64 //pabram..need to check
386: c_row2_bestfit_fcst constant integer:= 8;
387: -- msc_demands origination_type 65 //pabram..need to check
388: c_row2_total_ret_fcst constant integer:= 9;
389: -- nvl(returns manual forecast, returns fcst + returns dmd schedule) //pabram..need to check
390: c_row2_ret_fcst constant integer:= 10;
391: -- msc_supplies order type 81

Line 422: -- demand history ,msc_demands

418: c_drow_returns_hist constant integer := 10;
419:
420: -- pivot row types
421: c_row_dmd_hist constant integer:= 1;
422: -- demand history ,msc_demands
423: c_row_returns_hist constant integer:= 2;
424: -- returns history ,msc_supplies
425: --
426: -- history view ends

Line 1437: msc_demands md,

1433: nvl(least(sum(decode(md.origination_type,
1434: 29,nvl(md.probability,0),
1435: null)) ,1) ,1)) new_quantity
1436: from
1437: msc_demands md,
1438: msc_analysis_query maq,
1439: msc_form_query mfq2, -- item-list
1440: msc_plans mp,
1441: msc_form_query mfq3 --g_plan_bkts_query_id

Line 1608: msc_demands md,

1604: 29,nvl(md.probability,0),
1605: null)) ,1) ,1)) new_quantity,
1606: 0 old_quantity
1607: from
1608: msc_demands md,
1609: msc_analysis_query maq,
1610: msc_form_query mfq1, -- org-list
1611: msc_form_query mfq2, -- item-list
1612: msc_plans mp,

Line 1829: msc_demands md,

1825: 29,nvl(md.probability,0),
1826: null)) ,1) ,1)) new_quantity,
1827: sum(nvl(md.original_quantity, md.using_requirement_quantity)) old_quantity
1828: from
1829: msc_demands md,
1830: msc_analysis_query maq,
1831: msc_form_query mfq1, -- region-to-org-list
1832: msc_form_query mfq2, -- item-list
1833: msc_plans mp,

Line 1861: from msc_demands md2

1857: and (md.organization_id = -1
1858: or (nvl(maq.org_id, c_mbp_null_value) = md.organization_id
1859: and (md.original_demand_id is null
1860: or md.original_demand_id in (select demand_id
1861: from msc_demands md2
1862: where md2.plan_id = g_plan_id
1863: and md2.origination_type = c_dmd2_net_fcst
1864: and md2.organization_id = -1
1865: and md2.inventory_item_id = md.inventory_item_id))

Line 1907: msc_demands md,

1903: 29,nvl(md.probability,0),
1904: null)) ,1) ,1)) new_quantity,
1905: sum(nvl(md.original_quantity, md.using_requirement_quantity)) old_quantity
1906: from
1907: msc_demands md,
1908: msc_analysis_query maq,
1909: msc_form_query mfq1, -- region-to-org-list
1910: msc_form_query mfq2, -- item-list
1911: msc_plans mp,

Line 1939: from msc_demands md2

1935: and ( nvl(maq.org_id,-1) = md.organization_id)
1936: and ( nvl(maq.org_id,-1) = -1
1937: or (md.original_demand_id is null or
1938: md.original_demand_id in (select demand_id
1939: from msc_demands md2
1940: where md2.plan_id = g_plan_id
1941: and md2.origination_type = c_dmd2_net_fcst
1942: and md2.organization_id = -1
1943: and md2.inventory_item_id = md.inventory_item_id)) )

Line 1983: msc_demands md,

1979: 29,nvl(md.probability,0),
1980: null)) ,1) ,1)) new_quantity,
1981: sum(nvl(md.original_quantity, md.using_requirement_quantity)) old_quantity
1982: from
1983: msc_demands md,
1984: msc_analysis_query maq,
1985: msc_form_query mfq1, -- region-to-org-list
1986: msc_form_query mfq2, -- item-list
1987: msc_plans mp,

Line 2015: from msc_demands md2

2011: and ( nvl(maq.region_id, -1) in (-1,c_local_reg_type) )
2012: --and ( nvl(maq.region_id, -1) = c_local_reg_type or (maq.region_id is null and maq.org_id is null) )
2013: and ( (md.original_demand_id is null or
2014: md.original_demand_id not in (select demand_id
2015: from msc_demands md2
2016: where md2.plan_id = g_plan_id
2017: and md2.origination_type = c_dmd2_net_fcst
2018: and md2.organization_id = -1
2019: and md2.inventory_item_id = md.inventory_item_id)) )

Line 2039: msc_demands md,

2035: msc_sda_pkg.getFcstEndDate(mfq3.date2, mp.curr_start_date, mp.curr_cutoff_date, mfu.consumption_date) old_date,
2036: sum(mfu.consumed_qty) new_quantity,
2037: sum(mfu.overconsumption_qty) old_quantity
2038: from
2039: msc_demands md,
2040: msc_analysis_query maq,
2041: msc_form_query mfq1, -- region-to-org-list
2042: msc_form_query mfq2, -- item-list
2043: msc_plans mp,

Line 2072: from msc_demands md2

2068: and (md.organization_id = -1
2069: or (nvl(maq.org_id, c_mbp_null_value) = md.organization_id
2070: and (md.original_demand_id is null
2071: or md.original_demand_id in (select demand_id
2072: from msc_demands md2
2073: where md2.plan_id = g_plan_id
2074: and md2.origination_type = c_dmd2_net_fcst
2075: and md2.organization_id = -1
2076: and md2.inventory_item_id = md.inventory_item_id))

Line 2098: msc_demands md,

2094: msc_sda_pkg.getFcstEndDate(mfq3.date2, mp.curr_start_date, mp.curr_cutoff_date, mfu.consumption_date) old_date,
2095: sum(mfu.consumed_qty) new_quantity,
2096: sum(mfu.overconsumption_qty) old_quantity
2097: from
2098: msc_demands md,
2099: msc_analysis_query maq,
2100: msc_form_query mfq1, -- region-to-org-list
2101: msc_form_query mfq2, -- item-list
2102: msc_plans mp,

Line 2131: from msc_demands md2

2127: and ( nvl(maq.org_id,-1) = md.organization_id)
2128: and ( nvl(maq.org_id,-1) = -1
2129: or (md.original_demand_id is null or
2130: md.original_demand_id in (select demand_id
2131: from msc_demands md2
2132: where md2.plan_id = g_plan_id
2133: and md2.origination_type = c_dmd2_net_fcst
2134: and md2.organization_id = -1
2135: and md2.inventory_item_id = md.inventory_item_id)) )

Line 2155: msc_demands md,

2151: msc_sda_pkg.getFcstEndDate(mfq3.date2, mp.curr_start_date, mp.curr_cutoff_date, mfu.consumption_date) old_date,
2152: sum(mfu.consumed_qty) new_quantity,
2153: sum(mfu.overconsumption_qty) old_quantity
2154: from
2155: msc_demands md,
2156: msc_analysis_query maq,
2157: msc_form_query mfq1, -- region-to-org-list
2158: msc_form_query mfq2, -- item-list
2159: msc_plans mp,

Line 2188: from msc_demands md2

2184: and ( nvl(maq.region_id, -1) in (-1,c_local_reg_type) )
2185: --and ( nvl(maq.region_id, -1) = c_local_reg_type or (maq.region_id is null and maq.org_id is null) )
2186: and ( (md.original_demand_id is null or
2187: md.original_demand_id not in (select demand_id
2188: from msc_demands md2
2189: where md2.plan_id = g_plan_id
2190: and md2.origination_type = c_dmd2_net_fcst
2191: and md2.organization_id = -1
2192: and md2.inventory_item_id = md.inventory_item_id)) )

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

2283: ---------------------------
2284: --- HISTORY VIEW CUSROR ---
2285: ---------------------------
2286:
2287: --engine will not flush demand history and returns history into msc_supplies/msc_demands
2288: --ui needs to look at msd views to get this information
2289: cursor hist_snapshot_cur is
2290: select
2291: maq.row_index,

Line 2376: msc_demands md,

2372: msc_sda_pkg.getHistEndDate(mfq3.date2, l_min_date, l_max_date, md.using_assembly_demand_date) old_date,
2373: sum(md.using_requirement_quantity) new_quantity,
2374: 0 old_quantity
2375: from
2376: msc_demands md,
2377: msc_analysis_query maq,
2378: msc_form_query mfq1, -- region-to-org-list
2379: msc_form_query mfq2, -- item-list
2380: msc_form_query mfq3 -- history calendar

Line 3354: p_from_table := 'msc_demands';

3350: p_order_type_list out nocopy varchar2, p_from_table out nocopy varchar2,
3351: p_part_condition out nocopy number) is
3352: begin
3353: if (p_view_type = c_histview) then --{
3354: p_from_table := 'msc_demands';
3355: if (p_row_offset = c_row_returns_hist) then
3356: p_order_type_list := c_returns_hist;
3357: elsif (p_row_offset = c_row_dmd_hist) then
3358: p_order_type_list := c_dmd_hist;

Line 3365: p_from_table := 'msc_demands';

3361: end if; --}
3362:
3363: if (p_view_type = c_fcstview) then --{
3364: if (p_row_offset = c_row2_total_fcst) then
3365: p_from_table := 'msc_demands';
3366: p_order_type_list := to_char(c_dmd2_manual_fcst) ||','|| to_char(c_dmd2_net_fcst) ||','|| to_char(c_dmd2_dmd_schd);
3367: elsif (p_row_offset = c_row2_orig_fcst) then
3368: p_from_table := 'msc_demands';
3369: p_order_type_list := c_dmd2_net_fcst;

Line 3368: p_from_table := 'msc_demands';

3364: if (p_row_offset = c_row2_total_fcst) then
3365: p_from_table := 'msc_demands';
3366: p_order_type_list := to_char(c_dmd2_manual_fcst) ||','|| to_char(c_dmd2_net_fcst) ||','|| to_char(c_dmd2_dmd_schd);
3367: elsif (p_row_offset = c_row2_orig_fcst) then
3368: p_from_table := 'msc_demands';
3369: p_order_type_list := c_dmd2_net_fcst;
3370: elsif (p_row_offset = c_row2_consumed_fcst) then
3371: p_from_table := 'msc_forecast_updates';
3372: p_order_type_list := null;

Line 3374: p_from_table := 'msc_demands';

3370: elsif (p_row_offset = c_row2_consumed_fcst) then
3371: p_from_table := 'msc_forecast_updates';
3372: p_order_type_list := null;
3373: elsif (p_row_offset = c_row2_net_fcst) then
3374: p_from_table := 'msc_demands';
3375: p_order_type_list := c_dmd2_net_fcst;
3376: elsif (p_row_offset = c_row2_over_consmptn) then
3377: p_from_table := 'msc_forecast_updates';
3378: p_order_type_list := null;

Line 3380: p_from_table := 'msc_demands';

3376: elsif (p_row_offset = c_row2_over_consmptn) then
3377: p_from_table := 'msc_forecast_updates';
3378: p_order_type_list := null;
3379: elsif (p_row_offset = c_row2_manual_fcst) then
3380: p_from_table := 'msc_demands';
3381: p_order_type_list := c_dmd2_manual_fcst;
3382: elsif (p_row_offset = c_row2_dmd_schd) then
3383: p_from_table := 'msc_demands';
3384: p_order_type_list := c_dmd2_dmd_schd;

Line 3383: p_from_table := 'msc_demands';

3379: elsif (p_row_offset = c_row2_manual_fcst) then
3380: p_from_table := 'msc_demands';
3381: p_order_type_list := c_dmd2_manual_fcst;
3382: elsif (p_row_offset = c_row2_dmd_schd) then
3383: p_from_table := 'msc_demands';
3384: p_order_type_list := c_dmd2_dmd_schd;
3385: elsif (p_row_offset = c_row2_bestfit_fcst) then
3386: p_from_table := 'msc_demands';
3387: p_order_type_list := c_dmd2_bestfit_fcst;

Line 3386: p_from_table := 'msc_demands';

3382: elsif (p_row_offset = c_row2_dmd_schd) then
3383: p_from_table := 'msc_demands';
3384: p_order_type_list := c_dmd2_dmd_schd;
3385: elsif (p_row_offset = c_row2_bestfit_fcst) then
3386: p_from_table := 'msc_demands';
3387: p_order_type_list := c_dmd2_bestfit_fcst;
3388: elsif (p_row_offset = c_row2_total_ret_fcst) then
3389: p_from_table := 'msc_supplies';
3390: p_order_type_list := to_char(c_sup2_rtns_manual_fcst) ||','|| to_char(c_sup2_rtns_fcst) ||','|| to_char(c_sup2_rtns_dmd_schd);

Line 3404: p_from_table := 'msc_demands';

3400: elsif (p_row_offset = c_row2_ret_bestfit_fcst) then
3401: p_from_table := 'msc_supplies';
3402: p_order_type_list := c_sup2_rtns_bestfit_fcst;
3403: elsif (p_row_offset = c_row2_usage_fcst) then
3404: p_from_table := 'msc_demands';
3405: p_order_type_list := c_dmd2_usage_fcst;
3406: elsif (p_row_offset = c_row2_popultn_fcst) then
3407: p_from_table := 'msc_demands';
3408: p_order_type_list := c_dmd2_popu_fcst;

Line 3407: p_from_table := 'msc_demands';

3403: elsif (p_row_offset = c_row2_usage_fcst) then
3404: p_from_table := 'msc_demands';
3405: p_order_type_list := c_dmd2_usage_fcst;
3406: elsif (p_row_offset = c_row2_popultn_fcst) then
3407: p_from_table := 'msc_demands';
3408: p_order_type_list := c_dmd2_popu_fcst;
3409: elsif (p_row_offset = c_row2_type_16) then
3410: p_from_table := 'msc_demands';
3411: p_order_type_list := c_dmd2_popu_fcst;

Line 3410: p_from_table := 'msc_demands';

3406: elsif (p_row_offset = c_row2_popultn_fcst) then
3407: p_from_table := 'msc_demands';
3408: p_order_type_list := c_dmd2_popu_fcst;
3409: elsif (p_row_offset = c_row2_type_16) then
3410: p_from_table := 'msc_demands';
3411: p_order_type_list := c_dmd2_popu_fcst;
3412: end if;
3413: return;
3414: end if; --}

Line 3418: p_from_table := 'msc_demands';

3414: end if; --}
3415:
3416: if (p_view_type = c_sdview) then --{
3417: if (p_row_offset = c_row_net_fcst) then --1;
3418: p_from_table := 'msc_demands';
3419: p_order_type_list := c_dmd_fcst;
3420: elsif (p_row_offset = c_row_so) then --2;
3421: p_from_table := 'msc_demands';
3422: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);

Line 3421: p_from_table := 'msc_demands';

3417: if (p_row_offset = c_row_net_fcst) then --1;
3418: p_from_table := 'msc_demands';
3419: p_order_type_list := c_dmd_fcst;
3420: elsif (p_row_offset = c_row_so) then --2;
3421: p_from_table := 'msc_demands';
3422: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);
3423: elsif (p_row_offset = c_row_iso_field_org) then --3;
3424: p_from_table := 'msc_demands';
3425: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);

Line 3424: p_from_table := 'msc_demands';

3420: elsif (p_row_offset = c_row_so) then --2;
3421: p_from_table := 'msc_demands';
3422: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);
3423: elsif (p_row_offset = c_row_iso_field_org) then --3;
3424: p_from_table := 'msc_demands';
3425: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);
3426: elsif (p_row_offset = c_row_indepndt_dmd) then --4;
3427: p_from_table := 'msc_demands';
3428: p_order_type_list := to_char(c_dmd_fcst) ||', '|| to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);

Line 3427: p_from_table := 'msc_demands';

3423: elsif (p_row_offset = c_row_iso_field_org) then --3;
3424: p_from_table := 'msc_demands';
3425: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);
3426: elsif (p_row_offset = c_row_indepndt_dmd) then --4;
3427: p_from_table := 'msc_demands';
3428: p_order_type_list := to_char(c_dmd_fcst) ||', '|| to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);
3429: elsif (p_row_offset = c_row_iso) then --5;
3430: p_from_table := 'msc_demands';
3431: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);

Line 3430: p_from_table := 'msc_demands';

3426: elsif (p_row_offset = c_row_indepndt_dmd) then --4;
3427: p_from_table := 'msc_demands';
3428: p_order_type_list := to_char(c_dmd_fcst) ||', '|| to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);
3429: elsif (p_row_offset = c_row_iso) then --5;
3430: p_from_table := 'msc_demands';
3431: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);
3432: elsif (p_row_offset = c_row_pod) then --6;
3433: p_from_table := 'msc_demands';
3434: p_order_type_list := c_dmd_pod;

Line 3433: p_from_table := 'msc_demands';

3429: elsif (p_row_offset = c_row_iso) then --5;
3430: p_from_table := 'msc_demands';
3431: p_order_type_list := to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds);
3432: elsif (p_row_offset = c_row_pod) then --6;
3433: p_from_table := 'msc_demands';
3434: p_order_type_list := c_dmd_pod;
3435: elsif (p_row_offset = c_row_dependnt_dmd) then --7;
3436: p_from_table := 'msc_demands';
3437: p_order_type_list := to_char(c_dmd_pod);

Line 3436: p_from_table := 'msc_demands';

3432: elsif (p_row_offset = c_row_pod) then --6;
3433: p_from_table := 'msc_demands';
3434: p_order_type_list := c_dmd_pod;
3435: elsif (p_row_offset = c_row_dependnt_dmd) then --7;
3436: p_from_table := 'msc_demands';
3437: p_order_type_list := to_char(c_dmd_pod);
3438: elsif (p_row_offset = c_row_other_dmd) then --8;
3439: p_from_table := 'msc_demands';
3440: p_order_type_list := to_char(c_dmd_mps) ||', '|| to_char(c_dmd_manual_mds);

Line 3439: p_from_table := 'msc_demands';

3435: elsif (p_row_offset = c_row_dependnt_dmd) then --7;
3436: p_from_table := 'msc_demands';
3437: p_order_type_list := to_char(c_dmd_pod);
3438: elsif (p_row_offset = c_row_other_dmd) then --8;
3439: p_from_table := 'msc_demands';
3440: p_order_type_list := to_char(c_dmd_mps) ||', '|| to_char(c_dmd_manual_mds);
3441: elsif (p_row_offset = c_row_total_dmd) then --9;
3442: p_from_table := 'msc_demands';
3443: p_order_type_list := to_char(c_dmd_fcst) ||', '|| to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds)

Line 3442: p_from_table := 'msc_demands';

3438: elsif (p_row_offset = c_row_other_dmd) then --8;
3439: p_from_table := 'msc_demands';
3440: p_order_type_list := to_char(c_dmd_mps) ||', '|| to_char(c_dmd_manual_mds);
3441: elsif (p_row_offset = c_row_total_dmd) then --9;
3442: p_from_table := 'msc_demands';
3443: p_order_type_list := to_char(c_dmd_fcst) ||', '|| to_char(c_dmd_so) ||', '|| to_char(c_dmd_so_mds)
3444: ||', '|| to_char(c_dmd_pod)
3445: ||', '|| to_char(c_dmd_mps) ||', '|| to_char(c_dmd_manual_mds);
3446: elsif (p_row_offset = c_row_onhand) then --10;

Line 3509: p_from_table := 'msc_demands';

3505: elsif (p_row_offset = c_row_ss_level) then --28;
3506: p_from_table := null;
3507: p_order_type_list := '-1';
3508: elsif (p_row_offset = c_row_target_level) then --29;
3509: p_from_table := 'msc_demands';
3510: p_order_type_list := c_dmd_fcst;
3511: p_part_condition := c_part_good;
3512: elsif (p_row_offset = c_row_max_level) then --30;
3513: p_from_table := null;

Line 3524: p_from_table := 'msc_demands';

3520: p_from_table := 'msc_orders_v';
3521: p_order_type_list := c_mbp_null_value;
3522: p_part_condition := c_part_good;
3523: elsif (p_row_offset = c_row_defc_iso) then --33;
3524: p_from_table := 'msc_demands';
3525: p_order_type_list := c_dmd_defc_iso;
3526: p_part_condition := c_part_bad;
3527: elsif (p_row_offset = c_row_plnd_defc_pod) then --34;
3528: p_from_table := 'msc_demands';

Line 3528: p_from_table := 'msc_demands';

3524: p_from_table := 'msc_demands';
3525: p_order_type_list := c_dmd_defc_iso;
3526: p_part_condition := c_part_bad;
3527: elsif (p_row_offset = c_row_plnd_defc_pod) then --34;
3528: p_from_table := 'msc_demands';
3529: p_order_type_list := c_dmd_defc_pod;
3530: p_part_condition := c_part_bad;
3531: elsif (p_row_offset = c_row_defc_part_dmd) then --35;
3532: p_from_table := 'msc_demands';

Line 3532: p_from_table := 'msc_demands';

3528: p_from_table := 'msc_demands';
3529: p_order_type_list := c_dmd_defc_pod;
3530: p_part_condition := c_part_bad;
3531: elsif (p_row_offset = c_row_defc_part_dmd) then --35;
3532: p_from_table := 'msc_demands';
3533: p_order_type_list := to_char(c_dmd_defc_part_dmd)||','||to_char(c_dmd_defc_plnd_part_dmd);
3534: p_part_condition := c_part_bad;
3535: elsif (p_row_offset = c_row_total_defc_part_dmd) then --36;
3536: p_from_table := 'msc_demands';

Line 3536: p_from_table := 'msc_demands';

3532: p_from_table := 'msc_demands';
3533: p_order_type_list := to_char(c_dmd_defc_part_dmd)||','||to_char(c_dmd_defc_plnd_part_dmd);
3534: p_part_condition := c_part_bad;
3535: elsif (p_row_offset = c_row_total_defc_part_dmd) then --36;
3536: p_from_table := 'msc_demands';
3537: p_order_type_list := to_char(c_dmd_defc_part_dmd)||','||to_char(c_dmd_defc_plnd_part_dmd);
3538: p_part_condition := c_part_bad;
3539: elsif (p_row_offset = c_row_defc_onhand) then --37;
3540: p_from_table := 'msc_supplies';

Line 3648: elsif (p_from_table in ('msc_demands', 'msc_forecast_updates') ) then

3644: ' select distinct '|| p_mfq_id ||', sysdate, 1, sysdate, 1, ';
3645:
3646: if (p_from_table = 'msc_supplies') then
3647: sql_stmt := sql_stmt || ' transaction_id from '|| p_from_table;
3648: elsif (p_from_table in ('msc_demands', 'msc_forecast_updates') ) then
3649: sql_stmt := sql_stmt || ' demand_id from '|| p_from_table;
3650: elsif (p_from_table = 'msc_orders_v') then
3651: sql_stmt := sql_stmt || ' transaction_id from '|| p_from_table;
3652: end if;

Line 3677: elsif (p_from_table in ('msc_demands', 'msc_forecast_updates') ) then

3673: ||' and nvl(item_type_value, '|| c_part_good ||' )= '|| l_part_condition ;
3674:
3675: msc_sda_utils.println('msc_supplies '||sql_stmt);
3676: execute immediate sql_stmt using l_date1, l_date2;
3677: elsif (p_from_table in ('msc_demands', 'msc_forecast_updates') ) then
3678: sql_stmt := sql_stmt || ' and origination_type in ('|| l_order_type_list ||')';
3679: sql_stmt := sql_stmt || ' and trunc(using_assembly_demand_date) between trunc(:l_date1) and trunc(:l_date2) ';
3680: sql_stmt := sql_stmt || ' and nvl(item_type_id, '||c_part_cond_id ||')= '|| c_part_cond_id
3681: ||' and nvl(item_type_value, '|| c_part_good ||' )= '|| l_part_condition ;

Line 3693: msc_sda_utils.println('msc_demands, msc_forecast_updates '||sql_stmt);

3689: sql_stmt := sql_stmt || ' and disposition_id is not null ';
3690: end if;
3691: end if;
3692:
3693: msc_sda_utils.println('msc_demands, msc_forecast_updates '||sql_stmt);
3694: execute immediate sql_stmt using l_date1, l_date2;
3695: elsif (p_from_table = 'msc_orders_v') then
3696: sql_stmt := sql_stmt || ' and nvl(item_type_id, '||c_part_cond_id ||')= '|| c_part_cond_id
3697: ||' and nvl(item_type_value, '|| c_part_good ||' )= '|| l_part_condition ;