DBA Data[Home] [Help]

APPS.MRP_CL_FUNCTION SQL Statements

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

Line: 28

     SELECT APPLICATION_ID
       INTO lv_application_id
       FROM FND_APPLICATION_VL
      WHERE APPLICATION_NAME = p_application_name;
Line: 59

            SELECT USER_ID
               INTO lv_user_id
               FROM FND_USER
             WHERE USER_NAME = p_user_name;
Line: 87

     SELECT default_abc_assignment_group
       FROM MRP_PARAMETERS
      WHERE ORGANIZATION_ID = ORG_ID;
Line: 111

  SELECT NVL(cst.tl_resource,0)
	+ NVL(cst.tl_overhead,0)
	+ NVL(cst.tl_material_overhead,0)
	+ NVL(cst.tl_outside_processing,0)
  FROM cst_item_costs cst,
       cst_cost_types cct
  WHERE cct.costing_method_type = p_primary_cost_method
    AND cct.cost_type_id = DECODE(p_primary_cost_method,1,1,2,2,1)
    AND cst.cost_type_id = cct.cost_type_id
    AND cst.inventory_item_id = p_item_id
    AND cst.organization_id = p_org_id;
Line: 124

  SELECT NVL(cst.tl_resource,0)
	+ NVL(cst.tl_overhead,0)
	+ NVL(cst.tl_material_overhead,0)
	+ NVL(cst.tl_outside_processing,0)
  FROM cst_cost_types cct,
	cst_item_costs cst
  WHERE cst.cost_type_id = cct.default_cost_type_id
    AND cct.costing_method_type = p_primary_cost_method
    AND cct.cost_type_id = DECODE(p_primary_cost_method,1,1,2,2,1)
    AND cst.inventory_item_id = p_item_id
    AND cst.organization_id = p_org_id;
Line: 163

  SELECT NVL(cst.item_cost,0)
  FROM cst_item_costs cst,
       cst_cost_types cct
  WHERE cct.costing_method_type = p_primary_cost_method
    AND cct.cost_type_id = DECODE(p_primary_cost_method,1,1,2,2,1)
    AND cst.cost_type_id = cct.cost_type_id
    AND cst.inventory_item_id = p_item_id
    AND cst.organization_id = p_org_id;
Line: 173

  SELECT NVL(cst.item_cost,0)
  FROM cst_cost_types cct,
	cst_item_costs cst
  WHERE cst.cost_type_id = cct.default_cost_type_id
    AND cct.costing_method_type = p_primary_cost_method
    AND cct.cost_type_id = DECODE(p_primary_cost_method,1,1,2,2,1)
    AND cst.inventory_item_id = p_item_id
    AND cst.organization_id = p_org_id;
Line: 216

   SELECT round(list_price,NVL(spl.rounding_factor,2))
     from oe_price_list_lines sopl,
          oe_price_lists spl
   where spl.price_list_id  = arg_price_list_id
   and   sopl.price_list_id  = spl.price_list_id
   and   sopl.inventory_item_id = arg_item_id
   and   nvl(sopl.unit_code,' ') = nvl(arg_uom_code,' ')
   and   sysdate between nvl(sopl.start_date_active, sysdate-1)
		  and nvl(sopl.end_date_active, sysdate+1);
Line: 238

   select round(operand,-1*(nvl(qplh.rounding_factor,2)))
     from qp_list_headers_b qplh,
          qp_list_lines qpl,
          qp_pricing_attributes qpa
    where qplh.list_header_id = p_price_list_id
      and qpl.list_header_id + 0 = qplh.list_header_id
      and qpl.list_line_id = qpa.list_line_id
      and qpa.product_attribute_context = 'ITEM'
      and qpa.product_attribute = 'PRICING_ATTRIBUTE1'
      and qpa.product_attr_value = p_item_id
      and ( qpa.product_uom_code = p_uom_code
            OR ( qpa.product_uom_code IS NULL
                 AND p_uom_code IS NULL))
      and ( qpl.start_date_active <= sysdate
            OR qpl.start_date_active IS NULL)
      and ( qpl.end_date_active >= sysdate
            OR qpl.end_date_active IS NULL);
