DBA Data[Home] [Help]

APPS.MSC_GET_NAME SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 15

	  select distinct project_number
          into  var_project_num
	  from  msc_projects
	  where project_id = arg_project_id
          and   plan_id = -1
          and   sr_instance_id=arg_instance_id
          and   rownum = 1;
Line: 23

	  select project_number
          into  var_project_num
	  from	msc_projects
	  where project_id = arg_project_id
          and   plan_id = -1
          and   sr_instance_id=arg_instance_id
          and   organization_id = arg_org_id;
Line: 47

	  select distinct task_number
          into var_task_num
	  from msc_project_tasks
	  where	task_id = arg_task_id
          and plan_id = -1
          and sr_instance_id=arg_instance_id
          and rownum = 1;
Line: 55

	  select task_number
          into var_task_num
	  from msc_project_tasks
	  where	project_id = arg_project_id
          and task_id = arg_task_id
          and plan_id = -1
          and sr_instance_id=arg_instance_id
          and organization_id = arg_org_id;
Line: 90

 select preference
 into var_process_priority
 from  msc_process_effectivity
 where plan_id = arg_plan_id
 and process_sequence_id = arg_process_sequence_id
 and sr_instance_id = arg_sr_instance_id
 and organization_id = arg_organization_id
 and item_id = arg_inventory_item_id;
Line: 119

	select	DISTINCT planning_group
	into	var_plng_grp
	from	msc_projects
	where 	project_id = arg_project_id
        and     plan_id = -1
        and     sr_instance_id=arg_instance_id
        and     organization_id = arg_org_id;
Line: 140

	select	md.using_assembly_demand_date
        into    var_date
	from	msc_demands md,
                msc_full_pegging mfp
	where 	mfp.pegging_id = arg_pegging_id
        and     mfp.plan_id=arg_plan_id
        and     md.demand_id = mfp.demand_id
        and     md.plan_id = mfp.plan_id;
Line: 170

     select resource_over_util_cost
     into v_resource_over_util_cost
     from msc_department_resources
     where department_id = arg_department_id
     and resource_id = arg_resource_id
     and organization_id = arg_org_id
     and sr_instance_id = arg_instance_id
     and plan_id = arg_plan_id;
Line: 196

	select	ms.new_schedule_date
        into    var_date
	from	msc_supplies ms,
                msc_full_pegging mfp
	where 	ms.transaction_id = mfp.transaction_id
        and     ms.plan_id=mfp.plan_id
        and     mfp.pegging_id = arg_pegging_id
        and     mfp.plan_id = arg_plan_id;
Line: 217

   select meaning
   into meaning_text
   from mfg_lookups
   where lookup_type = arg_lookup_type
     and lookup_code = arg_lookup_code;
Line: 223

   select lv.meaning
   into meaning_text
   from fnd_lookup_values lv
   where lv.language = userenv('LANG')
   and   lv.view_application_id =700
   and   lv.lookup_type = arg_lookup_type
   and   lv.lookup_code = to_char(arg_lookup_code)
   and   lv.security_group_id =
(select max(SECURITY_GROUP_ID)
               from FND_LOOKUP_TYPES LT
               where LT.VIEW_APPLICATION_ID = LV.VIEW_APPLICATION_ID
               and LT.LOOKUP_TYPE = LV.LOOKUP_TYPE
               and LT.SECURITY_GROUP_ID in (0,
                     to_number(decode(substr(userenv('CLIENT_INFO'),55,1),
                                      ' ', '0',
                                      null, '0',
                                      substr(userenv('CLIENT_INFO'),55,10)))));
Line: 256

   select meaning
   from mfg_lookups
   where lookup_type = p_lookup_type
     and lookup_code = p_lookup_code;
Line: 299

select meaning from fnd_lookups
 where lookup_type = l_arg_lookup_type
   and lookup_code = l_arg_lookup_code;
Line: 320

     select  location_code
     into    loc_code
     from    msc_location_associations
     where   location_id = arg_location_id
     and     sr_instance_id = arg_instance_id;
Line: 326

     select location
     into loc_code
     from  msc_trading_partner_sites s
     where s.sr_tp_id = arg_org_id
     and   s.sr_instance_id = arg_instance_id;
Line: 351

   select organization_code
   into org_text
   from msc_trading_partners
   where partner_type=3
   and sr_tp_id=arg_org_id
   and sr_instance_id = arg_instance_id;
Line: 366

	SELECT ORGANIZATION_CODE
	FROM msc_trading_partners
	WHERE SR_TP_ID  = P_ORG_ID
	AND SR_INSTANCE_ID = P_INST_ID
	AND PARTNER_TYPE= 3;
Line: 400

   select instance_code
   into instance_text
   from msc_apps_instances
   where instance_id = arg_instance_id;
Line: 422

select order_number
  from msc_supplies
  where disposition_id in
      (select disposition_id
       from msc_demands
       where plan_id = arg_plan_id
       and demand_id =  arg_disp_id)
  and sr_instance_id = arg_instance_id
  and plan_id = arg_plan_id
  and organization_id = arg_org_id
  and order_type in (1,2,8,11,12);
Line: 435

  select wip_entity_name
  from msc_supplies
  where disposition_id in
      (select disposition_id
       from msc_demands
       where plan_id = arg_plan_id
       and demand_id =  arg_disp_id)
  and sr_instance_id = arg_instance_id
  and plan_id = arg_plan_id
  and organization_id = arg_org_id
  and order_type in (3,7,14,15,27,28);
Line: 448

  select desig.designator
  from msc_designators desig,
       msc_demands mgr
  where desig.designator_id = mgr.schedule_designator_id
    and mgr.demand_id = arg_disp_id
    and mgr.sr_instance_id = arg_instance_id
    and mgr.plan_id = arg_plan_id
    and mgr.organization_id = arg_org_id;
Line: 512

    select order_number, order_type
    into order_num, v_type
    from msc_supplies
    where transaction_id = arg_transaction_id
    and plan_id = arg_plan_id;
Line: 518

    select order_number, order_type
    into order_num, v_type
    from msc_supplies
    where transaction_id = arg_transaction_id
    and plan_id = arg_plan_id
    and sr_instance_id = arg_sr_instance_id;
Line: 552

  select lookup_meaning('MRP_ORDER_TYPE', order_type)
  into v_order_type
  from msc_supplies
  where transaction_id = arg_transaction_id
  and plan_id = arg_plan_id;
