DBA Data[Home] [Help]

APPS.WIP_WS_UTIL SQL Statements

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

Line: 52

    select wp.module_id
    into l_module_id
    from wip_preference_definitions wp
    where wp.preference_id = p_pref_id;
Line: 73

    select level_id
    into l_level_id
    from
    (
      select level_id
      from wip_preference_levels v
      where
        v.module_id = l_module_id and
        v.level_code <= l_level_code and
        ( v.resp_key is null or v.resp_key = p_resp_key) and
        ( v.organization_id is null or v.organization_id = p_org_id) and
        ( v.department_id is null or v.department_id = p_dept_id) and
        exists
        (
          select 1
             from wip_preference_values v1
             where v1.preference_id = p_pref_id and
               v1.level_id = v.level_id
        )
        order by v.level_code desc
       )
    where rownum = 1;
Line: 109

      select wpv.attribute_value_code
      into l_result
      from wip_preference_values wpv
      where wpv.preference_id = p_pref_id and
        wpv.level_id = p_level_id and
        rownum = 1;
Line: 170

    select bdr.available_24_hours_flag
    into l_24hr_resource
    from bom_department_resources bdr
    where bdr.resource_id = p_resource_id and
          bdr.department_id = p_dept_id;
Line: 207

  select to_char(l_c_start_date, 'HH24:MI:SS')
  into l_c_from_time
  from dual;
Line: 211

  select to_char(l_c_end_date, 'HH24:MI:SS')
  into l_c_to_time
  from dual;
Line: 247

  select msi.revision_qty_control_code,
         msi.lot_control_code,
         msi.serial_number_control_code
  into l_revision_control_code, l_lot_control_code, l_serial_control_code
  from mtl_system_items_b msi
  where msi.organization_id = p_org_id
    and msi.inventory_item_id = p_component_id;
Line: 273

  fnd_msg_pub.Delete_Msg;
Line: 316

    select papf.full_name
    into l_name
    from per_all_people_f papf
    where papf.person_id = p_employee_id and
          papf.effective_start_date <= l_date and
          papf.effective_end_date > l_date;
Line: 328

    select papf.full_name
    into l_name
    from per_all_people_f papf
    where papf.person_id = p_employee_id
    and rownum = 1;
Line: 349

  SELECT count(distinct p.person_id), min(p.PERSON_ID)
  into l_count, l_emp_id
  FROM PER_PEOPLE_F          P,
       PER_ASSIGNMENTS_F     A,
       PER_PERSON_TYPES      T,
       HR_ORGANIZATION_UNITS ORG
 WHERE A.PERSON_ID = P.PERSON_ID AND
       ORG.BUSINESS_GROUP_ID = P.BUSINESS_GROUP_ID AND
       A.PRIMARY_FLAG = 'Y' AND
       A.ASSIGNMENT_TYPE = 'E' AND
       P.PERSON_TYPE_ID = T.PERSON_TYPE_ID AND
       P.BUSINESS_GROUP_ID = T.BUSINESS_GROUP_ID AND
       TRUNC(sysdate) BETWEEN P.EFFECTIVE_START_DATE AND
       NVL(P.EFFECTIVE_END_DATE, SYSDATE + 1) AND
       TRUNC(sysdate) BETWEEN A.EFFECTIVE_START_DATE AND
       NVL(A.EFFECTIVE_END_DATE, SYSDATE + 1) AND
       P.EMPLOYEE_NUMBER IS NOT NULL AND
       P.EMPLOYEE_NUMBER = p_employee_number AND
       ORG.ORGANIZATION_ID = p_org_id;
Line: 423

  select min(bsd.shift_date)
    into l_next_working_date
    from bom_shift_dates bsd
    where bsd.calendar_code = p_calendar_code
      and bsd.shift_date > trunc(p_date,'ddd')
      and bsd.seq_num is not null;
Line: 443

  select calendar_code
  into l_calendar_code
  from mtl_parameters
  where organization_id = p_org_id;
