DBA Data[Home] [Help]

APPS.PON_TRANSFORM_BIDDING_PKG SQL Statements

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

Line: 54

	SELECT vendor_site_id
	INTO v_site_id
	FROM (SELECT vendor_site_id
		  FROM pon_bidding_parties
		  WHERE auction_header_id = p_auction_header_id
			AND trading_partner_id = p_tpid
		  ORDER BY vendor_site_code)
	WHERE rownum=1;
Line: 94

  /*SELECT 'N'
  INTO   v_has_est_qty_on_all_bid_lines
  FROM   dual
  WHERE  EXISTS (SELECT null
                 FROM   pon_bid_item_prices pbip,
                        pon_auction_item_prices_all paip
                 WHERE  pbip.auction_header_id = p_auction_header_id AND
                        pbip.bid_number = p_bid_number AND
                        nvl(pbip.has_bid_flag, 'N') = 'Y' AND
                        pbip.auction_header_id = paip.auction_header_id AND
                        pbip.line_number = paip.line_number AND
                        paip.group_type in ('LOT', 'LINE', 'GROUP_LINE') AND
                        paip.order_type_lookup_code <> 'FIXED PRICE' AND
                        paip.quantity is null);*/
Line: 112

  SELECT 'N'
  INTO   v_has_est_qty_on_all_bid_lines
  FROM   dual
  WHERE  EXISTS ((SELECT null
                 FROM   pon_bid_item_prices pbip,
                        pon_auction_item_prices_all paip
                 WHERE  pbip.auction_header_id = p_auction_header_id AND
                        pbip.bid_number = p_bid_number AND
                        nvl(pbip.has_bid_flag, 'N') = 'Y' AND
                        pbip.auction_header_id = paip.auction_header_id AND
                        pbip.line_number = paip.line_number AND
                        paip.group_type in ('LOT', 'LINE', 'GROUP_LINE') AND
                        paip.order_type_lookup_code <> 'FIXED PRICE' AND
                        paip.quantity is null)
                 UNION
                 (SELECT null
                  FROM  pon_bid_item_prices pbip1
                  WHERE pbip1.auction_header_id = p_auction_header_id AND
                        pbip1.bid_number = p_bid_number AND
                        pbip1.auction_line_number = -1 AND
                        nvl(pbip1.has_bid_flag, 'N') = 'Y' AND
                        pbip1.quantity IS null));
Line: 153

   SELECT   sum(pbip.quantity * pbip.price)
            + decode(Min(nvl(pbip.quantity, -9999)), -9999, NULL, 0)
   into v_unsol_line_total
   FROM  PON_BID_ITEM_PRICES pbip
   WHERE
     pbip.bid_number = p_bid_number and
     pbip.auction_line_number = -1 and
     nvl(pbip.clm_info_flag,'N') <> 'Y';
Line: 196

    SELECT sum(decode(paip.order_type_lookup_code, 'FIXED PRICE', 1,
                      decode(p_outcome, 'STANDARD', nvl(pbip.quantity, 0), paip.quantity)) *
               nvl(pbip.price,0)) bid_total
    INTO   v_bid_total
    FROM   pon_bid_item_prices pbip,
           pon_auction_item_prices_all paip
    WHERE  pbip.auction_header_id = p_auction_header_id AND
           pbip.bid_number = p_bid_number AND
           nvl(pbip.has_bid_flag, 'N') = 'Y' AND
           pbip.auction_header_id = paip.auction_header_id AND
           pbip.line_number = paip.line_number AND
           paip.group_type in ('LOT', 'LINE', 'GROUP_LINE');
Line: 211

    SELECT sum(decode(paip.order_type_lookup_code, 'FIXED PRICE', 1,
                      decode(p_outcome, 'STANDARD', nvl(pbip.quantity, 0), paip.quantity)) *
               nvl(untransform_one_price(paip.auction_header_id, paip.line_number, pbip.price,
                                         paip.quantity, p_tpid, p_site),0)) bid_total
    INTO   v_bid_total
    FROM   pon_bid_item_prices pbip,
           pon_auction_item_prices_all paip
    WHERE  pbip.auction_header_id = p_auction_header_id AND
           pbip.bid_number = p_bid_number AND
           nvl(pbip.has_bid_flag, 'N') = 'Y' AND
           pbip.auction_header_id = paip.auction_header_id AND
           pbip.line_number = paip.line_number AND
           paip.group_type in ('LOT', 'LINE', 'GROUP_LINE');
Line: 231

    SELECT count(*) INTO v_unsol_line_count
    FROM pon_bid_item_prices
    WHERE bid_number = p_bid_number
    AND auction_line_number = -1
    AND Nvl(clm_info_flag, 'N') = 'N'
    AND Nvl(clm_cost_constraint, 'X') NOT IN ('NSP', 'NC');