Line: 574

  select order_type
  into v_order_type
  from msc_supplies
  where transaction_id = arg_transaction_id
  and plan_id = arg_plan_id
  and sr_instance_id = arg_instance_id;
Line: 592

   SELECT description
     FROM msc_system_items
    WHERE inventory_item_id = arg_item_id
      AND plan_id = arg_plan_id
      AND sr_instance_id = arg_instance_id;
Line: 606

    select description
    into item_description
    from msc_system_items
    where inventory_item_id = arg_item_id
    and   plan_id = arg_plan_id
    and   organization_id = arg_org_id
    and   sr_instance_id = arg_instance_id;
Line: 658

    select distinct department_code
    into   v_department_code
    from   msc_department_resources
    where department_id = arg_dept_id
    and   plan_id = arg_plan_id
    and   sr_instance_id = arg_instance_id
    and   line_flag = arg_line_flag;
Line: 668

    select distinct department_code
    into   v_department_code
    from   msc_department_resources
    where department_id = arg_dept_id
    and   plan_id = arg_plan_id
    and   organization_id = arg_org_id
    and   sr_instance_id = arg_instance_id
    and   line_flag = arg_line_flag;
Line: 693

    select mdr.resource_code
    into   v_resource_code
    from   msc_department_resources mdr,
           msc_resource_requirements mrr
    where mdr.department_id = mrr.department_id
    and   mdr.resource_id = arg_resource_id
    and   mdr.plan_id = mrr.plan_id
    and   mdr.organization_id = mrr.organization_id
    and   mdr.sr_instance_id = mrr.sr_instance_id
    and   mrr.plan_id = arg_plan_id
    and   mrr.sr_instance_id = arg_instance_id
    and   mrr.transaction_id = arg_org_id;
Line: 717

    select resource_code
    into   v_resource_code
    from   msc_department_resources
    where department_id = arg_dept_id
    and   resource_id = arg_resource_id
    and   plan_id = arg_plan_id
    and   organization_id = arg_org_id
    and   sr_instance_id = arg_instance_id;
Line: 746

    select utilization
    into   util_pct
    from   msc_department_resources
    where department_id = arg_dept_id
    and   resource_id = arg_resource_id
    and   plan_id = arg_plan_id
    and   organization_id = arg_org_id
    and   sr_instance_id = arg_instance_id;
Line: 781

  select resource_type
  into   v_resource_type
  from   msc_department_resources
  where department_id = arg_dept_id
  and   resource_id = arg_resource_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 814

  select department_code || '/' || resource_code
  into   v_dept_resource_code
  from   msc_department_resources
  where department_id = arg_dept_id
  and   resource_id = arg_resource_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 836

  select nvl(Batchable_flag,2)
  from   msc_department_resources
  where department_id = arg_dept_id
  and   resource_id = arg_resource_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 879

  select decode(min_capacity,0,null, min_capacity)
  into   v_res_min_capacity
  from   msc_department_resources
  where department_id = arg_dept_id
  and   resource_id = arg_resource_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 915

  select assigned_units
  into v_assigned_units
  from msc_resource_requirements
  where department_id = arg_dept_id
  and   resource_id = arg_resource_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id
  and   supply_id = arg_supply_id
  and   batch_number = arg_batch_number
  and   parent_id = 2
  and   rownum = 1;
Line: 928

  select decode(max_capacity,0 , null,max_capacity)
  into   v_res_max_capacity
  from   msc_department_resources
  where department_id = arg_dept_id
  and   resource_id = arg_resource_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 949

  select sales_order_number
  from msc_demands
  where demand_id = arg_demand_id;
Line: 974

    select from_organization_id
    into   l_org_id
    from   msc_interorg_ship_methods
    where  transaction_id = arg_transaction_id
    and    plan_id  = arg_plan_id;
Line: 992

    select to_organization_id
    into   l_org_id
    from   msc_interorg_ship_methods
    where  transaction_id = arg_transaction_id
    and    plan_id  = arg_plan_id;
Line: 1010

    select from_organization_id
    into   l_org_id
    from   msc_interorg_ship_methods
    where  transaction_id = arg_transaction_id
    and    plan_id  = arg_plan_id;
Line: 1028

    select to_organization_id
    into   l_org_id
    from   msc_interorg_ship_methods
    where  transaction_id = arg_transaction_id
    and    plan_id  = arg_plan_id;
Line: 1046

    select ship_method
    into   l_ship_method
    from   msc_interorg_ship_methods
    where  transaction_id = arg_transaction_id
    and    plan_id  = arg_plan_id;
Line: 1068

    select item_name
    into v_item_name
    from msc_items
    where inventory_item_id = arg_item_id;
Line: 1075

  select item_name
  into v_item_name
  from msc_system_items
  where inventory_item_id = arg_item_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 1085

    select item_name
    into v_item_name
    from msc_items
    where inventory_item_id = arg_item_id;
Line: 1096

    select ITEM_NAME
	from MSC_SYSTEM_ITEMS
	WHERE INVENTORY_ITEM_ID = P_INV_ITEM_ID
	AND PLAN_ID =-1;
Line: 1123

  select planner_code
  into v_planner_code
  from msc_system_items
  where inventory_item_id = arg_item_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 1144

   select partner_name
   into supplier_name
   from msc_trading_partners
   where partner_type=1
   and partner_id=arg_supplier_id;
Line: 1161

   select tp_site_code
   into supplier_site
   from msc_trading_partner_sites
   where partner_site_id=arg_supplier_site_id;
Line: 1177

   select partner_name
   into customer_name
   from msc_trading_partners
   where partner_type=2
   and partner_id=arg_customer_id;
Line: 1194

   select location
   into customer_site
   from msc_trading_partner_sites
   where partner_site_id=arg_customer_site_id;
Line: 1210

   select PARTNER_ADDRESS
   into customer_address
   from msc_trading_partner_sites
   where partner_site_id=arg_customer_site_id;
Line: 1243

  SELECT NVL(orders_release_configs,'N'),
	NVL(orders_release_phantoms,'N')
  FROM msc_workbench_display_options
  WHERE user_id = fnd_global.user_id;