Line: 465

    select bsd.shift_date + at.from_time /(24*60*60),
           bsd.shift_date + at.to_time/(24*60*60)
    into l_start_date, l_end_date
    from bom_shift_dates bsd,
      (select min(bst.from_time) from_time,
              max(bst.to_time + decode(sign(to_time - from_time), -1, 24*60*60, 0)) to_time,
              mp.calendar_code
       from bom_shift_times bst, mtl_parameters mp
       where bst.calendar_code = mp.calendar_code and
             mp.organization_id = p_org_id and
             bst.shift_num = p_shift_num
       group by mp.calendar_code
      ) at
    where bsd.calendar_code = at.calendar_code and
          bsd.exception_set_id = -1 and
          bsd.seq_num = p_shift_seq and
          bsd.shift_num = p_shift_num;
Line: 538

    select bd.department_code
    into l_dept_code
    from wip_operations wo, bom_departments bd
    where wo.department_id = bd.department_id
      and wo.wip_entity_id = p_wip_entity_id
      and wo.operation_seq_num = p_op_seq;
Line: 578

    select fr.responsibility_key
    into l_resp_key
    from fnd_responsibility fr
    where fr.responsibility_id = fnd_global.RESP_ID
      and fr.application_id = fnd_global.RESP_APPL_ID
      and rownum = 1;
Line: 604

    update wip_discrete_jobs wdj
    set wdj.job_note = wdj.job_note || p_msg
    where wdj.wip_entity_id = p_wip_entity_id;
Line: 633

    select wdj.job_note
    into job_note
    from wip_discrete_jobs wdj
    where wdj.wip_entity_id = p_wip_entity_id
    for update;
Line: 669

    select note into l_note from wip_exceptions
    where exception_id = p_exception_id;
Line: 678

    update wip_exceptions we
    set we.note = l_note
    where we.exception_id = p_exception_id;
Line: 732

      select bsd.shift_date, bst.from_time, bst.to_time
      from bom_shift_dates bsd, bom_resource_shifts brs,
           bom_shift_times bst, mtl_parameters mp
      where mp.organization_id = p_organization_id and
            bsd.calendar_code = p_cal_code and
            bsd.exception_set_id = mp.calendar_exception_set_id and
            bsd.shift_date >= trunc(p_date) - 1 and
            bsd.shift_date + bst.to_time/(24*60*60) +
              decode(sign(bst.to_time - bst.from_time), -1, 1, 0) > p_date and
            brs.department_id = p_dept_id and
            brs.resource_id = p_resource_id and
            brs.shift_num = bsd.shift_num and
            bst.shift_num = brs.shift_num and
            bst.calendar_code = bsd.calendar_code and
            bsd.seq_num is not null
       order by bsd.shift_date + bst.from_time/(24*60*60);
Line: 770

      select bdr.available_24_hours_flag
      into l_24hr_resource
      from bom_department_resources bdr
      where bdr.department_id = p_department_id
        and bdr.resource_id = p_resource_id;
Line: 857

      select nvl(wor.department_id, wo.department_id)
      into l_department_id
      from wip_operations wo, wip_operation_resources wor
      where wo.wip_entity_id = p_wip_entity_id
        and wo.organization_id = p_organization_id
        and wo.operation_seq_num = p_op_seq_num
        and wor.wip_entity_id = wo.wip_entity_id
        and wor.organization_id = wo.organization_id
        and wor.operation_seq_num = wo.operation_seq_num
        and wor.resource_seq_num = p_resource_seq_num;
Line: 874

        select least(wor.assigned_units, bdr.capacity_units),
               decode(wp.include_resource_utilization,
                      wip_constants.yes, nvl(bdr.utilization, 1), 1),
               decode(wp.include_resource_efficiency,
                      wip_constants.yes, nvl(bdr.efficiency, 1), 1)
        into l_units, l_utilization, l_efficiency
        from wip_operation_resources wor,
             bom_department_resources bdr,
             wip_parameters wp
        where wor.organization_id = p_organization_id
          and wor.wip_entity_id = p_wip_entity_id
          and wor.operation_seq_num = p_op_seq_num
          and wor.resource_seq_num = p_resource_seq_num
          and bdr.resource_id = wor.resource_id
          and bdr.department_id = l_department_id
          and wp.organization_id = p_organization_id;