Line: 257

     SELECT ROUND(QPL.OPERAND,-1 * (NVL(QPLH.ROUNDING_FACTOR,2)))
       FROM
         QP_PRICING_ATTRIBUTES QPA  ,
         QP_LIST_LINES QPL,
         QP_LIST_HEADERS_B QPLH
     WHERE QPA.PRICING_PHASE_ID = 1
     AND QPA.QUALIFICATION_IND = 4
     AND QPA.PRODUCT_ATTRIBUTE_CONTEXT = 'ITEM'
     AND QPA.PRODUCT_ATTRIBUTE = 'PRICING_ATTRIBUTE1'
     AND QPA.PRODUCT_ATTR_VALUE = p_item_id
     AND QPA.LIST_HEADER_ID = v_price_list_id
     AND QPL.LIST_LINE_ID = QPA.LIST_LINE_ID
     AND QPL.LIST_HEADER_ID = QPLH.LIST_HEADER_ID
     AND QPA.PRODUCT_UOM_CODE = p_uom_code
     AND (QPL.START_DATE_ACTIVE <= SYSDATE  OR QPL.START_DATE_ACTIVE IS NULL )
     AND (QPL.END_DATE_ACTIVE >= SYSDATE  OR QPL.END_DATE_ACTIVE IS NULL) ;
Line: 276

     SELECT ROUND(QPL.OPERAND,-1 * (NVL(QPLH.ROUNDING_FACTOR,2)))
       FROM QP_PRICING_ATTRIBUTES QPA  ,
            QP_LIST_LINES QPL,
            QP_LIST_HEADERS_B QPLH
     WHERE QPA.PRICING_PHASE_ID = 1
       AND QPA.QUALIFICATION_IND = 4
       AND QPA.PRODUCT_ATTRIBUTE_CONTEXT = 'ITEM'
       AND QPA.PRODUCT_ATTRIBUTE = 'PRICING_ATTRIBUTE1'
       AND QPA.PRODUCT_ATTR_VALUE = p_item_id
       AND QPA.LIST_HEADER_ID = v_price_list_id
       AND QPL.LIST_LINE_ID = QPA.LIST_LINE_ID
       AND QPL.LIST_HEADER_ID = QPLH.LIST_HEADER_ID
       AND QPA.PRODUCT_UOM_CODE IS NULL
       AND (QPL.START_DATE_ACTIVE <= SYSDATE  OR QPL.START_DATE_ACTIVE IS NULL )
       AND (QPL.END_DATE_ACTIVE >= SYSDATE  OR QPL.END_DATE_ACTIVE IS NULL) ;
Line: 328

  SELECT  DOCUMENT_HEADER_ID    ,   DOCUMENT_LINE_ID
  FROM    po_asl_documents
  WHERE   asl_id = p_asl_id
    AND   using_organization_id = -1
    AND   DOCUMENT_TYPE_CODE = 'BLANKET'; --??
Line: 336

  SELECT NVL(pll.unit_price,0) unit_price
  FROM   po_lines_all pll
  WHERE  po_line_id = c_line_id
  and    po_header_id = c_header_id
  and    item_id = p_item_id
  and    (pll.cancel_date is null OR
          pll.cancel_date >= SYSDATE)
  and    (pll.closed_date is null OR
          pll.closed_date >= SYSDATE)
  and    (pll.expiration_date is null OR
          pll.expiration_date >= SYSDATE);
Line: 397

        v_sql_stmt1 :=  ' SELECT bos.Operation_Seq_Num, nvl(bos.reverse_cumulative_yield,1), wo.quantity_waiting_to_move '
                      ||'             , nvl(wo.operation_sequence_id,wo.previous_operation_seq_id) '
                      ||' FROM   MRP_SN_OPR_SEQS bos,                  '
                      ||'        MRP_SN_WOPRS wo                       '
                      ||' WHERE  wo.organization_id =  :p_org_id       '
                      ||' AND    wo.wip_entity_id =  :p_wip_entity_id  '
                      ||' AND    (wo.quantity_in_queue <> 0 OR         '
                      ||'         wo.quantity_running  <> 0 OR         '
                      ||'         wo.quantity_waiting_to_move <> 0)    '
                      ||' AND nvl(wo.operation_sequence_id,wo.previous_operation_seq_id) = bos.operation_sequence_id ';
