DBA Data[Home] [Help]

APPS.PO_LINES_SV4 SQL Statements

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

Line: 27

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

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

    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: 146

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

      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: 243

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

   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: 330

            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: 337

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

                                    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: 385

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

           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: 439

               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: 470

               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: 499

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

          l_retroactive_update := PO_RETROACTIVE_PRICING_PVT.Get_Retro_Mode;
Line: 537

             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: 559

             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: 572

              X_prevent_price_update_flag := 'Y';
Line: 574

              X_prevent_price_update_flag  := 'N';
Line: 579

       		    X_prevent_price_update_flag  := 'N';
Line: 590

 	    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: 650

        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: 672

        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: 702

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

           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: 771

    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: 805

      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: 815

          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: 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.substitute_item_num;
Line: 856

      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: 884

   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: 914

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

       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: 975

       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);
Line: 1020

 	       SELECT FSP.inventory_organization_id
 	         INTO l_inv_org_id
 	         FROM financials_system_params_all FSP
 	        WHERE org_id = p_org_id;