Line: 893

        select count(distinct wrat.instance_id)
        into l_actual_units
        from wip_resource_actual_times wrat
        where wrat.organization_id = p_organization_id
          and wrat.wip_entity_id = p_wip_entity_id
          and wrat.operation_seq_num = p_op_seq_num
          and wrat.resource_seq_num = p_resource_seq_num
          and wrat.status_type = 1
          and wrat.end_date is null;
Line: 959

    select br.resource_type, wip_ws_time_entry.is_time_uom(br.unit_of_measure)
    into l_resource_type, l_is_time_uom
    from bom_resources br
    where br.organization_id = p_organization_id
      and br.resource_id = p_resource_id;
Line: 1006

    select count(wor.resource_seq_num)
    into l_not_projected_count
    from wip_operation_resources wor
    where wor.wip_entity_id = p_wip_entity_id
      and wor.operation_seq_num = p_op_seq_num
      and wor.organization_id = p_organization_id
      and wor.projected_completion_date is null
      and wor.scheduled_flag in (1, 3, 4);
Line: 1017

      select max(wor.projected_completion_date)
      into l_completion_date
      from wip_operation_resources wor
      where wor.wip_entity_id = p_wip_entity_id
        and wor.operation_seq_num = p_op_seq_num
        and wor.organization_id = p_organization_id
        and wor.projected_completion_date is not null
        and wor.scheduled_flag in (1, 3, 4);
Line: 1078

    select to_number(ORG_INFORMATION2) into l_le_id
    from hr_organization_information
    where organization_id = p_org_id
    and org_information_context = 'Accounting Information';
Line: 1101

   select resource_type
   from bom_resources br
   where resource_id = p_resource_id;
Line: 1106

   select person_id
   from bom_resource_employees bremp
   where instance_id = p_instance_id;
Line: 1111

   select msik.concatenated_segments
   from bom_resource_equipments breq,
        mtl_system_items_kfv msik
   where breq.instance_id = p_instance_id
         and msik.inventory_item_id = breq.inventory_item_id
         and msik.organization_id = breq.organization_id;
Line: 1173

    select user_function_name
    into l_name
    from fnd_form_functions_vl t
    where t.function_name = p_oasf;
Line: 1189

    select wpv.sequence_number
      from wip_preference_values wpv
     where wpv.preference_id = p_pref_id
       and wpv.level_id = p_level_id
       and wpv.attribute_name = p_attribute_name
       and wpv.attribute_value_code = p_attribute_val;
Line: 1209

    select wpv.attribute_value_code
      from wip_preference_values wpv
     where wpv.preference_id = p_pref_id
       and wpv.level_id = p_level_id
       and wpv.sequence_number = p_seq_num
       and wpv.attribute_name = p_attribute_name;
Line: 1364

    select decode(nvl(shortage_qty,-1),-1,3,0,2,1)
    into l_comp_shortage
    from wip_ws_comp_shortage
    where wip_entity_id = p_wip_entity_id
    and   organization_id =  p_org_id
    and SUPPLY_SUBINVENOTRY is null
    and rownum =1;
Line: 1372

    select 1
    into l_comp_shortage
    from wip_ws_comp_shortage
    where wip_entity_id = p_wip_entity_id
    and organization_id =  p_org_id
    and SUPPLY_SUBINVENOTRY is not null
    and shortage_qty > 0
    and rownum =1;
Line: 1401

  select decode(nvl(RESOURCE_SHORTAGE,-1),-1,3,0,2,1)
  into l_res_shortage
  from wip_ws_res_shortage
  where wip_entity_id = p_wip_entity_id
  and   organization_id =  p_org_id
  and rownum =1;
Line: 1452

    SELECT  count(1)
        INTO l_pgm_count
    FROM fnd_concurrent_requests
    WHERE program_application_id = p_program_application_id
        AND concurrent_program_id = p_concurrent_program_id
        AND upper(phase_code) = 'R'
        AND argument1 = to_char(p_org_id);