Line: 1250

     select ms.disposition_status_type,
            msc_get_name.action('MSC_SUPPLIES', msi.bom_item_type,
                msi.base_item_id, msi.wip_supply_type, ms.order_type,
                DECODE(ms.firm_planned_type,1,1,ms.reschedule_flag),
                ms.disposition_status_type,
                ms.new_schedule_date, ms.old_schedule_date,
                ms.implemented_quantity, ms.quantity_in_process,
                ms.new_order_quantity,
                msi.release_time_fence_code, ms.reschedule_days,
                ms.firm_quantity,ms.plan_id,
                msi.critical_component_flag, msi.mrp_planning_code,
                msi.lots_exist)
       from msc_supplies ms,
            msc_system_items msi
       where ms.plan_id = p_plan_id
         and ms.transaction_id = p_tran_id
         and ms.sr_instance_id = p_inst_id
         and ms.plan_id = msi.plan_id
         and ms.sr_instance_id = msi.sr_instance_id
         and ms.organization_id = msi.organization_id
         and ms.inventory_item_id  = msi.inventory_item_id ;
Line: 1274

     select 1
       from msc_exception_details med,
            msc_demands md
       where med.plan_id = md.plan_id
         and med.organization_id = md.organization_id
         and med.sr_instance_id = md.sr_instance_id
         and med.inventory_item_id = md.inventory_item_id
         and med.number1 = md.demand_id
         and med.exception_type in (70,71)
         and md.plan_id = p_plan_id
         and md.demand_id = p_demand_id
         and (nvl(md.source_organization_id, -1) < 0 or -- can not release ISO
               (md.source_organization_id >0 and
                md.source_org_instance_id <> md.sr_instance_id));
Line: 1290

  select plan_type
  from   msc_plans
  where  plan_id = p_plan_id;
Line: 1303

  select bucket_index
    from msc_plan_buckets mpb,
         msc_plans mp
   where mp.plan_id = arg_plan_id
     and mp.plan_id = mpb.plan_id
     and mp.organization_id = mpb.organization_id
     and mp.sr_instance_id = mpb.sr_instance_id
     and p_date between mpb.bkt_start_date and mpb.bkt_end_date;
Line: 1565

  SELECT cfm_routing_flag
  FROM msc_routings
  WHERE plan_id = p_plan_id
    AND sr_instance_id = p_instance_id
    AND organization_id = p_org_id
    AND assembly_item_id  = p_item_id
    AND alternate_routing_designator = p_alt_rtg_desig;
Line: 1574

  SELECT cfm_routing_flag
  FROM msc_routings
  WHERE plan_id = p_plan_id
    AND sr_instance_id = p_instance_id
    AND organization_id = p_org_id
    AND assembly_item_id  = p_item_id
    AND alternate_routing_designator IS NULL;
Line: 1605

  SELECT alternate_bom_designator
  FROM msc_boms
  WHERE plan_id = p_plan_id
    AND sr_instance_id = p_instance_id
    AND bill_sequence_id = p_seq_id;
Line: 1632

  SELECT alternate_routing_designator
  FROM msc_routings
  WHERE plan_id = p_plan_id
    AND sr_instance_id = p_instance_id
    AND routing_sequence_id = p_seq_id;
Line: 1660

  SELECT cfm_routing_flag
  FROM msc_routings
  WHERE plan_id = p_plan_id
    AND sr_instance_id = p_instance_id
    AND routing_sequence_id = p_seq_id;
Line: 1690

  SELECT designator, forecast_set_id
  FROM msc_designators
  WHERE designator_id = v_desig_id;
Line: 1695

  SELECT designator
  FROM msc_designators
  WHERE forecast_set_id = p_fcst_set_id
  and designator_id = p_desig_id;
Line: 1707

  select 1
  from msc_designators desig,
       msc_plan_schedules sch
  where desig.designator_id = p_desig_id
  and   desig.designator_type = 6
  and   sch.plan_id=p_plan_id
  and   sch.input_schedule_id = desig.forecast_set_id;
Line: 1783

  SELECT designator_type
  FROM msc_plan_schedules
  WHERE plan_id = p_plan_id
  AND organization_id = -1
  AND sr_instance_id = p_instance_id
  AND input_schedule_id = p_desig_id;
Line: 1791

  SELECT designator_type
  FROM msc_plan_schedules
  WHERE plan_id = p_plan_id
  AND organization_id = p_organization_id
  AND sr_instance_id = p_instance_id
  AND input_schedule_id = p_desig_id;
Line: 1799

  SELECT designator_type
  FROM msc_plan_schedules
  WHERE organization_id = p_organization_id
  AND sr_instance_id = p_instance_id
  AND input_schedule_id = p_desig_id;
Line: 1806

  SELECT designator
  FROM msc_designators
  WHERE designator_id = p_desig_id;
Line: 1811

  SELECT scenario_name
  FROM msd_dp_ascp_scenarios_v
  WHERE scenario_id = p_desig_id
 -- AND organization_id = p_organization_id
  -- AND sr_instance_id = p_instance_id; for bug 6040537
Line: 1823

  SELECT count(*)
  FROM msc_plan_schedules
  WHERE plan_id = p_plan_id
  AND organization_id = p_organization_id
  AND sr_instance_id = p_instance_id
  AND input_schedule_id = p_desig_id;
Line: 1882

  SELECT designator_type
  FROM msc_plan_schedules
  WHERE plan_id = p_plan_id
  AND organization_id = p_organization_id
  AND sr_instance_id = p_instance_id
  AND input_schedule_id = p_desig_id;
Line: 1890

  SELECT designator
  FROM msc_designators
  WHERE designator_id = (SELECT NVL(forecast_set_id,p_desig_id)
                         FROM msc_designators
                         WHERE designator_id = p_desig_id
                         AND designator_type = 6);
Line: 1898

  SELECT scenario_name
  FROM msd_dp_ascp_scenarios_v
  WHERE scenario_id = p_desig_id
 -- AND organization_id = p_organization_id
 -- AND sr_instance_id = p_instance_id; -- for bug 6040537
Line: 1941

  SELECT wip_status_code
  FROM msc_supplies
  WHERE plan_id = -1
   and transaction_id = p_transaction_id;
Line: 1960

  SELECT order_priority
  FROM msc_demands
  WHERE plan_id = p_plan_id
   and demand_id = p_demand_id;
Line: 1980

  SELECT unit_of_measure
  FROM msc_department_resources
  WHERE plan_id > -1
   and  organization_id = p_organization_id
   and  department_id   = p_department_id
   and  resource_id     = p_resource_id;
