DBA Data[Home] [Help]

APPS.POGOT_S SQL Statements

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

Line: 32

  SELECT GSB.currency_code,
         POH.currency_code
  INTO   x_base_currency,
         x_po_currency
  FROM   PO_HEADERS POH,
         FINANCIALS_SYSTEM_PARAMETERS FSP,
         GL_SETS_OF_BOOKS GSB
  WHERE  POH.po_header_id    = x_object_id
  AND    FSP.set_of_books_id = GSB.set_of_books_id;
Line: 56

  SELECT GSB.currency_code
  INTO   x_base_currency
  FROM   FINANCIALS_SYSTEM_PARAMETERS FSP,
         GL_SETS_OF_BOOKS GSB
  WHERE  FSP.set_of_books_id = GSB.set_of_books_id;
Line: 112

        SELECT
        nvl(sum
        (decode (x_base_min_unit, NULL,
                 round (decode (x_min_unit, NULL,
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0), x_precision),
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0) / x_min_unit) * x_min_unit)
                         * POD.rate, x_base_precision),
                 round (decode (x_min_unit, NULL,
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0), x_precision),
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0) / x_min_unit) *
                         x_min_unit) * POD.rate / x_base_min_unit) *
                         x_base_min_unit)), 0)
        INTO   x_result_fld
        FROM   PO_DISTRIBUTIONS POD, PO_LINE_LOCATIONS PLL
        WHERE  PLL.po_header_id     = x_object_id
        AND    PLL.shipment_type   in ('STANDARD','PLANNED', 'BLANKET')
        AND    PLL.line_location_id = POD.line_location_id;
Line: 146

      SELECT
      sum( decode (C.minimum_accountable_unit, NULL,
                   round ((PLL.quantity -
                           nvl(PLL.quantity_cancelled, 0)
                           ) * nvl(PLL.price_override, 0), C.precision),
                   round ((PLL.quantity -
                           nvl(PLL.quantity_cancelled, 0)
                           ) * nvl(PLL.price_override, 0) /
                           C.minimum_accountable_unit
                          ) * C.minimum_accountable_unit))
      INTO   x_result_fld
      FROM   PO_LINE_LOCATIONS PLL,
             PO_HEADERS PH,
             FND_CURRENCIES C
      WHERE  PLL.po_header_id   = x_object_id
      AND    PH.po_header_id    = PLL.po_header_id
      AND    PH.currency_code   = C.currency_code
      AND    PLL.shipment_type in ('STANDARD','PLANNED','BLANKET');
Line: 195

        SELECT
        nvl(sum
        (decode (x_base_min_unit, NULL,
                 round (decode (x_min_unit, NULL,
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0), x_precision),
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0) / x_min_unit) * x_min_unit)
                         * POD.rate, x_base_precision),
                 round (decode (x_min_unit, NULL,
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0), x_precision),
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0) / x_min_unit) *
                         x_min_unit) * POD.rate / x_base_min_unit) *
                         x_base_min_unit)), 0)
        INTO   x_result_fld
        FROM   PO_DISTRIBUTIONS POD, PO_LINE_LOCATIONS PLL
        WHERE  PLL.po_header_id     = x_object_id
        AND    PLL.shipment_type    = 'SCHEDULED'
        AND    PLL.line_location_id = POD.line_location_id;
Line: 229

      SELECT
      sum( decode (C.minimum_accountable_unit, NULL,
                   round ((PLL.quantity -
                           nvl(PLL.quantity_cancelled, 0)
                           ) * nvl(PLL.price_override, 0), C.precision),
                   round ((PLL.quantity -
                           nvl(PLL.quantity_cancelled, 0)
                           ) * nvl(PLL.price_override, 0) /
                           C.minimum_accountable_unit
                          ) * C.minimum_accountable_unit))
      INTO   x_result_fld
      FROM   PO_LINE_LOCATIONS PLL,
             PO_HEADERS PH,
             FND_CURRENCIES C
      WHERE  PLL.po_header_id   = x_object_id
      AND    PH.po_header_id    = PLL.po_header_id
      AND    PH.currency_code   = C.currency_code
      AND    PLL.shipment_type  = 'SCHEDULED';
