DBA Data[Home] [Help]

APPS.RLM_REPLACE_SV SQL Statements

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

Line: 161

  SELECT   header_id
  FROM     rlm_schedule_headers
  WHERE    schedule_type               = x_sched_rec.schedule_type
  AND      schedule_purpose            in (RLM_DP_SV.k_REPLACE, RLM_DP_SV.k_REPLACE_ALL)
  AND      schedule_source             <> RLM_DP_SV.k_MANUAL
  -- AND   customer_id = x_sched_rec.customer_id
  AND      ece_tp_translator_code      = x_sched_rec.ece_tp_translator_code
  AND      ece_tp_location_code_ext    = x_sched_rec.ece_tp_location_code_ext
  AND      NVL(edi_test_indicator,'P') = NVL(x_sched_rec.edi_test_indicator,'P')
  AND	   process_status	       IN (5,7)
  AND      sched_generation_date       < x_sched_rec.sched_generation_date
-- bug 4198327
  ORDER BY sched_generation_date DESC, program_update_date desc;
Line: 244

  SELECT   rsl.ship_from_org_id,
           rsl.ship_to_address_id,
           rsl.ship_to_org_id,
           rsl.customer_item_id
  FROM     rlm_schedule_lines_all rsl
  WHERE    rsl.header_id  = x_prev_header_id
  AND      rsl.item_detail_type  IN (0,1,2)
  AND      NOT EXISTS ( SELECT 'X'
                   FROM rlm_interface_lines ril
                   WHERE ril.header_id  = x_curr_header_id
                   AND ril.ship_from_org_id = rsl.ship_from_org_id
                   AND ril.ship_to_address_id = rsl.ship_to_address_id
                   AND ril.ship_to_org_id = rsl.ship_to_org_id
                   AND ril.customer_item_id = rsl.customer_item_id
                   AND ril.item_detail_type IN (0,1,2))
  AND      NOT EXISTS ( SELECT 'X'                 --Bugfix 8844817
                   FROM rlm_schedule_lines rsl2
                   WHERE rsl2.header_id  = x_curr_sch_header_id
                   AND rsl2.ship_from_org_id = rsl.ship_from_org_id
                   AND rsl2.ship_to_address_id = rsl.ship_to_address_id
                   AND rsl2.ship_to_org_id = rsl.ship_to_org_id
                   AND rsl2.customer_item_id = rsl.customer_item_id
                   AND rsl2.item_detail_type IN (0,1,2))
  GROUP BY rsl.ship_from_org_id,
           rsl.ship_to_address_id,
           rsl.ship_to_org_id,
           rsl.customer_item_id;
Line: 275

   SELECT oeh.order_number , oeh.header_id
     FROM   oe_order_lines_all oel ,
            oe_order_headers   oeh
     WHERE  oeh.header_id = oel.header_id
     AND    oel.ship_from_org_id   = v_ship_from_org_id
     AND    oel.ship_to_org_id     = v_ship_to_org_id
     AND    oel.ordered_item_id    = v_customer_item_id
     AND    oel.open_flag     = 'Y'
     AND    oel.source_document_type_id = '5';
Line: 429

     SELECT count(1)
     INTO   v_exist_count
     FROM   rlm_interface_lines_all
     WHERE  header_id          = x_curr_header_id
     AND    ship_from_org_id   = g_list_tbl(i).ship_from_org_id
     AND    ship_to_address_id = g_list_tbl(i).ship_to_address_id
     AND    customer_item_id   = g_list_tbl(i).customer_item_id;