Line: 2001

  SELECT compile_designator
  FROM msc_plans
  WHERE plan_id = p_plan_id;
Line: 2026

    SELECT next_seq_num
    FROM   msc_calendar_dates
    WHERE  calendar_code = calendar_code
    AND    exception_set_id = exc_set_id
    AND    sr_instance_id = p_inst_id
    AND    calendar_date = p_date;
Line: 2034

    SELECT prior_seq_num
    FROM   msc_calendar_dates
    WHERE  calendar_code = calendar_code
    AND    exception_set_id = exc_set_id
    AND    sr_instance_id = p_inst_id
    AND    calendar_date = p_date;
Line: 2045

  SELECT calendar_code, calendar_exception_set_id
  INTO   calendar_code, exc_set_id
  FROM   msc_trading_partners
  WHERE  sr_tp_id = p_org_id
    AND  sr_instance_id = p_inst_id
    AND  partner_type = 3;
Line: 2076

  SELECT group_id
  FROM   msc_demands
  WHERE  plan_id = p_plan_id
  AND    sr_instance_id = p_inst_id
  AND    demand_id = p_demand_id;
Line: 2087

  SELECT sum(using_requirement_quantity)
  FROM   msc_demands
  WHERE  plan_id = p_plan_id
  and    sr_instance_id = p_inst_id
  and    group_id = l_group_id;
Line: 2115

   SELECT NVL(dem.order_number,
   decode(dem.origination_type,1, to_char(dem.disposition_id),
     3, msc_get_name.job_name(dem.disposition_id, dem.plan_id, dem.sr_instance_id),
      22, to_char(dem.disposition_id),
      29,decode(dem.plan_id, -11,   msc_get_name.designator(dem.schedule_designator_id) ,
                       decode(msi.in_source_plan,1,msc_get_name.designator(dem.schedule_designator_id,
                                                                                                                                    dem.forecast_set_id ),
	msc_get_name.scenario_designator(dem.forecast_set_id,	dem.plan_id, dem.organization_id, dem.sr_instance_id)
	|| decode(msc_get_name.designator(dem.schedule_designator_id,dem.forecast_set_id ), null, null,  '/'||msc_get_name.designator(dem.schedule_designator_id,dem.forecast_set_id )))),
   msc_get_name.designator(dem.schedule_designator_id))) order_number
   from msc_demands dem, msc_system_items msi
   where dem.plan_id = p_plan_id
   and dem.sr_instance_id = p_inst_id
   and dem.demand_id = p_demand_id
   AND dem.plan_id = msi.plan_id
   AND dem.sr_instance_id = msi.sr_instance_id
   AND dem.ORGANIZATION_ID = msi.ORGANIZATION_ID
  AND dem.INVENTORY_ITEM_ID = msi.INVENTORY_ITEM_ID ;
Line: 2135

  select sales_order_number
  from msc_sales_orders
  where sr_instance_id = p_inst_id
  and demand_id = p_demand_id;
Line: 2165

SELECT abc_class_id
 FROM msc_abc_classes
 WHERE organization_id =  lp_org_id
 AND sr_instance_id =   lp_inst_id
 ;
Line: 2184

     select d.demand_class
     from msc_designators d
     where NVL(D.DESIGNATOR_TYPE,3) IN (2, 3, 4,5,-99)
     AND D.SR_INSTANCE_ID = p_inst_id
     AND D.ORGANIZATION_ID = p_org_id
     AND D.DESIGNATOR = p_plan ;
Line: 2206

  select msr.meaning
  from msc_scheduling_rules msr
  where msr.rule_id = p_RULE_ID
  and nvl(msr.enabled_flag, 'Y') = 'Y';
Line: 2230

   select distinct mro.operation_seq_num
   from msc_operation_components moc,
     msc_routing_operations mro, msc_bom_components assy
   where moc.plan_id(+)= -1
     and moc.component_sequence_id(+)= assy.component_sequence_id
     and moc.sr_instance_id(+)= assy.sr_instance_id
     and moc.bill_sequence_id(+)= assy.bill_sequence_id
     and moc.plan_id=mro.plan_id(+)
     and moc.operation_sequence_id = mro.operation_sequence_id(+)
     and moc.sr_instance_id = mro.sr_instance_id(+)
     and moc.routing_sequence_id = mro.routing_sequence_id(+)
     and assy.plan_id = p_plan_id
     and assy.sr_instance_id = p_inst_id
     and assy.organization_id = p_org_id
     and assy.component_sequence_id = p_comp_seq_id
     and assy.bill_sequence_id = p_bill_seq_id ;
Line: 2270

  select decode(safety_stock_code,
        1,'Non-MRP Planned Percent',
        2,'MRP Planned Percent',null)
  from msc_system_items
  where plan_id = p_plan_id
  and sr_instancE_id = p_inst_id
  and organization_id = p_org_id
  and inventory_item_id = p_item_id;
Line: 2293

   select nvl(order_number,
              decode(origination_type,
                1,to_char(disposition_id),
               29, msc_get_name.scenario_designator(
                     forecast_set_id,plan_id,organization_id,sr_instance_id),
               msc_get_name.designator(schedule_designator_id)
                    )
               )
     from msc_demands
    where plan_id = p_plan_id
      and demand_id = p_demand_id;
Line: 2324

  select 1
  from msc_designators desig,
       msc_plan_schedules sch
  where desig.designator_id = p_schedule_desig_id
  and   desig.designator_type = 6
  and   sch.plan_id=p_plan_id
  and   sch.input_schedule_id = desig.forecast_set_id;
Line: 2333

  select 1
  from msc_designators desig
  where desig.designator_id = p_schedule_desig_id
  and   desig.designator_type = 6;
Line: 2339

  SELECT 1
  from  msc_plan_schedules
  where plan_id = p_plan_id
  and   input_schedule_id=p_schedule_desig_id
  and   designator_type=7;
Line: 2346

  SELECT FORWARD_UPDATE_TIME_FENCE,
         BACKWARD_UPDATE_TIME_FENCE
  FROM msc_designators
  WHERE designator_id = p_schedule_desig_id;
Line: 2352

  SELECT curr_FORWARD_days,
         curr_BACKWARD_days
  FROM msc_plans
  WHERE plan_id = p_plan_id;
Line: 2418

   SELECT description
     FROM msc_item_categories
    WHERE category_set_id = arg_category_set_id
      AND category_name = arg_category_name
      AND sr_instance_id = arg_instance_id
      AND organization_id = arg_org_id
      AND description is NOT NULL
      AND rownum<2;