Line: 302

  SELECT auh.trading_partner_id, auh.contract_type, auh.supplier_view_type,dt.doctype_group_name
    INTO v_buyer_tpid, v_outcome, v_supplier_view_type,v_doctype_group_name
    FROM pon_auction_headers_all auh, pon_auc_doctypes dt
   WHERE auction_header_id = p_auction_header_id
     AND auh.doctype_id = dt.doctype_id;
Line: 309

  SELECT bid_status, buyer_bid_total
  INTO   v_bid_status, v_buyer_bid_total
  FROM   pon_bid_headers
  WHERE  auction_header_id = p_auction_header_id AND
         bid_number = p_bid_number;
Line: 427

	SELECT supplier_view_type, trading_partner_id
	INTO v_supplier_view_type, v_buyer_tpid
	FROM pon_auction_headers_all
	WHERE auction_header_id = p_auction_header_id;
Line: 483

	SELECT unit_price, fixed_amount, percentage
	INTO v_unit, v_amount, v_percentage
	FROM pon_pf_supplier_formula
	WHERE auction_header_id = p_auction_header_id
		AND line_number = p_line_number
		AND ((trading_partner_id = p_tpid AND
                      vendor_site_id = p_site_id)
                     OR requested_supplier_id = p_requested_supplier_id);
Line: 530

     SELECT group_type
	 INTO v_group_type
     FROM pon_auction_item_prices_all
     WHERE auction_header_id = p_auction_header_id
           AND line_number = p_line_number;
Line: 542

           SELECT DECODE (al.group_type, 'GROUP', bl.group_amount,
                      nvl(bl.quantity, decode(al.ORDER_TYPE_LOOKUP_CODE, 'FIXED PRICE', 1, al.quantity)) * bl.price)
           INTO v_quote_amount
           FROM pon_bid_item_prices bl, pon_auction_item_prices_all al
           WHERE bl.bid_number = p_bid_number
           AND bl.line_number = p_line_number
           AND bl.auction_header_id = al.auction_header_id
           AND bl.line_number = al.line_number;
Line: 560

			SELECT
                         nvl(bl.quantity, decode(al.ORDER_TYPE_LOOKUP_CODE, 'FIXED PRICE', 1, al.quantity))
		       * nvl(PON_TRANSFORM_BIDDING_PKG.untransform_one_price(p_auction_header_id,
bl.line_number, bl.price, al.quantity, p_tpid, p_site), 0)
        		INTO v_quote_amount
        		FROM pon_bid_item_prices bl, pon_auction_item_prices_all al
        		WHERE bl.bid_number = p_bid_number
        		AND bl.line_number = p_line_number
        		AND al.auction_header_id = bl.auction_header_id
			AND al.line_number = bl.line_number;
Line: 612

   select sequence
   into   v_supplier_seq_number
   from   pon_bidding_parties
   where  auction_header_id = p_auction_header_id and
          ((trading_partner_id = p_trading_partner_id and
            vendor_site_id = p_vendor_site_id) OR
           requested_supplier_id = p_requested_supplier_id);
Line: 620

   select 'Y'
   into   v_has_pf_values_defined
   from   pon_pf_supplier_values
   where  auction_header_id = p_auction_header_id and
          line_number = p_line_number and
          pf_seq_number = p_pf_seq_number and
          supplier_seq_number = v_supplier_seq_number;
Line: 660

  select ah.currency_code, 1 rate, ah.number_price_decimals, fc.precision, -1 site_id, -1 bid_number, null
  into   x_currency, x_rate, x_precision, x_currency_precision, x_site_id, x_bid_number, x_bid_status
  from   pon_auction_headers_all ah,
         fnd_currencies fc
  where  ah.auction_header_id = p_auction_header_id and
         ah.currency_code = fc.currency_code;
Line: 678

       select vendor_site_id, bid_currency_code, rate, number_price_decimals, precision
       into   x_site_id, x_currency, x_rate, x_precision, x_currency_precision
       from (select   bh.vendor_site_id, bh.bid_currency_code, bh.rate, bh.number_price_decimals, fc.precision
             from     pon_bid_headers bh,
                      pon_auction_headers_all ah,
                      fnd_currencies fc
             where    ah.auction_header_id_orig_amend = (select auction_header_id_orig_amend
                                                         from   pon_auction_headers_all
                                                         where  auction_header_id = p_auction_header_id) and
                      bh.auction_header_id = ah.auction_header_id and
                      bh.trading_partner_id = p_trading_partner_id and
                      bh.vendor_site_id like nvl(to_char(p_vendor_site_id), '%') and
                      bh.trading_partner_contact_id = p_trading_partner_contact_id and
                      bh.bid_currency_code = fc.currency_code
             order by ah.amendment_number desc,
                      decode(bh.bid_status, 'DRAFT', 9, 'ACTIVE', 8, 'RESUBMISSION' , 7, 'DISQUALIFIED', 6, 'ARCHIVED', 4, 'ARCHIVED_DRAFT', 3) desc,
                      bh.publish_date desc)
       where rownum = 1;