Line: 423

          v_sql_stmt2 :=  ' SELECT   nvl(bos.reverse_cumulative_yield,1)              '
                        ||'  FROM    MRP_SN_OPR_SEQS bos,                             '
                        ||'          MRP_SN_OPR_NETWORKS bon                          '
                        ||' WHERE    bon.from_op_seq_id  =  :curr_op_seq_id           '
                        ||'  AND     bon.to_op_seq_id    =  bos.operation_sequence_id '
                        ||'  AND     bon.transition_type =  1                         ';
Line: 444

           SELECT  nvl(wsc.split,100)
             INTO  v_split
             FROM  wsm_Co_products wsc
            WHERE  wsc.bill_sequence_id is not null
              AND  wsc.split > 0
              AND  wsc.bill_Sequence_id = p_bill_seq_id;
Line: 490

     v_sql_stmt1 := ' Select wdj.status_type, decode(wdj.status_type, 1, (select nvl(bos.reverse_cumulative_yield,1) from MRP_SN_LJ_OPRS bos where bos.wip_entity_id = wdj.wip_entity_id and upper(bos.Network_start_end) = ''S''),1) from '
                    ||'  MRP_SN_DSCR_JOBS wdj '
                    ||'  Where wdj.wip_entity_id = :p_wip_entity_id ';
Line: 506

        v_sql_stmt1 :=  ' SELECT bos.Operation_Seq_Num, nvl(bos.reverse_cumulative_yield,1), wo.quantity_waiting_to_move '
                      ||'             , nvl(wo.operation_sequence_id,wo.previous_operation_seq_id) '
                      ||' FROM   MRP_SN_LJ_OPRS bos,                  '
                      ||'        MRP_SN_WOPRS wo    '
                      ||' WHERE  wo.organization_id =  :p_org_id       '
                      ||' AND    wo.wip_entity_id =  :p_wip_entity_id  '
                      ||' AND    (wo.quantity_in_queue <> 0 OR         '
                      ||'         wo.quantity_running  <> 0 OR         '
                      ||'         wo.quantity_waiting_to_move <> 0)    '
                      ||' AND    bos.wip_entity_id = wo.wip_entity_id  '
                      ||' AND nvl(wo.operation_sequence_id,wo.previous_operation_seq_id) = bos.operation_sequence_id ';
Line: 533

          v_sql_stmt2 :=  ' SELECT   nvl(bos.reverse_cumulative_yield,1)              '
                        ||'  FROM    MRP_SN_LJ_OPRS bos,                             '
                        ||'          MRP_SN_LJ_OPR_NWK bon                          '
                        ||' WHERE    bon.from_op_seq_id  =  :curr_op_seq_id           '
                        ||'  AND     bon.wip_entity_id = :p_wip_entity_id    '
                        ||'  AND     bon.wip_entity_id = bos.wip_entity_id   '
                        ||'  AND     bon.to_op_seq_id    =  bos.operation_sequence_id '
                        ||'  AND     bon.transition_type =  1                         ';
Line: 558

           SELECT  nvl(wsc.split,100)
             INTO  v_split
             FROM  wsm_Co_products wsc
            WHERE  wsc.bill_sequence_id is not null
              AND  wsc.split > 0
              AND  wsc.bill_Sequence_id = p_bill_seq_id;
Line: 609

      SELECT  nvl(wdj.common_routing_sequence_id,wdj.routing_reference_id)
      into    v_routing_seq_id
      FROM    wip_discrete_jobs wdj
      WHERE   wdj.wip_entity_id  = p_wip_entity_id
      AND     wdj.organization_id = p_org_id;
Line: 639

	select reverse_cumulative_yield
	into lv_rev_cum
	from bom_operation_sequences
	where operation_sequence_id = v_operation_sequence_id;
Line: 652

           select  wsc.split
             into  v_split
             from  wsm_Co_products wsc
            where  wsc.bill_sequence_id is not null
             and   wsc.split > 0
             and   wsc.bill_Sequence_id = p_bill_seq_id;
