DBA Data[Home] [Help]

APPS.PO_LINES_SV4 SQL Statements

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

Line: 22

    SELECT    line_num
    INTO      x_line_num
    FROM      po_lines_all
    WHERE     po_line_id = p_po_line_id;
Line: 54

    SELECT  price_break_lookup_code
    INTO    l_price_break_lookup_code
    FROM    po_lines_all
    WHERE   po_line_id = p_po_line_id;
Line: 98

    SELECT    count('Price Breaks with Effectivity Dates')
    INTO      l_count
    FROM      po_line_locations_all
    WHERE     po_line_id = p_po_line_id
    AND       (   ( start_date IS NOT NULL )
              OR  ( end_date IS NOT NULL ) );
Line: 141

    SELECT    allow_price_override_flag
    INTO      l_allow_price_override_flag
    FROM      po_lines_all
    WHERE     po_line_id = p_po_line_id;
Line: 189

      select line_location_id ,
             --< NBD TZ/Timestamp FPJ Start >
             --fnd_date.date_to_chardate(promised_date),
             --fnd_date.date_to_chardate(need_by_date),
             promised_date,
             need_by_date
             --< NBD TZ/Timestamp FPJ End >
      into   X_line_location_id,
             X_promised_date,
             X_need_by
      from   po_line_locations
      where  po_line_id = X_po_line_id;
Line: 238

           select code_combination_id
           into   X_code_combination_id
           from   po_distributions
           where  line_location_id = X_line_location_id;
Line: 284

   SELECT sum(POD.quantity_ordered)
   INTO X_encumbered_quantity
   FROM PO_DISTRIBUTIONS_ALL POD
   WHERE POD.po_line_id = X_po_line_id
   AND   POD.encumbered_flag = 'Y'
   AND   POD.distribution_type in ('STANDARD', 'PLANNED')
   ;
Line: 325

            SELECT nvl(msi.receipt_required_flag, X_receipt_required_flag)
            INTO   X_receipt_required_flag
            FROM   mtl_system_items msi
            WHERE  msi.inventory_item_id = X_item_id
            AND    msi.organization_id   = X_inventory_org_id;
Line: 332

            SELECT receiving_flag
            INTO   X_receipt_required_flag
            FROM   po_line_types
            WHERE  line_type_id = X_line_type_id;
Line: 366

                                    X_prevent_price_update_flag IN OUT NOCOPY VARCHAR2,
                                    X_online_req_flag 		IN OUT NOCOPY VARCHAR2,
                                    X_quantity_released         IN OUT NOCOPY NUMBER,
                                    X_amount_released           IN OUT NOCOPY NUMBER)  IS

      X_progress   varchar2(3);
Line: 380

      l_retroactive_update    VARCHAR2(30) := 'NEVER';
Line: 403

           SELECT sum(nvl(quantity_received,0)),
                  sum(nvl(quantity_billed,0)),
                  sum(nvl(amount_received,0)),
                  sum(nvl(amount_billed,0))
           INTO   X_quantity_received,
                  X_quantity_billed,
                  X_amount_received,
                  X_amount_billed
           FROM   po_line_locations
           WHERE  po_line_id = X_po_line_id
           AND    shipment_type in ('STANDARD', 'PLANNED');
Line: 434

               SELECT sum(nvl(quantity,0) - nvl(quantity_cancelled,0)),
                      sum(decode(quantity,
                                 null,
                                 (nvl(amount, 0)
                                 - nvl(amount_cancelled, 0)),
                                 (price_override* (nvl(quantity,0) -
                                 nvl(quantity_cancelled,0)))
                                )
                         )
               INTO   X_quantity_released,
                      X_amount_released
               FROM   po_line_locations
               WHERE  po_header_id  = X_po_header_id and
                      shipment_type = 'BLANKET'and
                      po_line_id    = X_po_line_id;
Line: 465

               SELECT sum(nvl(quantity,0) - nvl(quantity_cancelled,0)),
                      sum(price_override* (nvl(quantity,0) -
				nvl(quantity_cancelled,0)))
               INTO   X_quantity_released,
                      X_amount_released
               FROM   po_line_locations
               WHERE  po_header_id = X_po_header_id and
                      shipment_type = 'SCHEDULED' and
                      po_line_id    = X_po_line_id;
Line: 494

          Select order_type_lookup_code
          into   l_value_basis
          from   po_lines_all
          where  po_line_id =  X_po_line_id;
Line: 503

          l_retroactive_update := PO_RETROACTIVE_PRICING_PVT.Get_Retro_Mode;
