DBA Data[Home] [Help]

APPS.INV_ATTRIBUTE_CONTROL_PVT SQL Statements

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

Line: 20

      select control_level
        into l_control_level
        from mtl_item_attributes
       where attribute_name = attr_name;
Line: 45

     select count(1)
       into l_org_count
       from mtl_cycle_count_entries
      where inventory_item_id = p_item_id and
            organization_id = p_org_id and
            /*Change for bug 8208397*/ /*Check should be for status 1-Uncounted/2-Pending Approval/3-Recount*/
            /*entry_status_code = 2 and*/
            entry_status_code IN (1,2,3) and
      rownum = 1;
Line: 58

          select count(1)
            into l_org_count
            from mtl_physical_adjustments
           where inventory_item_id = p_item_id
             and organization_id = p_org_id
             and approval_status = 1
	     			 and adjustment_quantity <> 0
             and rownum = 1;
Line: 77

        select master_organization_id into l_master_org
          from mtl_parameters
         where organization_id = p_org_id;
Line: 81

       select count(1)
         into l_master_count
         from mtl_cycle_count_entries
        where inventory_item_id = p_item_id and
              (organization_id in
                (select organization_id
                   from mtl_parameters
                  where master_organization_id = l_master_org
                )
              )
         /*Change for bug 8208397*/ /*Check should be for status 1-Uncounted/2-Pending Approval/3-Recount*/
         /*and entry_status_code = 2*/
         and entry_status_code IN (1,2,3)
         and rownum = 1;
Line: 99

          select count(1)
            into l_master_count
            from mtl_physical_adjustments
           where inventory_item_id = p_item_id
             and (organization_id in
                    (select organization_id
                       from mtl_parameters
                      where master_organization_id = l_master_org
                    )
                 )
             and approval_status = 1
	     			and adjustment_quantity <> 0
             and rownum = 1;
Line: 138

            select count(1) into l_org_count
             from  wsh_delivery_details
              where  inventory_item_id = p_item_id
              and    released_status = 'S'
              and    source_code = 'OE'
              and    organization_id = p_org_id
              and    rownum = 1;
Line: 148

        select master_organization_id into l_master_org
          from mtl_parameters
         where organization_id = p_org_id;
Line: 152

        select count(1) into l_master_count
          from wsh_delivery_details
         where inventory_item_id = p_item_id
           and released_status = 'S'
           and source_code = 'OE'
           and organization_id in
                          (select organization_id
                             from mtl_parameters
                            where master_organization_id = l_master_org)
           and rownum = 1;
Line: 178

              select count(1) into l_org_count
               from  wsh_delivery_details
              where  inventory_item_id = p_item_id
              and    released_status = 'Y'
              and    source_code = 'OE'
              and    organization_id = p_org_id
              and    rownum = 1;
Line: 188

        select master_organization_id into l_master_org
          from mtl_parameters
         where organization_id = p_org_id;
Line: 192

        select count(1) into l_master_count
          from wsh_delivery_details
         where inventory_item_id = p_item_id
           and released_status = 'Y'
           and source_code = 'OE'
           and organization_id in
                          (select organization_id
                             from mtl_parameters
                            where master_organization_id = l_master_org)
           and rownum = 1;
Line: 220

  select count(1) into l_org_count
     from oe_order_lines_all l,
          wsh_delivery_details wdd
    where l.inventory_item_id = p_item_id
       and l.open_flag  = 'Y'	-- Bug 8247770
      and wdd.released_status not in ('C','D')
      and wdd.pickable_flag = 'N'
      --and wdd.source_code = 'OE'
      and l.line_id = wdd.source_line_id
      and l.ship_from_org_id = p_org_id
      and rownum = 1;
Line: 234

        select master_organization_id into l_master_org
          from mtl_parameters
         where organization_id = p_org_id;
Line: 238

        select count(1) into l_master_count
          from oe_order_lines_all l,
               wsh_delivery_details wdd
         where l.inventory_item_id = p_item_id
           and l.open_flag  = 'Y'	-- Bug 8247770
           and wdd.released_status not in ('C','D')
           and wdd.pickable_flag = 'N'
           --and wdd.source_code = 'OE'
           and l.line_id = wdd.source_line_id
           and l.ship_from_org_id in
                          (select organization_id
                             from mtl_parameters
                            where master_organization_id = l_master_org)
           and rownum = 1;
