DBA Data[Home] [Help]

APPS.PO_TOTALS_PO_SV SQL Statements

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

Line: 14

  SELECT nvl(fc.minimum_accountable_unit,1),
	 fc.precision
  INTO   x_min_unit,
         x_precision
  FROM   fnd_currencies			fc,
	 po_headers			ph
  WHERE  ph.po_header_id = X_header_id
  AND	 fc.currency_code   = ph.currency_code;
Line: 25

    SELECT round(((nvl(SUM((quantity - quantity_cancelled) * price_override),0)
			* x_min_unit) / x_min_unit),
                 x_precision)
	   into X_po_total
    FROM   po_line_locations
    WHERE  po_header_id = X_header_id
    AND    shipment_type IN ('STANDARD','PLANNED','BLANKET');
Line: 54

  SELECT nvl(fc.minimum_accountable_unit,1),
	 fc.precision
  INTO   x_min_unit,
         x_precision
  FROM   fnd_currencies			fc,
	 po_headers_archive              pha
  WHERE  pha.po_header_id = X_header_id
  AND	 pha.revision_num = X_revision_num
  AND	 fc.currency_code   = pha.currency_code;
Line: 66

    SELECT round(((nvl(SUM((quantity - quantity_cancelled) * price_override),0)
			* x_min_unit) / x_min_unit),
                 x_precision)
	   into X_po_total
    FROM   po_line_locations_archive plla1
    WHERE  po_header_id = X_header_id
    AND    shipment_type IN ('STANDARD','PLANNED','BLANKET')
    AND    revision_num = (
		SELECT
			max( plla2.revision_num )
		FROM
			po_line_locations_archive plla2
		WHERE
			plla2.revision_num <= X_revision_num
		AND	plla2.line_location_id = plla1.line_location_id )
    ;
Line: 104

  SELECT nvl(fc.minimum_accountable_unit,1),
	 fc.precision
  INTO   x_min_unit,
         x_precision
  FROM   fnd_currencies			fc,
	 po_headers_archive              pha,
	 po_releases_archive		pra
  WHERE  pha.po_header_id = pra.po_header_id
  AND	 pra.po_release_id = X_release_id
  AND	 pha.revision_num = X_revision_num
  AND	 fc.currency_code   = pha.currency_code
  AND    rownum < 2 ;
Line: 119

    SELECT round(((nvl(SUM((quantity - quantity_cancelled) * price_override),0)
			* x_min_unit) / x_min_unit),
                 x_precision)
	   into X_po_total
    FROM   po_line_locations_archive plla1
    WHERE  po_release_id = X_release_id
    AND    shipment_type IN ('STANDARD','PLANNED','BLANKET')
    AND    revision_num = (
		SELECT
			max( plla2.revision_num )
		FROM
			po_line_locations_archive plla2
		WHERE
			plla2.revision_num <= X_revision_num
		AND	plla2.line_location_id = plla1.line_location_id )
    ;
Line: 156

  SELECT nvl(fc.minimum_accountable_unit,1),
	 fc.precision
  INTO   x_min_unit,
         x_precision
  FROM   fnd_currencies			fc,
	 po_headers			ph,
	 po_releases			pr
  WHERE  ph.po_header_id = pr.po_header_id
  AND	 pr.po_release_id = X_release_id
  AND	 fc.currency_code   = ph.currency_code;
Line: 168

    SELECT round(((nvl(SUM((quantity - quantity_cancelled) * price_override),0)
			* x_min_unit) / x_min_unit),
                 x_precision)
	   into X_release_total
    FROM   po_line_locations
    WHERE  po_release_id = X_release_id;