Line: 689

      SELECT  bos.reverse_cumulative_yield
      FROM    wip_operations wo,
              bom_operation_sequences bos
      WHERE   wo.wip_entity_id  = p_wip_entity_id
      AND   wo.organization_id = p_org_id
      AND (wo.quantity_in_queue <> 0 or
              wo.quantity_running  <> 0 or
              wo.quantity_waiting_to_move <> 0)
      AND nvl(wo.operation_sequence_id,wo.previous_operation_seq_id) = bos.operation_sequence_id;
Line: 739

      SELECT  nvl(wdj.common_routing_sequence_id,wdj.routing_reference_id)
      into    v_routing_seq_id
      FROM    wip_discrete_jobs wdj
      WHERE   wdj.wip_entity_id  = p_wip_entity_id
      AND     wdj.organization_id = p_org_id;
Line: 770

	select reverse_cumulative_yield
	into lv_rev_cum
	from bom_operation_sequences
	where operation_sequence_id = v_operation_sequence_id;
Line: 803

  SELECT conversion_rate
     FROM  mtl_uom_conversions muc
     WHERE muc.uom_code = user_uom_code
     AND   muc.inventory_item_id = 0
     AND   NVL(muc.disable_date, SYSDATE + 1) > SYSDATE
     AND   EXISTS (SELECT 1 from mtl_units_of_measure_tl b
                     WHERE b.uom_code = prf_uom_code
                     AND b.uom_class = muc.uom_class);
Line: 849

               SELECT conversion_rate
               INTO   lv_day_conversion_rate
               FROM   mtl_uom_conversions muc
               WHERE  muc.uom_code = lv_day_uom_code
               AND    muc.inventory_item_id = 0
               AND    NVL(muc.disable_date, SYSDATE + 1) > SYSDATE;
Line: 903

                SELECT nvl(conversion_rate,1/24)
                INTO   lv_hr_conversion_rate
                FROM   mtl_uom_conversions muc
                WHERE  muc.uom_code = lv_hr_uom_code
                AND    muc.inventory_item_id = 0
                AND    NVL(muc.disable_date, SYSDATE + 1) > SYSDATE;
Line: 958

     select uom_code
     into   lv_uom_code
     from   mtl_units_of_measure
     where uom_class = v_yield_uom_class
     and base_uom_flag = 'Y';
Line: 994

    SELECT NVL(SUM(decode(basis_type,
                      BASIS_RESOURCE_VALUE, res_cost * NVL(rate_or_amount,0),
                                            NVL(rate_or_amount,0)
                      )
                  ),0)
    INTO    v_overhead
    FROM    cst_department_overheads
    WHERE   organization_id = org_id
    AND     department_id = dept_id
    AND     cost_type_id = CST_FROZEN
    AND     basis_type in (BASIS_RESOURCE_VALUE, BASIS_RESOURCE_UNITS)
    AND     overhead_id IN (SELECT  overhead_id
              FROM cst_resource_overheads res
              WHERE res.organization_id =  org_id
              AND res.resource_id = res_id
              AND cost_type_id = CST_FROZEN);
Line: 1030

 	select nvl(fpi.patch_level, 'Not Available')
	into lv_patch_level
        from   fnd_application_vl fav, fnd_product_installations fpi
        where fav.application_id = fpi.application_id and
        fpi.APPLICATION_ID in (702);
Line: 1075

 	SELECT count(1) into lv_ahl_exists  FROM all_tab_columns
 	WHERE (OWNER, TABLE_NAME, COLUMN_NAME) in ((l_applsys_schema_ahl, 'AHL_SCHEDULE_MATERIALS', 'COMPLETED_QUANTITY'));
Line: 1108

        v_sql_stmt1 :=  ' SELECT bos.Operation_Seq_Num, nvl(bos.reverse_cumulative_yield,1), wo.quantity_waiting_to_move '
                      ||'             , nvl(wo.operation_sequence_id,wo.previous_operation_seq_id) '
                      ||' FROM   MRP_SN_OPR_SEQS bos,                  '
                      ||'        MRP_SN_WOPRS wo                       '
                      ||' WHERE  wo.organization_id =  :p_org_id       '
                      ||' AND    wo.wip_entity_id =  :p_wip_entity_id  '
                      ||' AND    (wo.quantity_in_queue <> 0 OR         '
                      ||'         wo.quantity_running  <> 0 OR         '
                      ||'         wo.quantity_waiting_to_move <> 0)    '
                      ||' AND nvl(wo.operation_sequence_id,wo.previous_operation_seq_id) = bos.operation_sequence_id ';