Line: 270

  select count(1) into l_org_count
     from wsh_delivery_details
    where inventory_item_id = p_item_id
      and pickable_flag = 'Y'
      --Bug 4643978 - Perf fix
      and inv_interfaced_flag IN ('N','P')
      --and source_code = 'OE'
      and released_status <> 'D'
      and organization_id = p_org_id
      and rownum = 1;
Line: 282

	select count(1) into l_org_count
	from oe_order_lines_all
	where source_type_code = 'EXTERNAL'
	  and open_flag = 'Y'
	  and nvl(shipped_quantity,0) = 0
	  and item_type_code in ('MODEL','STANDARD','OPTION')
	  and FLOW_STATUS_CODE = 'AWAITING_RECEIPT'
	  and inventory_item_id = p_item_id
	  and ship_from_org_id = p_org_id
	  and rownum = 1;
Line: 295

	select count(1) into l_org_count
	from oe_order_lines_all l
	where booked_flag = 'Y'
	  and nvl(shipped_quantity,0) = 0
	  and inventory_item_id = p_item_id
	  and open_flag = 'Y'
	  and ship_from_org_id = p_org_id
	  and exists (select 1
		      from   mtl_transactions_interface
		      where  trx_source_line_id = l.line_id
			and  transaction_source_type_id in (2,8)
			and  source_code = 'ORDER ENTRY')
	  and rownum = 1;
Line: 311

       select count(1)
        into l_org_count
       from mtl_supply
       where item_id = p_item_id
       and to_organization_id  =p_org_id
       and rownum =1 ;
Line: 321

      SELECT count(1)
        into l_org_count
        FROM GME_MATERIAL_DETAILS D, GME_BATCH_HEADER H
       WHERE D.INVENTORY_ITEM_ID = p_item_id
         AND D.ORGANIZATION_ID = p_org_id
         AND D.BATCH_ID = H.BATCH_ID
         AND (NVL(H.GL_POSTED_IND, 0) = 0 AND
             H.BATCH_STATUS IN (1, 2, 3, 4))
         AND rownum = 1;
Line: 336

    select master_organization_id into l_master_org
    from mtl_parameters
    where organization_id = p_org_id;
Line: 342

    for i in (select organization_id
              from   mtl_parameters
              where  master_organization_id = l_master_org)
    loop
      select count(1) into l_master_count
      from  wsh_delivery_details
      where inventory_item_id = p_item_id
        and pickable_flag = 'Y'
        --Bug 4643978 - Perf fix
        and inv_interfaced_flag IN ('N','P')
        --and source_code = 'OE'
        and released_status <> 'D'
        and organization_id = i.organization_id
        and rownum = 1;
Line: 363

      select count(1) into l_master_count
      from  wsh_delivery_details
      join mtl_parameters mp using (organization_id)
      where inventory_item_id = p_item_id
        and pickable_flag = 'Y'
        --Bug 4643978 - Perf fix
        and inv_interfaced_flag IN ('N','P')
        --and source_code = 'OE'
        and released_status <> 'D'
        and mp.master_organization_id = l_master_org
        group by organization_id
        having count(1) = 1;
Line: 381

	select count(1) into l_master_count /*l_org_count */ /*Bugfix 8460461 */
        from oe_order_lines_all
        where source_type_code = 'EXTERNAL'
          and open_flag = 'Y'
          and nvl(shipped_quantity,0) = 0
          and item_type_code in ('MODEL','STANDARD','OPTION')
          and FLOW_STATUS_CODE = 'AWAITING_RECEIPT'
          and inventory_item_id = p_item_id
          -- bug 9558897, base bug 9327156, perf issue
          and ship_from_org_id in (select organization_id
               from   mtl_parameters
               where  master_organization_id = l_master_org)
          -- bug 9558897, base bug 9327156, perf issue
          and rownum = 1;
Line: 399

	select count(1) into l_master_count /*l_org_count *//*bugfix 8460461 */
        from oe_order_lines_all l
        where booked_flag = 'Y'
          and nvl(shipped_quantity,0) = 0
          and inventory_item_id = p_item_id
          and open_flag = 'Y'
          -- bug 9558897, base bug 9327156, perf issue
          and ship_from_org_id in (select organization_id
               from   mtl_parameters
               where  master_organization_id = l_master_org)
          -- bug 9558897, base bug 9327156, perf issue
          and exists (select 1
                      from   mtl_transactions_interface
                      where  trx_source_line_id = l.line_id
                        and  transaction_source_type_id in (2,8)
                        and  source_code = 'ORDER ENTRY')
          and rownum = 1;