Line: 261

    SELECT
    sum( decode
       ( x_base_min_unit, NULL,
         round( nvl(quantity, 0) * nvl(unit_price, 0), x_base_precision),
         round( nvl(quantity, 0) * nvl(unit_price, 0) / x_base_min_unit)
              * x_base_min_unit))
    INTO   x_result_fld
    FROM   PO_REQUISITION_LINES
    WHERE  requisition_header_id            = x_object_id
    AND    nvl(cancel_flag, 'N')            = 'N'
    AND    nvl(modified_by_agent_flag, 'N') = 'N';
Line: 285

    SELECT
    sum( decode
       ( x_base_min_unit, NULL,
         round( nvl(quantity, 0) * nvl(unit_price, 0), x_base_precision),
         round( nvl(quantity, 0) * nvl(unit_price, 0) / x_base_min_unit)
              * x_base_min_unit))
    INTO   x_result_fld
    FROM   PO_REQUISITION_LINES
    WHERE  requisition_line_id              = x_object_id
    AND    nvl(cancel_flag, 'N')            = 'N'
    AND    nvl(modified_by_agent_flag, 'N') = 'N';
Line: 300

    SELECT
    nvl( sum
         (decode (C.minimum_accountable_unit, NULL,
                 round ((nvl(PLL.quantity,0) -
                         nvl(PLL.quantity_cancelled, 0) -
                         sum (nvl(PLL2.quantity, 0) -
                              nvl(PLL2.quantity_cancelled,0)))
                         * nvl(PLL.price_override,0), C.precision),
                 round ((nvl(PLL.quantity,0) -
                         nvl(PLL.quantity_cancelled, 0) -
                         sum (nvl(PLL2.quantity, 0) -
                              nvl(PLL2.quantity_cancelled,0)))
                         * nvl(PLL.price_override,0) /
                           C.minimum_accountable_unit) *
                         C.minimum_accountable_unit)), 0)
    INTO   x_result_fld
    FROM   PO_LINE_LOCATIONS PLL,
           PO_LINE_LOCATIONS PLL2,
           PO_LINES PL,
           PO_HEADERS PH,
           FND_CURRENCIES C
    WHERE  PH.po_header_id      = x_object_id
    AND    PH.segment1          = PL.contract_num
    AND    PH.currency_code     = C.currency_code
    AND    PL.po_line_id        = PLL.po_line_id
    AND    PLL.shipment_type in ('STANDARD','PLANNED','BLANKET','SCHEDULED')
    AND    PLL.line_location_id = PLL2.source_shipment_id (+)
    GROUP BY C.minimum_accountable_unit, C.precision,
             PLL.quantity, PLL.quantity_cancelled,
             PLL.price_override, PLL.line_location_id;
Line: 335

      SELECT GSB.currency_code,
             POH.currency_code
      INTO   x_base_currency,
             x_po_currency
      FROM   PO_HEADERS POH,
             FINANCIALS_SYSTEM_PARAMETERS FSP,
             GL_SETS_OF_BOOKS GSB,
             PO_RELEASES POR
      WHERE  POH.po_header_id    = POR.po_header_id
      AND    POR.po_release_id   = x_object_id
      AND    FSP.set_of_books_id = GSB.set_of_books_id;
Line: 362

        SELECT
        nvl(sum (decode (x_base_min_unit, NULL,
                 round ( ( decode (x_min_unit, NULL,
                           round ((nvl(POD.quantity_ordered, 0) *
                                   nvl(PLL.price_override, 0)), x_precision),
                           round ((nvl(POD.quantity_ordered, 0) *
                                   nvl(PLL.price_override, 0) / x_min_unit))
                                   * x_min_unit) * POD.rate), x_base_precision),
                           round ( ( decode (x_min_unit, NULL,
                           round ((nvl(POD.quantity_ordered, 0) *
                                   nvl(PLL.price_override, 0)), x_precision),
                           round ((nvl(POD.quantity_ordered, 0) *
                                   nvl(PLL.price_override, 0) / x_min_unit)
                                   ) * x_min_unit) * POD.rate) / x_base_min_unit
                                   ) * x_base_min_unit)), 0)
         INTO x_result_fld
         FROM PO_DISTRIBUTIONS POD, PO_LINE_LOCATIONS PLL
         WHERE PLL.po_release_id    = x_object_id
         AND   PLL.line_location_id = POD.line_location_id
         AND   PLL.shipment_type in ('SCHEDULED','BLANKET');