Line: 1151

        v_sql_stmt1 :=  ' SELECT wo1.Wsm_Op_Seq_Num '
                      ||' FROM   MRP_SN_WOPRS wo,                      '
                      ||' MRP_SN_WOPRS wo1                             '
                      ||' WHERE  wo.organization_id =  :p_org_id       '
                      ||' AND    wo.wip_entity_id =  :p_wip_entity_id  '
                      ||' AND    (wo.quantity_in_queue <> 0 OR         '
                      ||'         wo.quantity_running  <> 0 OR         '
                      ||'         wo.quantity_waiting_to_move <> 0)    '
                      ||' AND    wo1.wip_entity_id = wo.wip_entity_id  '
                      ||' AND    nvl(wo.operation_sequence_id,wo.previous_operation_seq_id) = wo1.operation_sequence_id'
                      ||' AND    rownum=1';
Line: 1195

     v_sql_stmt := ' Select wdj.status_type from '
                    ||'  MRP_SN_DSCR_JOBS wdj '
                    ||'  Where wdj.wip_entity_id = :p_wip_entity_id ';
Line: 1210

        v_sql_stmt :=  ' SELECT wo.Operation_Seq_Num '
                      ||'             FROM   MRP_SN_WOPRS wo '
                      ||' WHERE  wo.organization_id =  :p_org_id       '
                      ||' AND    wo.wip_entity_id =  :p_wip_entity_id  ';
Line: 1227

        v_sql_stmt :=  ' SELECT wo.Operation_Seq_Num '
                      ||'             FROM   MRP_SN_WOPRS wo '
                      ||' WHERE  wo.organization_id =  :p_org_id       '
                      ||' AND    wo.wip_entity_id =  :p_wip_entity_id  '
                      ||' AND    (wo.quantity_in_queue <> 0 OR         '
                      ||'         wo.quantity_running  <> 0 OR         '
                      ||'         wo.quantity_waiting_to_move <> 0) ' ;
Line: 1264

       v_sql_stmt :=  ' SELECT nvl(wo.wsm_op_seq_num,50000) '
                      ||'             FROM MRP_SN_WOPRS wo '
                      ||' WHERE  wo.organization_id =  :p_org_id       '
                      ||' AND    wo.wip_entity_id =  :p_wip_entity_id  '
                      ||' AND    (wo.quantity_in_queue <> 0 OR         '
                      ||'         wo.quantity_running  <> 0 OR         '
                      ||'         wo.quantity_waiting_to_move <> 0) ' ;
Line: 1314

   v_temp_sql_stmt :=   ' SELECT   ROUTING_SEQUENCE_ID  '
                      ||'   FROM   MRP_SN_OPR_RTNS  '
                      ||'  WHERE   ASSEMBLY_ITEM_ID = :p_primary_item_id '
                      ||'    AND   ORGANIZATION_ID = :p_org_id '
                      ||'    AND   nvl(ALTERNATE_ROUTING_DESIGNATOR,''-1'') = :p_alt_ROUTING_DESIG '
                      ||'    AND   COMMON_ROUTING_SEQUENCE_ID = :p_common_rout_seq_id  ';
Line: 1345

      ' select need_by_date '
    ||' from ( '
    ||'      SELECT revision_num, '
    ||'             need_by_date, '
    ||'             quantity, '
    ||'             RANK() OVER (PARTITION BY LINE_LOCATION_ID, PO_HEADER_ID,PO_LINE_ID '
    ||'                          order by revision_num) as seqnumber '
    ||'             FROM po_line_locations_archive_all '
    ||'             where PO_HEADER_ID = :p_po_header_id '
    ||'             and   po_line_id = :p_po_line_id '
    ||'             and   line_location_id = :p_po_line_location_id '
    ||'     ) '
    ||'     where  seqnumber = 1 ';