Line: 422

        for i in (select organization_id
                  from   mtl_parameters
                  where  master_organization_id = l_master_org)
        loop
           select count(1) into l_master_count
           from mtl_supply
           where item_id = p_item_id
           and to_organization_id  = i.organization_id
           and rownum =1 ;
Line: 438

      select count(1) into l_master_count
      from mtl_supply
      join  mtl_parameters mp on to_organization_id = organization_id
      where item_id = p_item_id
      and mp.master_organization_id = l_master_org
      group by to_organization_id
      having count(1) = 1;
Line: 455

        SELECT count(1)
          into l_master_count
          FROM GME_MATERIAL_DETAILS D, GME_BATCH_HEADER H
         WHERE D.INVENTORY_ITEM_ID = p_item_id
           AND D.ORGANIZATION_ID in
               (select organization_id
                  from mtl_parameters
                 where master_organization_id = l_master_org)
           AND D.BATCH_ID = H.BATCH_ID
           AND (NVL(H.GL_POSTED_IND, 0) = 0 AND
               H.BATCH_STATUS IN (1, 2, 3, 4))
           AND rownum = 1;
Line: 490

     select count(1) into l_org_count
       from wsh_delivery_details
    where inventory_item_id = p_item_id
      and oe_interfaced_flag = 'Y'
      and nvl(inv_interfaced_flag,'N') not in ('Y','X')
      and released_status = 'C'
      and source_code = 'OE'
      and organization_id = p_org_id
      and rownum = 1;
Line: 503

        select master_organization_id into l_master_org
          from mtl_parameters
         where organization_id = p_org_id;
Line: 506

    select count(1)
      into l_master_count
          from wsh_delivery_details
         where inventory_item_id = p_item_id
           and oe_interfaced_flag = 'Y'
           and nvl(inv_interfaced_flag,'N') not in ('Y','X')
           and released_status = 'C'
           and source_code = 'OE'
           and organization_id in
                          (select organization_id
                             from mtl_parameters
                            where master_organization_id = l_master_org)
           and rownum = 1;
Line: 537

     select count(1)
       into l_org_count
       from wsh_delivery_details
    where inventory_item_id = p_item_id
      and released_status not in ('B','R','D')
      and nvl(inv_interfaced_flag,'N') not in ('Y','X')
      and pickable_flag = 'Y'
      and source_code = 'OE'
      and organization_id = p_org_id
      and rownum = 1;
Line: 551

        select master_organization_id into l_master_org
          from mtl_parameters
         where organization_id = p_org_id;
Line: 554

    select count(1)
      into l_master_count
          from wsh_delivery_details
         where inventory_item_id = p_item_id
           and released_status not in ('B','R','D')
           and nvl(inv_interfaced_flag,'N') not in ('Y','X')
           and pickable_flag = 'Y'
           and source_code = 'OE'
           and organization_id in
                          (select organization_id
                             from mtl_parameters
                            where master_organization_id = l_master_org)
           and rownum = 1;
Line: 583

  select count(1) into l_org_count
     from oe_order_lines_all
    where inventory_item_id = p_item_id
      and open_flag  = 'Y'	-- Bug 8247770
      and cancelled_flag = 'N'
      and ship_from_org_id = p_org_id
      and rownum = 1;
Line: 592

        select master_organization_id into l_master_org
          from mtl_parameters
         where organization_id = p_org_id;
Line: 596

     select count(1) into l_master_count
     from oe_order_lines_all
    where inventory_item_id = p_item_id
      and open_flag  = 'Y'	-- Bug 8247770
      and cancelled_flag = 'N'
      and ship_from_org_id in (select organization_id
                                   from mtl_parameters
                                  where master_organization_id = l_master_org)
      and rownum = 1;
Line: 620

  select count(1) into l_org_count
     from oe_order_lines_all
    where inventory_item_id = p_item_id
      and open_flag  = 'Y'	-- Bug 8247770
      and cancelled_flag = 'N'
      and ship_from_org_id = p_org_id
      and rownum = 1;
Line: 630

        select master_organization_id into l_master_org
          from mtl_parameters
         where organization_id = p_org_id;
Line: 634

        select count(1) into l_master_count
          from oe_order_lines_all
         where inventory_item_id = p_item_id
           and open_flag  = 'Y'	-- Bug 8247770
	   and cancelled_flag = 'N'
           and ship_from_org_id in
                          (select organization_id
                             from mtl_parameters
                            where master_organization_id = l_master_org)
           and rownum = 1;