Line: 386

      SELECT
      sum( decode (C.minimum_accountable_unit, NULL,
            round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                     * nvl(POL.price_override, 0), C.precision),
            round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                    * nvl(POL.price_override, 0) /
                    C.minimum_accountable_unit) * C.minimum_accountable_unit))
      INTO   x_result_fld
      FROM   PO_LINE_LOCATIONS POL, PO_HEADERS POH,
             FND_CURRENCIES C
      WHERE  POL.po_release_id = x_object_id
      AND    POH.po_header_id  = POL.po_header_id
      AND    POH.currency_code = C.currency_code
      AND    POL.shipment_type in ('SCHEDULED','BLANKET');
Line: 405

    SELECT
    sum( decode (C.minimum_accountable_unit, NULL,
                 round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                         * nvl(POL.price_override, 0), C.precision),
                 round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                         * nvl(POL.price_override, 0) /
                         C.minimum_accountable_unit)
                         * C.minimum_accountable_unit))
    INTO   x_result_fld
    FROM   PO_LINE_LOCATIONS POL, PO_HEADERS POH,
           FND_CURRENCIES C
    WHERE  POL.po_line_id    = x_object_id
    AND    POH.po_header_id  = POL.po_header_id
    AND    POH.currency_code = C.currency_code
    AND    POL.shipment_type in ('STANDARD','PLANNED','BLANKET');
Line: 423

    SELECT
    sum( decode (C.minimum_accountable_unit, NULL,
                 round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                         * nvl(POL.price_override, 0), C.precision),
                 round ((POL.quantity - nvl(POL.quantity_cancelled , 0))
                         * nvl(POL.price_override, 0) /
                         C.minimum_accountable_unit)
                         * C.minimum_accountable_unit))
    INTO   x_result_fld
    FROM   PO_LINE_LOCATIONS POL, PO_HEADERS POH,
           FND_CURRENCIES C
    WHERE  line_location_id  = x_object_id
    AND    POH.po_header_id  = POL.po_header_id
    AND    POH.currency_code = C.currency_code;
Line: 459

  SELECT GSB.currency_code,
         POH.currency_code
  INTO   x_base_currency,
         x_po_currency
  FROM   PO_HEADERS_ALL POH,
         FINANCIALS_SYSTEM_PARAMETERS FSP,
         GL_SETS_OF_BOOKS GSB
  WHERE  POH.po_header_id    = x_object_id
  AND    FSP.set_of_books_id = GSB.set_of_books_id;
Line: 522

        SELECT
        nvl(sum
        (decode (x_base_min_unit, NULL,
                 round (decode (x_min_unit, NULL,
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0), x_precision),
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0) / x_min_unit) * x_min_unit)
                         * POD.rate, x_base_precision),
                 round (decode (x_min_unit, NULL,
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0), x_precision),
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0) / x_min_unit) *
                         x_min_unit) * POD.rate / x_base_min_unit) *
                         x_base_min_unit)), 0)
        INTO   x_result_fld
        FROM   PO_DISTRIBUTIONS_ALL POD, PO_LINE_LOCATIONS_ALL PLL
        WHERE  PLL.po_header_id     = x_object_id
        AND    PLL.shipment_type   in ('STANDARD','PLANNED', 'BLANKET')
        AND    PLL.line_location_id = POD.line_location_id;
Line: 556

      SELECT
      sum( decode (C.minimum_accountable_unit, NULL,
                   round ((PLL.quantity -
                           nvl(PLL.quantity_cancelled, 0)
                           ) * nvl(PLL.price_override, 0), C.precision),
                   round ((PLL.quantity -
                           nvl(PLL.quantity_cancelled, 0)
                           ) * nvl(PLL.price_override, 0) /
                           C.minimum_accountable_unit
                          ) * C.minimum_accountable_unit))
      INTO   x_result_fld
      FROM   PO_LINE_LOCATIONS_ALL PLL,
             PO_HEADERS_ALL PH,
             FND_CURRENCIES C
      WHERE  PLL.po_header_id   = x_object_id
      AND    PH.po_header_id    = PLL.po_header_id
      AND    PH.currency_code   = C.currency_code
      AND    PLL.shipment_type in ('STANDARD','PLANNED','BLANKET');
