DBA Data[Home] [Help]

APPS.M4R_3B2IN_PKG SQL Statements

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

Line: 51

     SELECT min(poh.ORG_ID)
     INTO p_org_id
     FROM
     po_headers_all poh,
     po_lines_all pol,
     po_line_locations_all pll,
     Mtl_system_items_kfv msi
    WHERE
     poh.SEGMENT1 = p_po_number AND
     nvl(msi.concatenated_segments, -99) = nvl(NVL(p_item_num, msi.concatenated_segments), -99) AND
     nvl(pol.VENDOR_PRODUCT_NUM, -99) = nvl(NVL(p_supplier_item_num, pol.VENDOR_PRODUCT_NUM), -99) AND
     pol.po_header_id =  poh.po_header_id AND
     pol.line_num = p_document_line_num AND
     pol.po_line_id = pll.po_line_id AND
     pll.shipment_num = p_document_shipment_line_num AND
     pll.ship_to_organization_id = msi.organization_id AND
     pol.item_id = msi.inventory_item_id (+);
Line: 69

     SELECT min(poh.ORG_ID)
     INTO p_org_id
     FROM
     po_headers_all poh,
     po_lines_all pol,
     po_line_locations_all pll,
     po_releases_all prl,
     Mtl_system_items_kfv msi
    WHERE
     poh.SEGMENT1 = p_po_number AND
     nvl(msi.concatenated_segments, -99) = nvl(NVL(p_item_num, msi.concatenated_segments), -99) AND
     nvl(pol.VENDOR_PRODUCT_NUM, -99) = nvl(NVL(p_supplier_item_num, pol.VENDOR_PRODUCT_NUM), -99) AND
     pol.po_header_id =  poh.po_header_id AND
     pol.line_num = p_document_line_num AND
     pol.po_line_id = pll.po_line_id AND
     pll.shipment_num = p_document_shipment_line_num AND
     pll.PO_RELEASE_ID = prl.PO_RELEASE_ID AND
     prl.release_num = p_release_num AND
     pll.ship_to_organization_id = msi.organization_id AND
     pol.item_id = msi.inventory_item_id (+);
Line: 93

     select min(po_header_id)
     into p_po_header_id
     from po_headers_all
     where segment1 = p_po_number
     and org_id = p_org_id;
Line: 102

          select
            min(pll.ship_to_organization_id)
          into
            p_ship_to_org_id
          from
            po_headers_all poh,
            po_lines_all pol,
            po_line_locations_all pll
          where
            poh.po_header_id = p_po_header_id and
            poh.po_header_id = pol.po_header_id and
            pol.line_num = p_document_line_num and
            pol.po_line_id = pll.po_line_id and
            pll.shipment_num = p_document_shipment_line_num;
Line: 117

          select
            min(pll.ship_to_organization_id)
          into
            p_ship_to_org_id
          from
            po_headers_all poh,
            po_lines_all pol,
            po_line_locations_all pll,
            po_releases_all prl
          where
            poh.po_header_id = p_po_header_id and
            poh.po_header_id = pol.po_header_id and
            pol.line_num = p_document_line_num and
            pol.po_line_id = pll.po_line_id and
            pll.shipment_num = p_document_shipment_line_num and
            pll.PO_RELEASE_ID = prl.PO_RELEASE_ID AND
            prl.release_num = p_release_num;
Line: 139

	 select
	 	poh.vendor_site_id,poh.vendor_id
	 into 	p_vendor_site_id, p_vendor_id
	 from
	 	po_headers_all poh
	 where
	    poh.po_header_id = p_po_header_id and
	    poh.segment1 =p_po_number;
Line: 154

	      SELECT location_id
     	  INTO  p_ship_to_location_id
     	  FROM hr_locations
     	  WHERE ECE_TP_LOCATION_CODE = p_ship_to_edi_location_code;
Line: 231

  select segment1 into x_po_num from po_headers_all where po_header_id=p_po_header_id;