Line: 1381

      ' select quantity '
    ||' from ( '
    ||'      SELECT revision_num,  '
    ||'             need_by_date,  '
    ||'             quantity,      '
    ||'             RANK() OVER (PARTITION BY LINE_LOCATION_ID, PO_HEADER_ID,PO_LINE_ID '
    ||'                          order by revision_num) as seqnumber '
    ||'             FROM po_line_locations_archive_all '
    ||'             where PO_HEADER_ID = :p_po_header_id '
    ||'             and   po_line_id = :p_po_line_id '
    ||'             and   line_location_id = :p_po_line_location_id '
    ||'     ) '
    ||'     where  seqnumber = 1 ';
Line: 1422

  SELECT NVL(FND_PROFILE.VALUE('MSC_COST_TYPE'),
  DECODE(cost_org.primary_cost_method,1,1,2,cost_org.AVG_RATES_COST_TYPE_ID,1))
  FROM mtl_parameters org, mtl_parameters cost_org
  WHERE org.cost_organization_id = cost_org.organization_id
  and   org.organization_id = p_org_id;
Line: 1429

  SELECT NVL(FND_PROFILE.VALUE('MSC_COST_TYPE'),1)
  FROM dual;
Line: 1450

FUNCTION  MAP_REGION_TO_SITE (p_last_update_date in DATE)
RETURN NUMBER
IS

Cursor regions_update is
select max(LAST_UPDATE_DATE)
from WSH_REGIONS;
Line: 1458

Cursor po_vendors_update(p_date DATE) is
select vendor_site_id
from PO_VENDOR_SITES_ALL
where last_update_date >= p_date and creation_date < p_date;
Line: 1464

select vendor_site_id,country,state,city,zip
from PO_VENDOR_SITES_ALL;
Line: 1468

select vendor_site_id,country,state,city,zip
from PO_VENDOR_SITES_ALL
where last_update_date >= p_date;
Line: 1491

region_last_update  DATE := NULL;
Line: 1501

  SELECT SYSDATE,
         FND_GLOBAL.USER_ID
  INTO   v_current_date,
         v_current_user
  FROM   DUAL;
Line: 1507

  OPEN regions_update;
Line: 1508

    FETCH regions_update into region_last_update;
Line: 1509

  CLOSE regions_update;
Line: 1512

  IF  region_last_update is NULL THEN
    Return(1);
Line: 1517

  IF (p_last_update_date is NULL) OR (region_last_update >= p_last_update_date) THEN
    -- delete mrp_region_sites completely.
    DELETE FROM MRP_REGION_SITES;
Line: 1531

    OPEN po_vendors_update (p_last_update_date);
Line: 1532

    FETCH po_vendors_update BULK COLLECT
    INTO l_vendor_site_tab1;
Line: 1534

    CLOSE po_vendors_update;
Line: 1539

        DELETE FROM MRP_REGION_SITES
        where vendor_site_id =l_vendor_site_tab1(j);
Line: 1543

        MRP_CL_REFRESH_SNAPSHOT.LOG_DEBUG('There was an error in DELETEING Region to Sites');
Line: 1549

    OPEN new_vendor_sites(p_last_update_date);
Line: 1600

      INSERT INTO MRP_REGION_SITES(region_id,vendor_site_id, region_type, zone_level, last_update_date, last_updated_by, creation_date, created_by)
      VALUES (l_region_id_tab(k), l_vendor_site_tab(i),l_region_type_tab(k),l_zone_level_tab(k), v_current_date, v_current_user, v_current_date, v_current_user);
Line: 1622

   select set_name into l_set_name
   from oe_sets
   where set_id=p_SHIP_SET_ID;
Line: 1649

   select set_name into l_set_name
   from oe_sets
   where set_id=p_ARRIVAL_SET_ID;