Line: 605

        SELECT
        nvl(sum
        (decode (x_base_min_unit, NULL,
                 round (decode (x_min_unit, NULL,
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0), x_precision),
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0) / x_min_unit) * x_min_unit)
                         * POD.rate, x_base_precision),
                 round (decode (x_min_unit, NULL,
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0), x_precision),
                 round ((nvl(POD.quantity_ordered, 0) -
                         nvl(POD.quantity_cancelled, 0)) *
                         nvl(PLL.price_override, 0) / x_min_unit) *
                         x_min_unit) * POD.rate / x_base_min_unit) *
                         x_base_min_unit)), 0)
        INTO   x_result_fld
        FROM   PO_DISTRIBUTIONS_ALL POD, PO_LINE_LOCATIONS_ALL PLL
        WHERE  PLL.po_header_id     = x_object_id
        AND    PLL.shipment_type    = 'SCHEDULED'
        AND    PLL.line_location_id = POD.line_location_id;
Line: 639

      SELECT
      sum( decode (C.minimum_accountable_unit, NULL,
                   round ((PLL.quantity -
                           nvl(PLL.quantity_cancelled, 0)
                           ) * nvl(PLL.price_override, 0), C.precision),
                   round ((PLL.quantity -
                           nvl(PLL.quantity_cancelled, 0)
                           ) * nvl(PLL.price_override, 0) /
                           C.minimum_accountable_unit
                          ) * C.minimum_accountable_unit))
      INTO   x_result_fld
      FROM   PO_LINE_LOCATIONS_ALL PLL,
             PO_HEADERS_ALL PH,
             FND_CURRENCIES C
      WHERE  PLL.po_header_id   = x_object_id
      AND    PH.po_header_id    = PLL.po_header_id
      AND    PH.currency_code   = C.currency_code
      AND    PLL.shipment_type  = 'SCHEDULED';
Line: 671

    SELECT
    sum( decode
       ( x_base_min_unit, NULL,
         round( nvl(quantity, 0) * nvl(unit_price, 0), x_base_precision),
         round( nvl(quantity, 0) * nvl(unit_price, 0) / x_base_min_unit)
              * x_base_min_unit))
    INTO   x_result_fld
    FROM   PO_REQUISITION_LINES_ALL
    WHERE  requisition_header_id            = x_object_id
    AND    nvl(cancel_flag, 'N')            = 'N'
    AND    nvl(modified_by_agent_flag, 'N') = 'N';
Line: 695

    SELECT
    sum( decode
       ( x_base_min_unit, NULL,
         round( nvl(quantity, 0) * nvl(unit_price, 0), x_base_precision),
         round( nvl(quantity, 0) * nvl(unit_price, 0) / x_base_min_unit)
              * x_base_min_unit))
    INTO   x_result_fld
    FROM   PO_REQUISITION_LINES_ALL
    WHERE  requisition_line_id              = x_object_id
    AND    nvl(cancel_flag, 'N')            = 'N'
    AND    nvl(modified_by_agent_flag, 'N') = 'N';
Line: 710

    SELECT
    nvl( sum
         (decode (C.minimum_accountable_unit, NULL,
                 round ((nvl(PLL.quantity,0) -
                         nvl(PLL.quantity_cancelled, 0) -
                         sum (nvl(PLL2.quantity, 0) -
                              nvl(PLL2.quantity_cancelled,0)))
                         * nvl(PLL.price_override,0), C.precision),
                 round ((nvl(PLL.quantity,0) -
                         nvl(PLL.quantity_cancelled, 0) -
                         sum (nvl(PLL2.quantity, 0) -
                              nvl(PLL2.quantity_cancelled,0)))
                         * nvl(PLL.price_override,0) /
                           C.minimum_accountable_unit) *
                         C.minimum_accountable_unit)), 0)
    INTO   x_result_fld
    FROM   PO_LINE_LOCATIONS_ALL PLL,
           PO_LINE_LOCATIONS_ALL PLL2,
           PO_LINES_ALL PL,
           PO_HEADERS_ALL PH,
           FND_CURRENCIES C
    WHERE  PH.po_header_id      = x_object_id
    AND    PH.segment1          = PL.contract_num
    AND    PH.currency_code     = C.currency_code
    AND    PL.po_line_id        = PLL.po_line_id
    AND    PLL.shipment_type in ('STANDARD','PLANNED','BLANKET','SCHEDULED')
    AND    PLL.line_location_id = PLL2.source_shipment_id (+)
    GROUP BY C.minimum_accountable_unit, C.precision,
             PLL.quantity, PLL.quantity_cancelled,
             PLL.price_override, PLL.line_location_id;