Line: 2428

   SELECT description
     FROM msc_item_categories
    WHERE category_set_id = arg_category_set_id
      AND category_name = arg_category_name
      AND sr_instance_id = arg_instance_id
      AND description is NOT NULL
      AND rownum<2;
Line: 2437

   SELECT description
     FROM msc_item_categories
    WHERE category_set_id = arg_category_set_id
      AND category_name = arg_category_name
      AND description is NOT NULL
      AND rownum<2;
Line: 2489

   select decode(exception_column,
        'DATE1',date1,'DATE2',date2,'DATE3',date3,'DATE4',date4,
		'DATE5',date5,'DATE6',date6,'DATE7',date7)
   into l_date
   from msc_user_exception_components muec,
        msc_x_exception_details mxed
   where muec.exception_id = mxed.exception_type
   and mxed.exception_detail_id = arg_exception_id
   and muec.component_type = 1
   and muec.ak_attribute_code = 'MSCX_CUST_SHIP_DATE';
Line: 2513

   select decode(muec.exception_column, 'NUMBER1',NUMBER1,'NUMBER2',NUMBER2,
	'NUMBER3',NUMBER3,'NUMBER4',NUMBER4,'NUMBER5',NUMBER5,'NUMBER6',NUMBER6,'NUMBER7',NUMBER7)
   into l_temp
   from msc_user_exception_components muec,
        msc_x_exception_details mxed
   where muec.exception_id = mxed.exception_type
   and mxed.exception_detail_id = arg_exception_id
   and muec.component_type = 1
   and muec.ak_attribute_code = 'MSCX_UDE_PUB_ORDER_TYPE';
Line: 2536

   select decode(muec.exception_column,
	'USER_ATTRIBUTE1',USER_ATTRIBUTE1,'USER_ATTRIBUTE2',USER_ATTRIBUTE2,
	'USER_ATTRIBUTE3',USER_ATTRIBUTE3,'USER_ATTRIBUTE4',USER_ATTRIBUTE4,
	'USER_ATTRIBUTE5',USER_ATTRIBUTE5,'USER_ATTRIBUTE6',USER_ATTRIBUTE6,
	'USER_ATTRIBUTE7',USER_ATTRIBUTE7)
   into l_temp
   from msc_user_exception_components muec,
        msc_x_exception_details mxed
   where muec.exception_id = mxed.exception_type
   and mxed.exception_detail_id = arg_exception_id
   and muec.component_type = 1
   and muec.ak_attribute_code = 'MSCX_PLANNER_CODE';
Line: 2562

   select decode(muec.exception_column, 'NUMBER1',NUMBER1,'NUMBER2',NUMBER2,
	'NUMBER3',NUMBER3,'NUMBER4',NUMBER4,'NUMBER5',NUMBER5,
	'NUMBER6',NUMBER6,'NUMBER7',NUMBER7)
   into l_temp
   from msc_user_exception_components muec,
        msc_x_exception_details mxed
   where muec.exception_id = mxed.exception_type
   and mxed.exception_detail_id = arg_exception_id
   and muec.component_type = 1
   and muec.ak_attribute_code = 'MSCX_QUANTITY';
Line: 2586

   select decode(muec.exception_column, 'DATE1',date1,'DATE2',date2,'DATE3',date3,
	'DATE4',date4,'DATE5',date5,'DATE6',date6,'DATE7',date7)
   into l_temp
   from msc_user_exception_components muec,
        msc_x_exception_details mxed
   where muec.exception_id = mxed.exception_type
   and mxed.exception_detail_id = arg_exception_id
   and muec.component_type = 1
   and muec.ak_attribute_code = 'MSCX_COMP_RECEIPT_DATE';
Line: 2609

   select decode(muec.exception_column, 'DATE1',date1,'DATE2',date2,'DATE3',date3,
	'DATE4',date4,'DATE5',date5,'DATE6',date6,'DATE7',date7)
   into l_temp
   from msc_user_exception_components muec,
        msc_x_exception_details mxed
   where muec.exception_id = mxed.exception_type
   and muec.exception_id = arg_exception_id
   and mxed.exception_detail_id = arg_exception_id
   and muec.component_type = 1
   and muec.ak_attribute_code = 'MSCX_COMP_REQUEST_DATE';
Line: 2633

    select meaning
    into l_text
    from mfg_lookups
    where lookup_type = 'MSC_X_EXCEPTION_TYPE'
      and lookup_code = arg_exception_type;
Line: 2639

    select EXCEPTION_TYPE exception_type_text
    into l_text
    from MSC_EXCEPTION_LOOKUP_V
    where  to_number(EXCEPTION_TYPE_ID) = arg_exception_type;
Line: 2667

   select resource_code
    into   v_resource_code
    from   msc_planned_resources_v
    where department_id = arg_dept_id
    and   resource_id = arg_resource_id
    and   plan_id = arg_plan_id
    and   organization_id = arg_org_id
    and   sr_instance_id = arg_instance_id
    and  resource_type = resource_type;
Line: 2701

   select distinct resource_desc
    into   v_resource_desc
    from   msc_planned_resources_v
    where department_id = arg_dept_id
    and   resource_id = arg_resource_id
    and   plan_id = arg_plan_id
    and   organization_id = arg_org_id
    and   sr_instance_id = arg_instance_id
    and  resource_type = resource_type;
Line: 2721

select tp.modeled_supplier_id
      from   msc_trading_partners tp
      where  tp.partner_type =3 and
             tp.sr_tp_id = l_source_org_id and
             tp.sr_instance_id = l_sr_instance_id;
Line: 2755

select tp.modeled_supplier_site_id
      from   msc_trading_partners tp
      where  tp.partner_type =3 and
             tp.sr_tp_id = l_source_org_id and
             tp.sr_instance_id = l_sr_instance_id;
Line: 2794

   SELECT category_name
     FROM msc_item_categories
    WHERE category_set_id = arg_category_set_id
      AND sr_category_id = arg_category_id
      AND sr_instance_id = arg_instance_id
      AND organization_id = arg_org_id
      AND description is NOT NULL
      AND rownum<2;
Line: 2804

   SELECT category_name
     FROM msc_item_categories
    WHERE category_set_id = decode(arg_category_set_id, -1, category_set_id, arg_category_set_id)
      AND sr_category_id= arg_category_id
      AND sr_instance_id = arg_instance_id
      AND description is NOT NULL
      AND rownum<2;