Line: 1711

            SELECT
               SITE_USES_ALL.site_use_id SR_TP_SITE_ID
            INTO
                lv_cmro_ship_to
            FROM
               HZ_CUST_ACCT_SITES_ALL ACCT_SITE,
               HZ_CUST_SITE_USES_ALL SITE_USES_ALL,
               HZ_CUST_ACCOUNTS CUST_ACCT,
               HR_ORGANIZATION_INFORMATION O,
               HR_ALL_ORGANIZATION_UNITS_TL OTL
            WHERE OTL.ORGANIZATION_ID = SITE_USES_ALL.ORG_ID
            AND O.ORGANIZATION_ID = OTL.ORGANIZATION_ID
            AND O.ORG_INFORMATION_CONTEXT = 'Operating Unit Information'
            AND OTL.LANGUAGE = userenv('LANG')
            AND SITE_USES_ALL.ORG_ID is NOT NULL
            AND SITE_USES_ALL.CUST_ACCT_SITE_ID=ACCT_SITE.CUST_ACCT_SITE_ID
            AND ACCT_SITE.CUST_ACCOUNT_ID = CUST_ACCT.CUST_ACCOUNT_ID
            AND CUST_ACCT.CUST_ACCOUNT_ID = lv_customer_id;
Line: 1759

            SELECT
               SITE_USES_ALL.site_use_id SR_TP_SITE_ID
            INTO
                lv_cmro_bill_to
            FROM
               HZ_CUST_ACCT_SITES_ALL ACCT_SITE,
               HZ_CUST_SITE_USES_ALL SITE_USES_ALL,
               HZ_CUST_ACCOUNTS CUST_ACCT,
               HR_ORGANIZATION_INFORMATION O,
               HR_ALL_ORGANIZATION_UNITS_TL OTL
            WHERE OTL.ORGANIZATION_ID = SITE_USES_ALL.ORG_ID
            AND O.ORGANIZATION_ID = OTL.ORGANIZATION_ID
            AND O.ORG_INFORMATION_CONTEXT = 'Operating Unit Information'
            AND OTL.LANGUAGE = userenv('LANG')
            AND SITE_USES_ALL.ORG_ID is NOT NULL
            AND SITE_USES_ALL.CUST_ACCT_SITE_ID=ACCT_SITE.CUST_ACCT_SITE_ID
            AND ACCT_SITE.CUST_ACCOUNT_ID = CUST_ACCT.CUST_ACCOUNT_ID
            AND CUST_ACCT.CUST_ACCOUNT_ID = lv_customer_id;
Line: 1798

 	select nvl(fpi.patch_level, 'Not Available')
	into lv_patch_level
        from   fnd_application_vl fav, fnd_product_installations fpi
        where fav.application_id = fpi.application_id and
        fpi.APPLICATION_ID in (665);
Line: 1852

          SELECT USER_ID
            INTO l_user_id
            FROM FND_USER
           WHERE USER_NAME = p_user_name;
Line: 1916

       select 1
         into lv_result
         from   fnd_responsibility resp
               , FND_USER_RESP_GROUPS user_resp
        where resp.responsibility_id = user_resp.responsibility_id
          and resp.application_id = user_resp.responsibility_application_id
          and resp.responsibility_key = 'APS_COLLECTIONS'
          and user_resp.user_id = pUSERID
          and rownum =1 ;
Line: 1928

       select 1
         into lv_result
         from fnd_responsibility resp,
                FND_USER_RESP_GROUPS user_resp
        where resp.responsibility_id = user_resp.responsibility_id
          and resp.application_id = user_resp.responsibility_application_id
          and resp.responsibility_key = 'APS_RELEASE'
          and user_resp.user_id = pUSERID
          and rownum =1 ;
Line: 1971

       select resp.responsibility_id, resp.application_id
         into lv_resp_id, lv_application_id
         from fnd_responsibility resp,
                FND_USER_RESP_GROUPS user_resp
        where resp.responsibility_id = user_resp.responsibility_id
          and resp.application_id = user_resp.responsibility_application_id
          and resp.responsibility_key = 'APS_COLLECTIONS'
          and user_resp.user_id = pUSERID
          and rownum =1 ;
Line: 1983

       select resp.responsibility_id, resp.application_id
         into lv_resp_id, lv_application_id
         from fnd_responsibility resp,
                FND_USER_RESP_GROUPS user_resp
        where resp.responsibility_id = user_resp.responsibility_id
          and resp.application_id = user_resp.responsibility_application_id
          and resp.responsibility_key = 'APS_RELEASE'
          and user_resp.user_id = pUSERID
          and rownum =1 ;