Line: 235

 SELECT
   pol.ITEM_ID,
   msi.CONCATENATED_SEGMENTS ITEM_NUM,
   pol.ITEM_REVISION,
   pol.VENDOR_PRODUCT_NUM SUPPLIER_ITEM_NUMBER,
   pll.ship_to_location_id,
   pol.PO_LINE_ID,
   pll.LINE_LOCATION_ID,
   pll.SHIP_TO_ORGANIZATION_ID SHIP_TO_ORG_ID
 INTO
   p_item_id,
   p_item_num,
   p_item_revision,
   p_supplier_item_num,
   p_ship_to_location_id,
   p_po_line_id,
   p_line_location_id,
   p_ship_to_org_id
 FROM
  po_headers_all poh,
  po_lines_all pol,
  po_line_locations_all pll,
  MTL_SYSTEM_ITEMS_KFV MSI
 WHERE
  POH.PO_HEADER_ID = POL.PO_HEADER_ID
  and POL.PO_LINE_ID = PLL.PO_LINE_ID
  and pol.item_id = msi.inventory_item_id (+)
  and nvl(msi.ORGANIZATION_ID, pll.SHIP_TO_ORGANIZATION_ID) = pll.SHIP_TO_ORGANIZATION_ID
  and poh.PO_HEADER_ID = p_po_header_id
  and pol.LINE_NUM = p_line_num
  and pll.shipment_num = p_document_shipment_line_num;
Line: 267

  SELECT
   pol.ITEM_ID,
   msi.CONCATENATED_SEGMENTS ITEM_NUM,
   pol.ITEM_REVISION,
   pol.VENDOR_PRODUCT_NUM SUPPLIER_ITEM_NUMBER,
   pll.ship_to_location_id,
   pol.PO_LINE_ID,
   pll.LINE_LOCATION_ID,
   pll.SHIP_TO_ORGANIZATION_ID SHIP_TO_ORG_ID,
   prl.PO_RELEASE_ID
INTO
   p_item_id,
   p_item_num,
   p_item_revision,
   p_supplier_item_num,
   p_ship_to_location_id,
   p_po_line_id,
   p_line_location_id,
   p_ship_to_org_id,
   p_po_release_id
FROM
   po_headers_all poh,
   po_lines_all pol,
   po_line_locations_all pll,
   po_releases_all prl,
   MTL_SYSTEM_ITEMS_KFV MSI
WHERE
  POH.PO_HEADER_ID = POL.PO_HEADER_ID
  and POL.PO_LINE_ID = PLL.PO_LINE_ID
  and pll.PO_RELEASE_ID = prl.PO_RELEASE_ID
  and pol.item_id = msi.inventory_item_id (+)
  and nvl(msi.ORGANIZATION_ID, pll.SHIP_TO_ORGANIZATION_ID) = pll.SHIP_TO_ORGANIZATION_ID
  and poh.PO_HEADER_ID = p_po_header_id
  and pol.LINE_NUM = p_line_num
  and pll.shipment_num = p_document_shipment_line_num
  and prl.release_num = p_release_num;
Line: 333

  select count(*)
  into l_count
  from mtl_units_of_measure_tl
  where uom_code = p_uom_code
  and language = USERENV('LANG');
Line: 353

   select unit_of_measure
   into p_unit_of_measure
   from mtl_units_of_measure_tl
   where uom_code = p_uom_code
   and language = USERENV('LANG');
Line: 410

   select count(*)
   into x_ship_org_count
   from (select distinct to_organization_id
         from rcv_transactions_interface
         where header_interface_id = p_header_interface_id);
Line: 421

    select
     min(to_organization_id),
     min(vendor_id),
     min(vendor_site_id),
	 max(bill_of_lading),
	 max(waybill_airbill_num),
	 max(packing_slip)
   into
     p_ship_to_org_id,
     p_vendor_id,
     p_vendor_site_id,
     p_bill_of_lading,
	 p_waybill_airbill_num,
	 p_packing_slip
   from
    rcv_transactions_interface
   where
     header_interface_id = p_header_interface_id;
Line: 446

   update rcv_headers_interface
   set vendor_id = p_vendor_id,
       vendor_site_id = p_vendor_site_id,
       ship_to_organization_id = p_ship_to_org_id,
	   bill_of_lading = p_bill_of_lading,
       waybill_airbill_num =p_waybill_airbill_num,
       packing_slip = p_packing_slip
   where header_interface_id = p_header_interface_id;
Line: 455

   update rcv_transactions_interface
   set bill_of_lading = p_bill_of_lading,
       waybill_airbill_num =p_waybill_airbill_num,
       packing_slip = p_packing_slip
   where header_interface_id = p_header_interface_id;