Line: 745

      SELECT GSB.currency_code,
             POH.currency_code
      INTO   x_base_currency,
             x_po_currency_1
      FROM   PO_HEADERS_ALL POH,
             FINANCIALS_SYSTEM_PARAMETERS FSP,
             GL_SETS_OF_BOOKS GSB,
             PO_RELEASES_ALL POR
      WHERE  POH.po_header_id    = POR.po_header_id
      AND    POR.po_release_id   = x_object_id
      AND    FSP.set_of_books_id = GSB.set_of_books_id;
Line: 772

        SELECT
        nvl(sum (decode (x_base_min_unit, NULL,
                 round ( ( decode (x_min_unit, NULL,
                           round ((nvl(POD.quantity_ordered, 0) *
                                   nvl(PLL.price_override, 0)), x_precision),
                           round ((nvl(POD.quantity_ordered, 0) *
                                   nvl(PLL.price_override, 0) / x_min_unit))
                                   * x_min_unit) * POD.rate), x_base_precision),
                           round ( ( decode (x_min_unit, NULL,
                           round ((nvl(POD.quantity_ordered, 0) *
                                   nvl(PLL.price_override, 0)), x_precision),
                           round ((nvl(POD.quantity_ordered, 0) *
                                   nvl(PLL.price_override, 0) / x_min_unit)
                                   ) * x_min_unit) * POD.rate) / x_base_min_unit
                                   ) * x_base_min_unit)), 0)
         INTO x_result_fld
         FROM PO_DISTRIBUTIONS_ALL POD, PO_LINE_LOCATIONS_ALL PLL
         WHERE PLL.po_release_id    = x_object_id
         AND   PLL.line_location_id = POD.line_location_id
         AND   PLL.shipment_type in ('SCHEDULED','BLANKET');
Line: 796

      SELECT
      sum( decode (C.minimum_accountable_unit, NULL,
            round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                     * nvl(POL.price_override, 0), C.precision),
            round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                    * nvl(POL.price_override, 0) /
                    C.minimum_accountable_unit) * C.minimum_accountable_unit))
      INTO   x_result_fld
      FROM   PO_LINE_LOCATIONS_ALL POL, PO_HEADERS_ALL POH,
             FND_CURRENCIES C
      WHERE  POL.po_release_id = x_object_id
      AND    POH.po_header_id  = POL.po_header_id
      AND    POH.currency_code = C.currency_code
      AND    POL.shipment_type in ('SCHEDULED','BLANKET');
Line: 815

    SELECT
    sum( decode (C.minimum_accountable_unit, NULL,
                 round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                         * nvl(POL.price_override, 0), C.precision),
                 round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                         * nvl(POL.price_override, 0) /
                         C.minimum_accountable_unit)
                         * C.minimum_accountable_unit))
    INTO   x_result_fld
    FROM   PO_LINE_LOCATIONS_ALL POL, PO_HEADERS_ALL POH,
           FND_CURRENCIES C
    WHERE  POL.po_line_id    = x_object_id
    AND    POH.po_header_id  = POL.po_header_id
    AND    POH.currency_code = C.currency_code
    AND    POL.shipment_type in ('STANDARD','PLANNED','BLANKET');
Line: 833

    SELECT
    sum( decode (C.minimum_accountable_unit, NULL,
                 round ((POL.quantity - nvl(POL.quantity_cancelled, 0))
                         * nvl(POL.price_override, 0), C.precision),
                 round ((POL.quantity - nvl(POL.quantity_cancelled , 0))
                         * nvl(POL.price_override, 0) /
                         C.minimum_accountable_unit)
                         * C.minimum_accountable_unit))
    INTO   x_result_fld
    FROM   PO_LINE_LOCATIONS_ALL POL, PO_HEADERS_ALL POH,
           FND_CURRENCIES C
    WHERE  line_location_id  = x_object_id
    AND    POH.po_header_id  = POL.po_header_id
    AND    POH.currency_code = C.currency_code;