DBA Data[Home] [Help]

APPS.PO_RELEASES_SV4 SQL Statements

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

Line: 44

		po_line_locations_pkg_s3.select_summary(X_release_id); */
Line: 62

	 SELECT ship_via_lookup_code
         INTO   X_ship_via_lookup_code
         FROM   po_headers
         WHERE  po_header_id = X_po_header_id;
Line: 76

            SELECT mp.organization_code
              INTO x_ship_to_org_code
              FROM financials_system_parameters fsp,
                   hr_organization_information hoi,
                   mtl_parameters mp
             WHERE mp.organization_id = p_ship_to_org_id
               AND mp.organization_id = hoi.organization_id
               AND hoi.org_information_context = 'Accounting Information'
               AND hoi.org_information1 = TO_CHAR(fsp.set_of_books_id);
Line: 142

         SELECT to_number(max(POR.release_num) + 1)
         FROM   po_releases POR
         WHERE  POR.po_header_id = X_po_header_id;
Line: 204

         select pll.po_release_id, pll.line_location_id
         into   X_po_release_id_record.po_release_id ,
                X_po_release_id_record.po_line_location_id
         from po_line_locations pll, po_releases pr where
         pll.po_line_id = nvl(X_po_release_id_record.po_line_id,pll.po_line_id) and --1830177
         pll.po_release_id = pr.po_release_id and
         pr.po_header_id   = X_po_release_id_record.po_header_id and
         pr.release_num = X_po_release_id_record.release_num and
         pll.shipment_num = X_po_release_id_record.shipment_num;
Line: 222

             select 1
             into   v_count
             from   po_releases
             where  po_header_id = X_po_release_id_record.po_header_id
               and  release_num  = X_po_release_id_record.release_num;
Line: 255

         select count(*) into v_count
         from po_line_locations pll, po_releases pr where
         pll.po_line_id = nvl(X_po_release_id_record.po_line_id,pll.po_line_id) and --1830177
         pll.po_release_id = pr.po_release_id and
         pr.po_header_id   = X_po_release_id_record.po_header_id and
         pr.release_num = X_po_release_id_record.release_num;
Line: 264

            select pll.po_release_id, pll.line_location_id, pll.shipment_num
            into   X_po_release_id_record.po_release_id ,
                   X_po_release_id_record.po_line_location_id,
                   X_po_release_id_record.shipment_num
            from po_line_locations pll, po_releases pr where
                 pll.po_line_id = nvl(X_po_release_id_record.po_line_id,pll.po_line_id) and --1830177
                 pll.po_release_id = pr.po_release_id and
                 pr.po_header_id   = X_po_release_id_record.po_header_id and
                 pr.release_num = X_po_release_id_record.release_num;
Line: 276

            select distinct pll.po_release_id
            into   X_po_release_id_record.po_release_id
            from po_line_locations pll, po_releases pr where
                 pll.po_line_id = nvl(X_po_release_id_record.po_line_id,pll.po_line_id) and--1830177
                 pll.po_release_id = pr.po_release_id and
                 pr.po_header_id   = X_po_release_id_record.po_header_id and
                 pr.release_num = X_po_release_id_record.release_num;
Line: 310

      select count(*) into v_count
      from po_line_locations pll
      where
          pll.po_line_id = X_po_release_id_record.po_line_id and
          pll.shipment_num = X_po_release_id_record.shipment_num;
Line: 318

         select pll.po_release_id, pll.line_location_id
         into  X_po_release_id_record.po_release_id ,
               X_po_release_id_record.po_line_location_id
         from po_line_locations pll
         where
             pll.po_line_id   = X_po_release_id_record.po_line_id and
             pll.shipment_num = X_po_release_id_record.shipment_num;
Line: 346

      select count(*) into v_count
      from po_line_locations pll
      where
          pll.po_line_id = X_po_release_id_record.po_line_id
      and NVL(pll.APPROVED_FLAG,'N')   = 'Y'
      and NVL(pll.CANCEL_FLAG, 'N')    = 'N'
      and NVL(pll.CLOSED_CODE,'OPEN') <> 'FINALLY CLOSED'
      and pll.SHIPMENT_TYPE IN ('STANDARD','BLANKET','SCHEDULED');
Line: 357

         select pll.po_release_id, pll.line_location_id, pll.shipment_num
         into  X_po_release_id_record.po_release_id ,
               X_po_release_id_record.po_line_location_id,
               X_po_release_id_record.shipment_num
         from po_line_locations pll
         where
             pll.po_line_id   = X_po_release_id_record.po_line_id
         and NVL(pll.APPROVED_FLAG,'N')   = 'Y' -- bug 610238 should include the same clause as above
         and NVL(pll.CANCEL_FLAG, 'N')    = 'N'
         and NVL(pll.CLOSED_CODE,'OPEN') <> 'FINALLY CLOSED'
         and pll.SHIPMENT_TYPE IN ('STANDARD','BLANKET','SCHEDULED');
Line: 403

         SELECT 'Y'
	      FROM   PO_HEADERS POH
	      WHERE  POH.po_header_id = X_po_header_id
         AND    TRUNC(X_release_date) BETWEEN
		   		 TRUNC(nvl(POH.start_date, X_release_date))
		               AND
			       TRUNC(nvl(POH.end_date, X_release_date));
Line: 456

         SELECT 'N'
	 FROM   PO_RELEASES POR
	 WHERE  POR.po_header_id = X_po_header_id
	 AND    POR.release_num  = X_release_num
	 AND    (X_rowid is null OR
		 X_rowid <> POR.rowid);
Line: 526

         SELECT 'Y'
	 FROM   PO_RELEASES POR
	 WHERE  POR.po_release_id  = X_po_release_id
	 AND (  POR.release_num   <> X_release_num
	 OR     POR.agent_id      <> X_agent_id
	 OR     POR.release_date  <> X_release_date
	 OR   ((POR.acceptance_required_flag <> X_acceptance_required_flag)
	     OR (POR.acceptance_required_flag IS NULL
		 AND
	         X_acceptance_required_flag IS NOT NULL)
	     OR (POR.acceptance_required_flag IS NOT NULL
	         AND
		 X_acceptance_required_flag IS NULL))
	 OR   ((POR.acceptance_due_date <> X_acceptance_due_date)
	     OR (POR.acceptance_due_date IS NULL
		 AND
	         X_acceptance_due_date IS NOT NULL)
	     OR (POR.acceptance_due_date IS NOT NULL
	         AND
		 X_acceptance_due_date IS NULL))
         -- 
	 OR   ((POR.shipping_control <> p_shipping_control)
	     OR (POR.shipping_control IS NULL
		 AND
	         p_shipping_control IS NOT NULL)
	     OR (POR.shipping_control IS NOT NULL
	         AND
		 p_shipping_control IS NULL))
         -- 
        );