Line: 2813

   SELECT category_name
     FROM msc_item_categories
    WHERE category_set_id = arg_category_set_id
      AND sr_category_id= arg_category_id
      AND description is NOT NULL
      AND rownum<2;
Line: 2870

select name
from msc_inventory_budgets
where budget_id=arg_budget_id;
Line: 2895

select name
from msc_drp_alloc_rules
where rule_id=arg_rule_id;
Line: 2921

select meaning
from msc_drp_dmd_pri_rules
where rule_set_id=arg_rule_id;
Line: 2949

select sr_category_id
from msc_item_categories
where category_name = p_category_name
and category_set_id = fnd_profile.value('MSR_BUDGET_CATEGORY_SET')
and rownum =1 ;
Line: 2957

select sr_category_id
from msc_item_categories
where category_name = p_category_name
and category_set_id = fnd_profile.value('MSR_BUDGET_CATEGORY_SET')
and organization_id=p_org_id
and sr_instance_id=p_inst_id
and rownum =1 ;
Line: 2994

select wip_entity_name , order_number
from msc_supplies
where plan_id=p_plan_id
and   sr_instance_id = p_inst_id
and   transaction_id= p_transaction_id;
Line: 3024

select mode_of_transport
from msc_carrier_services
where ship_method_code = p_ship_method_code
and   sr_instance_id=p_instance_id;
Line: 3054

   select meaning
   into meaning_text
   from fnd_lookup_values
   where lookup_type = arg_lookup_type
     and lookup_code = arg_lookup_code
     and view_application_id = arg_application_id
     and language = userenv('LANG')
     and security_group_id = arg_security_group_id;
Line: 3077

  select (mif.unit_weight * mr.new_order_quantity)
    into l_req_capacity
  from msc_supplies mr,
     msc_system_items mif
  where mr.plan_id = mif.plan_id
    and mr.sr_instance_id = mif.sr_instance_id
    and mr.organization_id = mif.organization_id
    and mr.inventory_item_id = mif.inventory_item_id
    and mr.plan_id = p_plan_id
    and mr.transaction_id = p_transaction_id;
Line: 3097

    select decode(p_set_type, 1, ship_set_name, arrival_set_name)
      from msc_sales_orders
     where sr_instance_id = p_inst_id
       and demand_source_line = p_so_line_id;
Line: 3116

 select bom_item_type
 from msc_system_items
 where inventory_item_id = p_item_id
 and rownum < 2;
Line: 3140

  select count(*)
  into l_count
  from msd_dp_scn_output_levels_v dp,
     msc_plan_schedules ps
  where ps.input_schedule_id = dp.scenario_id
    and ps.designator_type = 7
    and dp.level_id in (11, 15, 41)
    and ps.plan_id = p_plan_id
    and ps.input_schedule_id = p_schedule_desig_id;
Line: 3181

   select schedule_arrival_date, planned_arrival_date, promise_date, request_date
    ,using_assembly_demand_date, planned_ship_date, origination_type
   from msc_demands
   where plan_id = l_plan
   and demand_id = l_dem;
Line: 3260

select sr_category_id
from msc_item_categories
where inventory_item_id=p_inventory_item_id
and   sr_instance_id=p_instance_id
and   organization_id=decode(p_organization_id, -1,organization_id, p_organization_id)
and   rownum < 2;
Line: 3283

select category_set_id
from msc_item_categories
where inventory_item_id=p_inventory_item_id
and   sr_instance_id=p_instance_id
and   organization_id=decode(p_organization_id, -1,  organization_id, p_organization_id)
and   rownum < 2;
Line: 3315

  select resource_group_name
  into l_group
  from   msc_department_resources
  where department_id = arg_dept_id
  and   resource_id = arg_resource_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 3335

	select	new_schedule_date
        into    l_date
	from	msc_supplies
	where 	transaction_id = arg_trx_id
        and     plan_id = arg_plan_id;
Line: 3352

select zone
from msc_regions
where  region_id   = l_zone_id
and region_type    = 10
and sr_instance_id = l_sr_instance_id ;
Line: 3374

  SELECT bom.alternate_bom_designator
  FROM msc_boms bom,
       msc_process_effectivity eff
  WHERE bom.plan_id = eff.plan_id
    AND bom.sr_instance_id = eff.sr_instance_id
    AND bom.bill_sequence_id = eff.bill_sequence_id
    AND eff.plan_id=p_plan_id
    and eff.sr_instance_id=p_sr_instance_id
    and eff.process_sequence_id=p_process_seq_id;
Line: 3404

  SELECT rt.alternate_routing_designator
  FROM msc_routings rt,
       msc_process_effectivity eff
  WHERE rt.plan_id = eff.plan_id
    AND rt.sr_instance_id = eff.sr_instance_id
    AND rt.routing_sequence_id = eff.routing_sequence_id
    AND eff.plan_id=p_plan_id
    and eff.sr_instance_id=p_sr_instance_id
    and eff.process_sequence_id=p_process_seq_id;
Line: 3444

	select
			DECODE(l_order_type, 5,
					decode( l_order_number, NULL,
										  to_char(l_transaction_id),
										 l_order_number||' '||to_char(l_transaction_id)) ,
  14, decode(l_plan_id,
        -1, l_order_number,
        decode(substr(msc_get_name.get_order_number( l_sr_instance_id,
	     l_plan_id, l_disposition_id, 1),1,240),
           null, to_char(l_disposition_id),
           substr(msc_get_name.get_order_number(l_sr_instance_id, l_plan_id,
	     l_disposition_id, 1),1,240)||' ' || to_char(l_disposition_id))),
					   17, decode(substr(msc_get_name.get_order_number(
								l_sr_instance_id,
								l_plan_id,
								l_disposition_id,
							       1),1,240), null, to_char(l_disposition_id),
								substr(msc_get_name.get_order_number(
								l_sr_instance_id,
								l_plan_id,
								l_disposition_id,
							       1),1,240)||' ' || to_char(l_disposition_id)),
				15,to_char(l_DISPOSITION_ID),
					 16,to_char(l_DISPOSITION_ID),
					 28,to_char(l_DISPOSITION_ID),
				       l_order_number)
	from dual;