Line: 532

             SELECT COUNT(1)
             INTO   X_row_exists
             FROM   po_distributions
             WHERE  po_line_id = X_po_line_id
             AND    (destination_type_code in ('INVENTORY','SHOP FLOOR')
                    OR (destination_type_code = 'EXPENSE'
                        AND (X_expense_accrual_code = 'RECEIPT'
                                OR X_quantity_billed > 0)))
             AND    (X_quantity_received > 0 OR
                     X_quantity_billed > 0)
             -- 
             AND    (l_retroactive_update <> 'ALL_RELEASES' OR
                     (l_retroactive_update = 'ALL_RELEASES' AND
                      l_encumbrance_on = 'Y') OR               -- Bug 3573266
                     (l_retroactive_update = 'ALL_RELEASES' AND
                      l_archive_mode_std_po <> 'APPROVE' ) OR -- Bug 3565522
                     (l_retroactive_update = 'ALL_RELEASES' AND
                      l_retro_prj_allowed = 'N' ));  -- Bug 3231062
Line: 554

             SELECT COUNT(1)
             INTO   X_row_exists
             FROM   po_distributions
             WHERE  po_line_id = X_po_line_id
             AND    (destination_type_code = 'EXPENSE'
                        AND (X_expense_accrual_code = 'RECEIPT'
                                OR X_amount_billed > 0))
             AND    (X_amount_received > 0 OR
                     X_amount_billed > 0);
Line: 567

              X_prevent_price_update_flag := 'Y';
Line: 569

              X_prevent_price_update_flag  := 'N';
Line: 574

       		    X_prevent_price_update_flag  := 'N';
Line: 585

 	    SELECT COUNT(1)
 	    INTO   X_row_exists
 	    FROM   po_distributions pod
 	    WHERE  pod.po_Line_id = X_po_line_id
 	    AND    req_distribution_id is not null;
Line: 645

        SELECT segment1,
               type_lookup_code,
               quote_type_lookup_code,
               quote_vendor_quote_number,
               terms_id,
               ship_via_lookup_code,
               fob_lookup_code,
               freight_terms_lookup_code
        INTO   X_quotation_number,
               X_from_type_lookup_code,
               X_quote_type_lookup_code,
               X_vendor_quotation_number,
               x_quote_terms_id,
               x_quote_ship_via_lookup_code,
               x_quote_fob_lookup_code,
               x_quote_freight_terms
        FROM   po_headers
        WHERE  po_header_id = X_from_header_id
        AND    type_lookup_code = 'QUOTATION';
Line: 667

        SELECT podt.type_name
        INTO   X_quotation_type
        FROM   po_document_types podt
        WHERE  podt.document_type_code = X_from_type_lookup_code
        AND    podt.document_subtype   = X_quote_type_lookup_code;
Line: 697

           SELECT line_num
           INTO   X_quotation_line
           FROM   po_lines
           WHERE  po_line_id = X_from_line_id;
Line: 737

           select polc.displayed_field
           into   X_displayed_field
           from   po_lookup_codes polc
           where  polc.lookup_type = X_lookup_type
           and    polc.lookup_code = X_lookup_code ;
Line: 766

    SELECT COUNT(1)
    INTO   x_row_exists
    FROM   po_distributions pod
    WHERE  pod.po_line_id = X_po_line_id
    AND    req_distribution_id is not null;
Line: 800

      select min(inventory_item_id),
	     min(primary_unit_of_measure)
      into   x_item_id_record.item_id,
	     x_item_id_record.primary_unit_of_measure
      from   mtl_item_flexfields
      where  item_number	= X_item_id_record.item_num and
	     organization_id	= X_item_id_record.to_organization_id;
Line: 810

          select min(inventory_item_id),
		 min(primary_unit_of_measure)
          into   x_item_id_record.item_id,
		 x_item_id_record.primary_unit_of_measure
          from   mtl_item_flexfields
          where  item_number		= X_item_id_record.vendor_item_num and
		 organization_id	= X_item_id_record.to_organization_id;
Line: 846

      select max(inventory_item_id)
      into   x_sub_item_id_record.substitute_item_id
      from   mtl_system_items_kfv
      where  concatenated_segments = X_sub_item_id_record.substitute_item_num;
Line: 851

      select max(inventory_item_id)
      into   x_sub_item_id_record.substitute_item_id
      from   mtl_system_items_kfv
      where  concatenated_segments = X_sub_item_id_record.vendor_item_num;
Line: 879

   select po_line_id, item_id
   into   x_po_line_id_record.po_line_id, X_po_line_id_record.item_id
   from   po_lines
   where  po_header_id = X_po_line_id_record.po_header_id and
          line_num     = X_po_line_id_record.document_line_num;
Line: 909

      select contract_number
      into   X_oke_contract_num
      from   okc_k_headers_b
      where  id = X_oke_contract_header_id;
Line: 940

       select mum.unit_of_measure_tl
	 into x_unit_meas_lookup_code_tl
   	 from mtl_units_of_measure mum
	where mum.unit_of_measure = x_unit_meas_lookup_code;
Line: 970

       select mum.unit_of_measure_tl
	 into x_unit_meas_lookup_code_tl
   	 from mtl_units_of_measure mum
	where mum.uom_code = rtrim(x_uom_code);