Line: 722

       select bid_number, bid_status
       into   x_bid_number, x_bid_status
       from (select   bh.bid_number, bh.bid_status
             from     pon_bid_headers bh,
                      pon_auction_headers_all ah
             where    ah.auction_header_id_orig_amend = (select auction_header_id_orig_amend
                                                         from   pon_auction_headers_all
                                                         where  auction_header_id = p_auction_header_id) and
                      bh.auction_header_id = ah.auction_header_id and
                      bh.trading_partner_id = p_trading_partner_id and
                      bh.vendor_site_id = x_site_id
             order by ah.amendment_number desc,
                      decode(bh.bid_status, 'DRAFT', 9, 'ACTIVE', 8, 'RESUBMISSION' , 7, 'DISQUALIFIED', 6, 'ARCHIVED', 4, 'ARCHIVED_DRAFT', 3) desc,
                      bh.publish_date desc)
       where rownum = 1;
Line: 773

  SELECT auh.trading_partner_id, auh.contract_type, auh.supplier_view_type,dt.doctype_group_name
    INTO v_buyer_tpid, v_outcome, v_supplier_view_type,v_doctype_group_name
    FROM pon_auction_headers_all auh, pon_auc_doctypes dt
   WHERE auction_header_id = p_auction_header_id
     AND auh.doctype_id = dt.doctype_id;
Line: 780

  SELECT bid_status, buyer_bid_total
  INTO   v_bid_status, v_buyer_bid_total
  FROM   pon_bid_headers
  WHERE  auction_header_id = p_auction_header_id AND
         bid_number = p_bid_number;
Line: 871

    SELECT sum(decode(paip.order_type_lookup_code, 'FIXED PRICE', 1,
                      decode(p_outcome, 'STANDARD', nvl(pbip.quantity, 0), paip.quantity)) *
               nvl(pbip.price,0)) bid_total
    INTO   v_bid_total
    FROM   pon_bid_item_prices pbip,
           pon_auction_item_prices_all paip
    WHERE  pbip.auction_header_id = p_auction_header_id AND
           pbip.bid_number = p_bid_number AND
           nvl(pbip.has_bid_flag, 'N') = 'Y' AND
           pbip.auction_header_id = paip.auction_header_id AND
           nvl(paip.CLM_OPTION_INDICATOR,'-1')<>'O' AND
           pbip.line_number = paip.line_number AND
           paip.group_type in ('LOT', 'LINE', 'GROUP_LINE');
Line: 892

    SELECT sum(decode(paip.order_type_lookup_code, 'FIXED PRICE', 1,
                      decode(p_outcome, 'STANDARD', nvl(pbip.quantity, 0), paip.quantity)) *
               nvl(untransform_one_price(paip.auction_header_id, paip.line_number, pbip.price,
                                         paip.quantity, p_tpid, p_site),0)) bid_total
    INTO   v_bid_total
    FROM   pon_bid_item_prices pbip,
           pon_auction_item_prices_all paip
    WHERE  pbip.auction_header_id = p_auction_header_id AND
           pbip.bid_number = p_bid_number AND
           nvl(pbip.has_bid_flag, 'N') = 'Y' AND
           pbip.auction_header_id = paip.auction_header_id AND
           nvl(paip.CLM_OPTION_INDICATOR,'-1')<>'O' AND
           pbip.line_number = paip.line_number AND
           paip.group_type in ('LOT', 'LINE', 'GROUP_LINE');
Line: 914

    SELECT count(*) INTO v_unsol_line_count
    FROM pon_bid_item_prices
    WHERE bid_number = p_bid_number
    AND auction_line_number = -1
    AND Nvl(clm_info_flag, 'N') = 'N'
    AND Nvl(clm_cost_constraint, 'X') NOT IN ('NSP', 'NC');
Line: 964

   SELECT   SUM(nvl(pbip.quantity,0) * nvl(pbip.price,0))
   into v_unsol_line_total
   FROM  PON_BID_ITEM_PRICES pbip
   WHERE
     pbip.bid_number = p_bid_number and
     pbip.auction_line_number <> -1 and
     nvl(pbip.clm_info_flag,'N') <> 'Y';
Line: 987

SELECT Sum(Nvl(quantity, 0) * Nvl(price, 0))
INTO   v_unawarded_bid_total
FROM   pon_bid_item_prices
WHERE  auction_header_id = p_auction_header_id
AND    bid_number = p_bid_number
AND auction_line_number IN (SELECT line_number
                            FROM pon_auction_item_prices_all
                            WHERE auction_header_id = p_auction_header_id
                            AND   Nvl(award_status, 'NO') <> 'COMPLETED');