Line: 3495

    select operation_code
    from msc_std_op_resources
    where plan_id = p_plan_id
    and sr_instance_id = p_sr_instance_id
    and standard_operation_id = p_standard_operation_id;
Line: 3527

    select setup_code
    from msc_resource_setups
    where
        plan_id=p_plan_id
    AND sr_instance_id=p_sr_instance_id
    AND resource_id = p_resource_id
    AND organization_id = p_organization_id
    AND setup_id = p_setup_id;
Line: 3627

    Select Mrr.Transaction_Id,
           Mrr.Resource_Id,
           Mdr.Resource_Code,
           Mrr.Department_Id,
           Mdr.Department_Code
    From Msc_Department_Resources Mdr,
         Msc_Resource_Requirements Mrr
    Where Mrr.Transaction_Id = P_Res_Transaction_Id
    And Mrr.Plan_Id         = P_Plan_Id
    And Mrr.Sr_Instance_Id  = P_Sr_Instance_Id
    And Mdr.Plan_Id         = Mrr.Plan_Id
    And Mdr.Sr_Instance_Id  = Mrr.Sr_Instance_Id
    And Mdr.Organization_Id = Mrr.Organization_Id
    And Mdr.Department_Id   = Mrr.Department_Id
    And Mdr.Resource_Id     = Mrr.Resource_Id;
Line: 3704

     select dependency_type,
            minimum_transfer_qty,
            minimum_time_offset,
            maximum_time_offset
     from msc_operation_networks
     where plan_id              = p_plan_id        and
           sr_instance_id       = p_sr_instance_id and
           routing_sequence_id  = p_routing_seq_id and
	   from_op_seq_id       = p_operation_seq_id and
	   from_item_id         = p_item_id;
Line: 3716

     select minimum_transfer_quantity
     from msc_routing_operations
     where plan_id              = p_plan_id        and
           sr_instance_id       = p_sr_instance_id and
           routing_sequence_id  = p_routing_seq_id and
	   operation_sequence_id  = p_operation_seq_id;
Line: 3810

	select  to_transaction_id
	from msc_job_operation_networks
	where plan_id = p_plan_id
	and sr_instance_id = p_sr_instance_id
	and transaction_id = p_transaction_id
	and dependency_type = 3	;
Line: 3838

    select res.operation_code
    from msc_std_op_resources res, msc_setup_transitions mst
    where res.plan_id = p_plan_id
    and res.sr_instance_id = p_sr_instance_id
    and mst.resource_id=p_resource_id
    and mst.organization_id=p_org_id
    and mst.from_setup_id=p_from_setup_id
    and mst.to_setup_id=p_to_setup_id
    and res.plan_id=mst.plan_id
    and res.sr_instance_id=mst.sr_instance_id
    and res.organization_id=mst.organization_id
    and res.standard_operation_id =mst.standard_operation_id;
Line: 3877

     select operation_sequence_id
     from msc_routing_operations
     where plan_id = p_plan_id
          and sr_instance_id = p_sr_instance_id
          and routing_sequence_id = p_routing_seq_id
          and operation_seq_num = p_op_seq_num;
Line: 3913

     select dependency_type,
            minimum_transfer_qty,
            minimum_time_offset,
            maximum_time_offset
     from msc_operation_networks
     where plan_id              = p_plan_id        and
           sr_instance_id       = p_sr_instance_id and
           routing_sequence_id  = p_routing_seq_id and
	       from_op_seq_id       = p_operation_seq_id and
	       from_item_id         = p_item_id;
Line: 3982

  select distinct dependency_type,
            minimum_transfer_qty,
            minimum_time_offset,
            maximum_time_offset
  from  msc_operation_networks
  where plan_id                              = p_plan_id
    and sr_instance_id                       = p_inst_id
    and routing_sequence_id                  = p_routing_seq_id
    and transition_type                      = 1
    and nvl(from_op_seq_id, -23453)          = nvl(p_op_seq_id, -23453)
    and nvl(to_op_seq_id, -23453)            = nvl(c_op_seq_id, -23453);
Line: 3996

  select dependency_type,
            minimum_transfer_qty,
            minimum_time_offset,
            maximum_time_offset
  from msc_job_operation_networks
  where plan_id                         = p_plan_id
    and sr_instance_id                  = p_inst_id
    and transaction_id                  = p_trans_id
    and to_transaction_id               = c_trans_id
    and transition_type                 = 1
    and from_item_id                    = p_item_id
    and nvl(from_op_seq_id, -23453)     = nvl(p_op_seq_id, -23453)
    and nvl(to_op_seq_id, -23453)       = nvl(c_op_seq_id, -23453);
Line: 4066

select order_number , order_type , disposition_id
from msc_supplies
where plan_id        = p_curr_plan_id
and sr_instance_id   = p_curr_inst_id
and transaction_id   = p_curr_trans_id;
Line: 4096

select inventory_item_id , organization_id
from msc_supplies
where plan_id        = p_curr_plan_id
and sr_instance_id   = p_curr_inst_id
and transaction_id   = p_curr_trans_id;
Line: 4122

select msc_get_name.org_code(organization_id , sr_instance_id )
from msc_supplies
where plan_id        = p_curr_plan_id
and sr_instance_id   = p_curr_inst_id
and transaction_id   = p_curr_trans_id;
Line: 4161

select mrr.operation_sequence_id , ms.routing_sequence_id  , ms.inventory_item_id
from msc_supplies ms ,msc_resource_requirements mrr
where   ms.transaction_id = mrr.supply_id
and ms.plan_id            = mrr.plan_id
and mrr.operation_seq_num = p_operation_seq_num
and mrr.resource_seq_num  = p_resource_seq_num
and mrr.operation_seq_num is not null
and ms.plan_id            = p_curr_plan_id
and ms.sr_instance_id     = p_curr_inst_id
and ms.transaction_id     = p_curr_trans_id;
Line: 4212

select utilization_change_percent
	from msc_department_resources
	where plan_id        = l_plan_id
	and sr_instance_id   = l_sr_instance_id
	and organization_id  = l_organization_id
	and department_id    = l_department_id
	and resource_id      = l_resource_id ;
Line: 4238

select decode(level_id ,1,6
                       ,11,7
		       ,12,5
		       ,15,4
		       ,34,10
		       ,41,9
		       ,42,8,1)
 from msd_dp_scn_output_levels_v
where demand_plan_id = l_demand_plan_id
and scenario_id    = l_scenario_id
and level_id in(1,11,12,15,34,41,42);
Line: 4275

 select key, value
 from msc_user_preference_values
 where key= p_key
 and   preference_id = p_pref_id;
Line: 4284

 select preference_key,default_value
 from msc_user_preference_keys
 where preference_key= p_key
 and   plan_type = l_plan_type;
Line: 4293

  select to_char(category_set_id)
  from msc_category_sets
  where default_flag = 1;
Line: 4345

   select meaning
   into meaning_text
   from fnd_lookups
   where lookup_type = arg_lookup_type
     and lookup_code = arg_lookup_code;
Line: 4359

select preference_id
from msc_user_preferences
where default_flag =1
and   user_id = p_user_id;
Line: 4383

select standard_operation_code
from msc_routing_operations
where plan_id             = p_plan_id
and   sr_instance_id      = p_sr_instance_id
and   routing_sequence_id = p_routing_sequence_id
and   operation_sequence_id = p_op_seq_id;
Line: 4438

    select processing_lead_time
    from msc_item_suppliers
	where plan_id = p_plan_id
	and organization_id = p_org
	and sr_instance_id = p_inst
	and inventory_item_id = p_item
    and using_organization_id = -1
	and supplier_id = p_supplier
	and supplier_site_id = p_supplier_site;
Line: 4453

select full_lead_time
from msc_system_items
where plan_id  = p_plan_id
and sr_instance_id  = p_sr_instance_id
and organization_id = p_organization_id
and inventory_item_id = p_inventory_item_id;
Line: 4490

   select cfm_routing_flag
     from msc_supplies
    where plan_id = p_plan_id
      and transaction_id = p_transaction_id
      and sr_instance_id = p_instance_id;
Line: 4497

      select cfm_routing_flag
        from msc_routings
      where plan_id = p_plan_id
      and organization_id = p_org_id
      and assembly_item_id = p_item_id
      and sr_instance_id = p_instance_id
      and (alternate_routing_designator = p_impl_alt_routing or
           (p_impl_alt_routing is null and
            alternate_routing_designator is null));
Line: 4550

 select 1
 from msc_demands
 where disposition_id = p_transaction_id
 and plan_id = p_plan_id
 and organization_id  = p_source_organization_id
 and sr_instance_id = p_sr_instance_id;
Line: 4558

 select 1
 from msc_supplies
 where plan_id = p_plan_id
 and sr_instance_id = p_sr_instance_id
 and transaction_id in
        (select  disposition_id
         from msc_demands
         where demand_id = p_transaction_id
         and  plan_id = p_plan_id
         and organization_id = p_organization_id
         and sr_instance_id = p_sr_instance_id) ;
Line: 4742

    select description
    into v_item_desc
    from msc_items
    where inventory_item_id = arg_item_id;
Line: 4749

  select description
  into v_item_desc
  from msc_system_items
  where inventory_item_id = arg_item_id
  and   plan_id = arg_plan_id
  and   organization_id = arg_org_id
  and   sr_instance_id = arg_instance_id;
Line: 4759

    select description
    into v_item_desc
    from msc_items
    where inventory_item_id = arg_item_id;
Line: 4774

        select count(*)
        from  msc_segment_allocations
        where   plan_id = p_plan_id
            and ((producer_sr_instance_id = p_sr_instance_id and
                  from_res_transaction_id = p_trans_id)
              or (consumer_sr_instance_id = p_sr_instance_id and
                  to_res_transaction_id = p_trans_id));
Line: 4804

    select application_id into application_id
    from fnd_application
    where application_short_name = arg_application_name;
Line: 4833

    select
        res.from_setup_id
        ,res.setup_id
        ,res.resource_id
    from
        msc_resource_requirements res
    where res.plan_id = p_plan_id
    and res.sr_instance_id = p_sr_instance_id
    and res.department_id=p_department_id
    and res.organization_id = p_org_id
    and res.supply_id=p_supply_id
    and nvl(res.operation_seq_num,-23453)=nvl(p_operation_seq_num,-23453)
    and nvl(res.resource_seq_num,-23453)=nvl(p_resource_seq_num,-23453)
--  and nvl(res.orig_resource_seq_num, -23453)=nvl(p_parent_seq_num,-23453) -- get setup id's from parent
    and nvl(res.parent_seq_num, -23453)=nvl(p_parent_seq_num,-23453) -- instead get from setup activity
    and nvl(res.parent_id,2)=2
    and res.setup_id is not null
    and res.from_setup_id is not null;
Line: 5003

   select capacity_units
   from msc_net_resource_avail
   where plan_id = p_plan_id
       and sr_instance_id = p_sr_instance_id
       and organization_id = p_org_id
       and department_id = p_department_id
       and resource_id = p_resource_id
       and trunc(shift_date)  between trunc(p_batch_start_date)
                                  and trunc(p_batch_end_date)
       and rownum = 1;
Line: 5026

  select category_set_name
  from msc_category_sets
  where category_set_id = p_cat_set_id;
Line: 5047

	select rule_id
	from msc_scheduling_rules
	where default_flag = 'Y'
	and enabled_flag   = 'Y';
Line: 5066

	select meaning
	from msc_scheduling_rules
	where default_flag = 'Y'
	and enabled_flag   = 'Y';
Line: 5085

    select mro.operation_description
    from msc_routing_operations mro
    where mro.plan_id = p_plan_id
      and mro.sr_instance_id = p_sr_instance_id
      and mro.routing_sequence_id = nvl(p_routing_seq_id, mro.routing_sequence_id)
      and mro.operation_sequence_id = p_op_seq_id;
Line: 5129

    select
        group_name
    from
        msc_srp_groups
    where group_id = c_group_id;
Line: 5136

    select
        g.group_name
    from
        msc_srp_user_groups owner,
        msc_srp_groups g
    where
        owner.user_id = c_owner
        and owner.group_id=g.group_id
        and exists -- check if the query owner and the planner belong to the currently fetched group
        ( select 1 from msc_srp_user_groups planner
          where planner.user_id = c_planner
          and owner.group_id=planner.group_id
        )
        and rownum=1;
Line: 5180

    select forecast_rule_name
    from msc_forecast_rules
    where forecast_rule_id = p_forecast_rule_id;
Line: 5205

    SELECT note_text1
    from msc_user_notes
    where entity_type    = lp_entity_type
    and   plan_id        = lp_plan_id
    and   transaction_id = lp_transaction_id;