DBA Data[Home] [Help]

APPS.PON_AUCTION_PKG SQL Statements

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

Line: 68

PROCEDURE update_cache_rec; -- bug 6374353
Line: 121

         select has_items_flag
         into x_has_items_flag
         from pon_auction_headers_all
         where auction_header_id = p_auction_number;
Line: 211

    select pbp.trading_partner_name,
     pbp.trading_partner_id,
     pbp.trading_partner_contact_id,
     pbp.trading_partner_contact_name,
     pbp.additional_contact_email,
     pbp.wf_user_name,
           pbp.registration_id,
           pbp.vendor_site_id,
           decode(pbp.vendor_site_code, '-1', null, pbp.vendor_site_code) vendor_site_code,
           pbp.requested_supplier_id,
           pbp.requested_supplier_name,
           pbp.requested_supplier_contact_id,
           pbp.requested_supp_contact_name,
           pcr.email_address rs_contact_email
-- lxchen
    from pon_bidding_parties pbp,
         pos_contact_requests pcr
    where pbp.auction_header_id = x_auction_header_id and
          pbp.requested_supplier_contact_id = pcr.contact_request_id (+)
    union
    select distinct trading_partner_name,
           trading_partner_id,
           trading_partner_contact_id,
           pon_locale_pkg.get_party_display_name(trading_partner_contact_id) trading_partner_contact_name,
           null additional_contact_email,
           null wf_user_name,
           to_number(null) registration_id,
           vendor_site_id,
           decode(vendor_site_code, '-1', null, vendor_site_code) vendor_site_code,
           null requested_supplier_id,
           null requested_supplier_name,
           null requested_supplier_contact_id,
           null requested_supp_contact_name,
           null rs_contact_email
     from  pon_bid_headers
     where x_isAmendment = 'Y' and
           auction_header_id in (select auction_header_id
                                 from   pon_auction_headers_all
                                 where  auction_header_id_orig_amend = (select auction_header_id_orig_amend
                                                                        from   pon_auction_headers_all
                                                                        where  auction_header_id = x_auction_header_id)) and
           bid_status in ('ACTIVE', 'RESUBMISSION', 'DISQUALIFIED', 'DRAFT') and
           trading_partner_contact_id NOT IN
                       (SELECT nvl(trading_partner_contact_id, -1)
                        FROM   pon_bidding_parties
                        WHERE  auction_header_id = x_auction_header_id);
Line: 260

    select auction_header_id_orig_amend, nvl(amendment_number,0), nvl(auction_round_number, 1), auction_type,
    event_id, event_title, trading_partner_id,
    trading_partner_contact_id, original_close_bidding_date, trading_partner_contact_name,
    staggered_closing_interval
    from pon_auction_headers_all
    where auction_header_id = x_auction_header_id;
Line: 328

      SELECT pon_auction_wf_publish_s.nextval
      INTO   x_sequence
      FROM   dual;
Line: 503

    select user_name,
                 person_party_id
    into x_user_name,
               x_contact_id
    from fnd_user
          where person_party_id = x_auction_contact_id
          and nvl(end_date, sysdate+1) > sysdate;
Line: 519

         select user_name,
                person_party_id
          into x_user_name,
               x_contact_id
          from fnd_user
          where person_party_id = x_auction_contact_id
          and nvl(end_date, sysdate+1) > sysdate
          and rownum=1;
Line: 794

      select document_number
      into   x_orig_document_number
      from   pon_auction_headers_all
      where  auction_header_id = x_auction_header_id_orig_amend;
Line: 843

                select registration_key
                  into x_registration_key
                  from fnd_registrations
                 where registration_id  = bidder.registration_id;
Line: 871

      update pon_bidding_parties
         set wf_item_key = x_itemkey
      where  auction_header_id = x_auction_header_id and
             ((trading_partner_id = bidder.trading_partner_id and
               vendor_site_id = bidder.vendor_site_id) or
               requested_supplier_id = bidder.requested_supplier_id);
Line: 896

    select trading_partner_contact_name
    from pon_bid_headers
    where auction_header_id = x_auction_header_id;
Line: 989

    select document_number, auction_header_id_orig_amend, dt.doctype_group_name,
           nvl(auction_round_number, 1), nvl(amendment_number, 0),
     hz.person_first_name || ' ' ||  hz.person_last_name,
       decode(sign(close_bidding_date - nvl(view_by_date, open_bidding_date) - 7), 1, nvl(view_by_date, open_bidding_date)+3,
                  decode(sign(close_bidding_date - nvl(view_by_date, open_bidding_date) - 1), 1, nvl(view_by_date, open_bidding_date) + 1,
                  nvl(view_by_date, open_bidding_date) + 1/24)) reminder_time
    from pon_auction_headers_all auh, hz_parties hz, pon_auc_doctypes dt
    where hz.party_id = auh.trading_partner_contact_id
    and auh.doctype_id = dt.doctype_id
    and auction_header_id = p_auction_header_id;
Line: 1014

    SELECT pon_auction_wf_s.nextval
    INTO   x_sequence
    FROM   dual;
Line: 1103

   select nvl(view_by_date,open_bidding_date)
   into x_notification_date
   from pon_auction_headers_all where auction_header_id = p_auction_header_id;
Line: 1125

          select 'Y' into x_new_bidders_flag from pon_bidding_parties
          where auction_header_id = p_auction_header_id
          and trading_partner_id is null group by auction_header_id;
Line: 1168

   select view_by_date
   into x_preview_date
   from pon_auction_headers_all where auction_header_id = p_auction_header_id;
Line: 1344

   select document_number
   into   x_orig_document_number
   from   pon_auction_headers_all
   where  auction_header_id = x_auction_header_id_orig_amend;
Line: 1404

   UPDATE pon_auction_headers_all set
          wf_item_key = x_itemkey,
          reminder_date = x_reminder_date
   WHERE auction_header_id = p_auction_header_id;
Line: 1451

    SELECT pon_auction_wf_bid_s.nextval
    INTO   x_sequence
    FROM   dual;
Line: 1637

    select ah.document_number, ah.trading_partner_name, dt.doctype_group_name,
     nvl(substr(bhz.attribute2,0,3),''),
     bhz.person_first_name || ' ' ||  bhz.person_last_name,
       bih.trading_partner_name, decode(bih.vendor_site_code, '-1', null, bih.vendor_site_code) vendor_site_code,
       ah.view_by_date, ah.staggered_closing_interval
    from hz_parties bhz, pon_bid_headers bih, pon_auction_headers_all ah, pon_auc_doctypes dt
    where bhz.party_id = bih.trading_partner_contact_id
    and   bih.bid_number = p_bid_id
    and   ah.auction_header_id = bih.auction_header_id
    and   ah.doctype_id = dt.doctype_id;
Line: 1676

    SELECT pon_auction_wf_dqbid_s.nextval
    INTO   x_sequence
    FROM   dual;
Line: 1685

  select trading_partner_contact_id
  into x_bidder_contact_id
  from pon_bid_headers
  where bid_number = p_bid_id ;
Line: 1812

    select open_bidding_date, close_bidding_date, trading_partner_contact_name
    into x_startdate, x_enddate, x_auction_tp_contact_name
    from pon_auction_headers_all
    where auction_header_id = p_auction_header_id;
Line: 1877

    select wf_role_name, decode(bid_visibility_code,'OPEN_BIDDING','N','SEALED_BIDDING','Y','N')
    into x_role_name, x_sealed_flag
    from pon_auction_headers_all
    where auction_header_id = p_auction_header_id;
Line: 2038

    SELECT pon_auction_wf_rtbid_s.nextval
    INTO   x_sequence
    FROM   dual;
Line: 2197

    select bid_type, nvl(ah.auction_round_number, 1) auction_round_number, bih.note_to_supplier,
     ah.document_number, dt.doctype_group_name, dt.doctype_id,
     bhz.person_first_name || ' ' ||  bhz.person_last_name, ah.trading_partner_contact_name,
       bih.trading_partner_name, decode(bih.vendor_site_code, '-1', null, bih.vendor_site_code) vendor_site_code,
       view_by_date, nvl(ah.has_items_flag, 'Y'), ah.staggered_closing_interval,bih.award_status
    from hz_parties bhz, pon_bid_headers bih, pon_auction_headers_all ah, pon_auc_doctypes dt
    where bhz.party_id = bih.trading_partner_contact_id
    and   bih.bid_number = p_bid_id
    and   ah.auction_header_id = bih.auction_header_id
    and   ah.doctype_id = dt.doctype_id;
Line: 2235

    SELECT pon_auction_wf_acbid_s.nextval
    INTO   x_sequence
    FROM   dual;
Line: 2255

          select reason
          into x_note_to_supplier
          FROM pon_acceptances
          WHERE auction_header_id = p_auction_header_id
          and bid_number = p_bid_id
          AND ACCEPTANCE_TYPE = 'REJECTED'
          AND rownum = 1;
Line: 2367

    select   count(pbip.line_number)
    into   x_number_awarded
    from   pon_bid_item_prices pbip,
    pon_auction_item_prices_all paip
    where   paip.auction_header_id   = p_auction_header_id
    and    paip.line_number   = pbip.line_number
    and    pbip.bid_number    = p_bid_id
    and    nvl(pbip.award_status,'NONE')= 'AWARDED'
    and    paip.group_type in ('LINE', 'LOT', 'GROUP_LINE');
Line: 2377

    select   count(pbip.line_number)
    into   x_number_rejected
    from   pon_bid_item_prices pbip,
    pon_auction_item_prices_all paip
    where   paip.auction_header_id   = p_auction_header_id
    and    paip.line_number   = pbip.line_number
    and    pbip.bid_number    = p_bid_id
    and    nvl(pbip.award_status,'NONE')= 'REJECTED'
    and    paip.group_type in ('LINE', 'LOT', 'GROUP_LINE');
Line: 2447

    select open_bidding_date, close_bidding_date, award_date, event_id
    into x_auction_open_bidding_date, x_auction_close_bidding_date, x_award_date, x_event_id
    from pon_auction_headers_all
    where auction_header_id = p_auction_header_id;
Line: 2472

  select trading_partner_contact_id
  into x_bidder_contact_id
  from pon_bid_headers
  where bid_number = p_bid_id;
Line: 2679

      select wf_item_key into x_itemkey
  from pon_auction_headers_all
  where auction_header_id = (select auction_header_id_prev_round
           from pon_auction_headers_all where auction_header_id = x_doc_header_id);
Line: 2712

        select auction_header_id_prev_amend
        into   x_prev_doc_header_id
        from pon_auction_headers_all
        where auction_header_id = x_doc_header_id;
Line: 2717

        select wf_item_key, nvl(amendment_number, 0)
        into x_itemkey, x_prev_doc_amendment_number
        from pon_auction_headers_all
        where auction_header_id = x_prev_doc_header_id;
Line: 2732

           select activity_label
           into x_current_activity
           from wf_item_activity_statuses_v
           where item_type = x_itemtype
           AND item_key = x_itemkey
           and activity_status_code = 'NOTIFIED';
Line: 2757

    select pbp.wf_item_key wf_item_key, act.activity_label activity_label
    from   pon_bidding_parties pbp,
           wf_item_activity_statuses_v act
    where  pbp.auction_header_id = p_prev_doc_header_id and
           act.item_type = x_itemtype and
           act.item_key = pbp.wf_item_key and
           act.activity_status_code = 'NOTIFIED';
Line: 2828

   x_deleted_contact_flag    BOOLEAN;
Line: 3115

SELECT fu.user_name user_name,
       trading_partner_id   party_id,
       trading_partner_name party_name,
       DECODE(vendor_site_code, '-1', NULL, vendor_site_code) vendor_site_code,
       vendor_site_id
FROM   pon_bidding_parties pbp,
     fnd_user fu
WHERE  auction_header_id = x_doc_header_id_prev_round
AND    fu.person_party_id = pbp.trading_partner_contact_id
AND    nvl(fu.end_date, sysdate+1) > sysdate
UNION
-- Then pick all the additional contacts from bidding parties table.
SELECT DISTINCT(wlur.user_name)  user_name,
       pbp.trading_partner_id   party_id,
       pbp.trading_partner_name party_name,
       DECODE(pbp.vendor_site_code, '-1', NULL, pbp.vendor_site_code) vendor_site_code,
       pbp.vendor_site_id
FROM   pon_bidding_parties pbp,
     wf_local_user_roles wlur
WHERE  pbp.auction_header_id = x_doc_header_id_prev_round
AND    wlur.role_name = x_role_name
AND    wlur.user_name = pbp.wf_user_name
AND pbp.trading_partner_id is not null --leave out requested suppliers
UNION
-- Then pick all the suppliers who have bid.
-- The responses for negotiation may or may not be invited.
SELECT DISTINCT(wlur.user_name)  user_name,
       pbh.trading_partner_id    party_id,
     pbh.trading_partner_name  party_name,
       DECODE(pbh.vendor_site_code, '-1', NULL, pbh.vendor_site_code) vendor_site_code,
       pbh.vendor_site_id
FROM   wf_local_user_roles wlur,
       pon_bid_headers pbh
WHERE  wlur.role_name = x_role_name
AND    x_doc_header_id_prev_round  = pbh.auction_header_id
AND    wlur.user_name = pbh.trading_partner_contact_name(+);
Line: 3153

    select trading_partner_id,vendor_site_id
    from   pon_bidding_parties pbp
    where  auction_header_id = x_doc_header_id;
Line: 3247

    select auction_header_id_prev_round, trading_partner_contact_name,
           staggered_closing_interval
    into x_doc_header_id_prev_round, x_auctioneer_user_name,
         x_staggered_closing_interval
    from pon_auction_headers_all where auction_header_id = x_doc_header_id;
Line: 3253

    select wf_role_name
    into x_role_name
    from pon_auction_headers_all
    where auction_header_id = x_doc_header_id_prev_round;
Line: 3290

      SELECT pon_auction_wf_publish_s.nextval
      INTO   x_sequence
      FROM   dual;
Line: 3426

                           select language into x_language_code
                           from wf_users where name = x_bidder_username;
Line: 3496

      select party_name into x_bidder_name
      from hz_parties where party_id = x_prev_trading_partner_id;
Line: 3506

    select party_name into x_bidder_name
    from hz_parties where
    party_id = (select person_party_id from fnd_user where user_name = prevBidder.user_name);
Line: 3653

           SELECT pon_auction_wf_role_s.nextval
    INTO   x_sequence
    FROM   dual;
Line: 3673

    UPDATE pon_auction_headers_all set
    wf_role_name = x_role_name
    WHERE auction_header_id = x_auction_header_id;
Line: 3699

    select user_name
    from   wf_user_roles
    where  role_name = x_prev_doc_role_name;
Line: 3713

    select wf_role_name
    into   x_prev_doc_role_name
    from   pon_auction_headers_all
    where  auction_header_id = (select auction_header_id_prev_amend
                                from   pon_auction_headers_all
                                where  auction_header_id = x_auction_header_id);
Line: 3778

    select pbp.trading_partner_contact_name,
     pbp.trading_partner_contact_id,
     pbp.trading_partner_name,
     pbp.trading_partner_id,
     pbp.additional_contact_email,
           pbp.vendor_site_id,
           pbp.requested_supplier_id,
           pbp.requested_supplier_contact_id,
           pcr.email_address rs_contact_email
    from pon_bidding_parties pbp, pos_contact_requests pcr
    where pbp.auction_header_id = x_auction_header_id
    and pbp.requested_supplier_contact_id = pcr.contact_request_id (+);
Line: 3792

    select user_name
  from fnd_user where person_party_id = (select   trading_partner_contact_id
                                       from pon_auction_headers_all
                                       where auction_header_id = x_auction_header_id)
        and nvl(end_date,sysdate+1) > sysdate
        and rownum = 1;
Line: 3823

    select NLS_LANGUAGE into l_auctioneer_nls_language
    from fnd_languages
    where language_code = x_language_code;
Line: 3827

    select nls_territory into l_auctioneer_nls_territory
    from   fnd_territories
    where  territory_code = x_territory_code;
Line: 3842

        select user_name
      into x_user_name
      from fnd_user where person_party_id = x_person_party_id
            and nvl(end_date, sysdate+1) > sysdate;
Line: 3856

           select user_name
           into x_user_name
           from fnd_user
           where person_party_id = x_person_party_id
           and nvl(end_date, sysdate+1) > sysdate
           and rownum=1;
Line: 3868

            select to_char(user_id)
            into x_user_orig_system_id
            from fnd_user
            where user_name = x_user_name;
Line: 3876

  select count(*)
  into x_bidder_count
  from wf_local_user_roles
  where role_name = x_role_name
  and user_name = x_user_name;
Line: 3905

    select NOTIFICATION_PREFERENCE, LANGUAGE, TERRITORY
    into   x_contact_notif_pref, x_contact_lang, x_contact_territory
    from wf_users where name = x_user_name;
Line: 3919

         select NLS_LANGUAGE into x_nls_language
         from fnd_languages
         where language_code = x_language_code;
Line: 3923

         select nls_territory into x_nls_territory
         from   fnd_territories
         where  territory_code = x_territory_code;
Line: 3939

     SELECT pon_auction_wf_bidder_s.nextval
             INTO   x_sequence
             FROM   dual;
Line: 3960

    UPDATE pon_bidding_parties set
        wf_user_name = x_user_name
    WHERE auction_header_id = x_auction_header_id
    AND   trading_partner_id = bidder.trading_partner_id
      AND   vendor_site_id     = bidder.vendor_site_id;
Line: 3982

      SELECT pon_auction_wf_bidder_s.nextval
      INTO x_sequence
      FROM dual;
Line: 4003

      UPDATE pon_bidding_parties
         set wf_user_name = x_user_name
       WHERE auction_header_id = x_auction_header_id
         AND requested_supplier_id = bidder.requested_supplier_id;
Line: 4238

    select wf_role_name
    into   x_role_name
    from   pon_auction_headers_all
    where  auction_header_id = p_auction_header_id;
Line: 4244

      select user_name
      into   x_bidder_user_name
      from   fnd_user
      where  person_party_id= p_trading_partner_contact_id
      and nvl(end_date, sysdate+1) > sysdate;
Line: 4259

         select user_name
         into x_bidder_user_name
         from fnd_user
         where person_party_id = p_trading_partner_contact_id
         and nvl(end_date, sysdate+1) > sysdate
         and rownum=1;
Line: 4308

    select 'Y' into x_flag
    from pon_bidding_parties
    where auction_header_id = x_auction_header_id
    and trading_partner_contact_id = x_bidder_contact_id
    group by trading_partner_contact_id;
Line: 4341

  select count(*)
  into x_bidder_count
  from wf_local_user_roles
  where role_name = p_role_name
  and user_name = p_user_name;
Line: 4403

   select wf_item_key, sysdate, cancel_date
     into x_itemkey, x_now, x_cancel_date
     from pon_auction_headers_all
     where auction_header_id = p_auction_header_id;
Line: 4414

      select activity_label
  into x_current_activity
  from wf_item_activity_statuses_v
  where item_type = x_itemtype
  AND item_key = x_itemkey
  and activity_status_code = 'NOTIFIED';
Line: 4427

      select action_note
  into   x_cancel_reason
  from pon_action_history
  where object_id = p_auction_header_id
  and   object_type_code = 'PON_AUCTION'
  and action_type = 'CANCEL';
Line: 4484

     select pah.close_bidding_date
     into   v_end_date
     from   pon_auction_headers_all pah
     where  pah.auction_header_id = p_auction_header_id;
Line: 4510

     select pah.auction_status, pah.creation_date, pah.close_bidding_date, nvl( pah.is_paused, 'N' ), nvl( pah.last_pause_date, sysdate )
            , auction_header_id_orig_round, nvl(auction_round_number,0),
nvl(amendment_number,0)
     into   v_auction_status, v_creation_date, v_end_date, v_is_paused, v_last_pause_date
            , v_auction_header_id_orig_round, v_auction_round_number,
v_amendment_number
     from   pon_auction_headers_all pah
     where  pah.auction_header_id = p_auction_header_id;
Line: 4636

     select auction_status, open_bidding_date, close_bidding_date, nvl( last_pause_date, sysdate ), nvl( is_paused, 'N' ), staggered_closing_interval
     into   v_auction_status, v_startdate, v_enddate, v_pausedate, v_ispaused, v_staggered_closing_interval
     from   pon_auction_headers_all
     where  auction_header_id = p_auction_header_id;
Line: 4643

     select pah.auction_status, pah.open_bidding_date, nvl(paip.close_bidding_date, pah.close_bidding_date),
            nvl( pah.last_pause_date, sysdate ), nvl( pah.is_paused, 'N' )
     into   v_auction_status, v_startdate, v_enddate, v_pausedate, v_ispaused
     from   pon_auction_headers_all pah, pon_auction_item_prices_all paip
     where  pah.auction_header_id = p_auction_header_id and
            paip.auction_header_id = pah.auction_header_id and
            paip.line_number = p_line_number;
Line: 4916

    update pon_auction_headers_all
    set    auction_status = 'OPEN_FOR_BIDDING',
     auction_status_name = (select meaning from fnd_lookups
          where lookup_type = 'PON_AUCTION_STATUS' and
          lookup_code = 'OPEN_FOR_BIDDING')
    where auction_header_id = x_auction_header_id;
Line: 4946

    update pon_auction_headers_all
    set    auction_status = 'CLOSED_FOR_BIDDING',
     auction_status_name = (select meaning from fnd_lookups
          where lookup_type = 'PON_AUCTION_STATUS' and
          lookup_code = 'CLOSED_FOR_BIDDING')
    where auction_header_id = x_auction_header_id;
Line: 4972

select meaning into lookupMeaning
from fnd_lookup_values
where lookup_type = lookupType and
      language    = langCode   and
      lookup_code = lookupCode;
Line: 4989

select sum(AWARD_QUANTITY * BID_CURRENCY_PRICE)
from pon_bid_item_prices
where bid_number = p_po_id
and award_status = 'AWARDED';
Line: 5075

      select 'Y'
  into x_flag
  from pon_auction_headers_all
  where auction_header_id = p_auction_number
  and   event_id is not null;
Line: 5186

   select wf_item_key, sysdate
     into x_itemkey, x_now
     from pon_auction_headers_all
     where auction_header_id = p_auction_header_id;
Line: 5196

      select activity_label
  into x_current_activity
  from wf_item_activity_statuses_v
  where item_type = x_itemtype
  AND item_key = x_itemkey
  and activity_status_code = 'NOTIFIED';
Line: 5323

   select wf_item_key, trading_partner_contact_id
     into x_itemkey, x_contact_id
     from pon_auction_headers_all
     where auction_header_id = p_auction_header_id;
Line: 5329

    select user_name
    into x_user_name
    from fnd_user
    where  person_party_id = x_contact_id
    and nvl(end_date, sysdate+1) > sysdate;
Line: 5344

         select user_name
         into x_user_name
         from fnd_user
         where person_party_id = x_contact_id
         and nvl(end_date, sysdate+1) > sysdate
         and rownum=1;
Line: 5362

      select activity_label
        into x_current_activity
        from wf_item_activity_statuses_v
        where item_type = x_itemtype
        AND item_key = x_itemkey
        and activity_status_code = 'NOTIFIED';
Line: 5436

   select wf_item_key, trading_partner_contact_id
     into x_itemkey, x_contact_id
     from pon_auction_headers_all
     where auction_header_id = p_auction_header_id;
Line: 5442

     select user_name
     into x_user_name
     from fnd_user
     where  person_party_id = x_contact_id
     and nvl(end_date, sysdate+1) > sysdate;
Line: 5457

         select user_name
         into x_user_name
         from fnd_user
         where person_party_id = x_contact_id
         and nvl(end_date, sysdate+1) > sysdate
         and rownum=1;
Line: 5474

      select activity_label
        into x_current_activity
        from wf_item_activity_statuses_v
        where item_type = x_itemtype
        AND item_key = x_itemkey
        and activity_status_code = 'NOTIFIED';
Line: 5536

      select event.event_title
 into eventTitle
 from pon_auction_headers_all ah,pon_auction_events event
 where auction_header_id = p_auction_number
 and  ah.event_id=event.event_id;
Line: 5604

   MsgTokens.DELETE;
Line: 5605

   MsgTokenValues.DELETE;
Line: 5645

   MsgTokens.DELETE;
Line: 5646

   MsgTokenValues.DELETE;
Line: 5668

   MsgTokens.DELETE;
Line: 5669

   MsgTokenValues.DELETE;
Line: 5693

   MsgTokens.DELETE;
Line: 5694

   MsgTokenValues.DELETE;
Line: 5720

   MsgTokens.DELETE;
Line: 5721

   MsgTokenValues.DELETE;
Line: 5746

      SELECT message_suffix
      INTO x_msg_suffix
      FROM pon_auc_doctypes
      WHERE doctype_group_name = x_doctype_group_name;
Line: 5767

      SELECT transaction_type
      INTO x_trans_type
      FROM pon_auc_doctypes
      WHERE doctype_group_name = p_doctype_group_name;
Line: 5806

               message  => 'g_original_lang_code is not null so selecting g_original_language from the DB ');
Line: 5809

         select nls_language
         into g_original_language
         from fnd_languages
         where language_code = g_original_lang_code;
Line: 5817

              message  => 'g_original_lang_code is : ' || g_original_lang_code || ' after selecting it from the DB ');
Line: 5845

                 message  => 'p_language_code is NULL so selecting it from fnd_language ');
Line: 5848

      select language_code
      into x_language_code
      from fnd_languages
      where nls_language = p_language;
Line: 5897

               message  => 'p_language is NULL so selecting it from fnd_languages');
Line: 5900

      select nls_language
      into x_language
      from fnd_languages
      where language_code = x_language_code;
Line: 6061

      select wfu.user_name user_name, person_party_id
      from wf_user_roles wfu, fnd_user fnd
      where role_name = x_wf_role_name
      and fnd.user_name (+) =  wfu.user_name
      AND wfu.user_name NOT IN (SELECT wf_user_name FROM pon_bidding_parties
        WHERE auction_header_id = x_doc_number AND trading_partner_id IS NULL);
Line: 6069

      select trading_partner_name, decode(vendor_site_code, '-1', null, vendor_site_code) vendor_site_code, nvl(vendor_site_id, -1) vendor_site_id
      from pon_bidding_parties
      where trading_partner_contact_id = x_trading_partner_contact_id
      and auction_header_id = x_doc_number
      union
      select trading_partner_name, decode(vendor_site_code, '-1', null, vendor_site_code) vendor_site_code, nvl(vendor_site_id, -1) vendor_site_id
      from pon_bid_headers
      where trading_partner_contact_id = x_trading_partner_contact_id
      and auction_header_id = x_doc_number;
Line: 6115

        select wf_role_name, wf_item_key, original_close_bidding_date, event_id, trading_partner_contact_name,
               staggered_closing_interval
        into  x_wf_role_name, x_wf_item_key, x_original_close_bidding_date, x_event_id, x_tp_contact_name,
              x_staggered_closing_interval
        from pon_auction_headers_all
        where auction_header_id = x_doc_number;
Line: 6211

       select trading_partner_name, decode(vendor_site_code, '-1', null, vendor_site_code) vendor_site_code, nvl(vendor_site_id, -1) vendor_site_id
       into x_bidder_tp_name, x_vendor_site_code, x_vendor_site_id
       from pon_bidding_parties
       where wf_user_name = bidder.user_name
       and auction_header_id = x_doc_number;
Line: 6339

      select wf_item_key into p_itemkey
      from pon_auction_headers_all
      where auction_header_id = p_auction_id;
Line: 6367

            select dt.doctype_group_name
            into x_doctype_group_name
            from pon_auction_headers_all auh, pon_auc_doctypes dt
            where auh.auction_header_id = x_auction_header_id
            and auh.doctype_id = dt.doctype_id;
Line: 6389

      SELECT pon_auction_wf_publish_s.nextval
      INTO   x_sequence
      FROM   dual;
Line: 6430

      select view_by_date
      into x_preview_date
      from pon_auction_headers_all where auction_header_id = x_auction_header_id;
Line: 6612

    select
     trading_partner_contact_name,
     trading_partner_contact_id,
     trading_partner_name,
     trading_partner_id,
     wf_user_name,
     additional_contact_email,
       registration_id,
       decode(pbp.vendor_site_code, '-1', null, pbp.vendor_site_code) vendor_site_code,
       pbp.vendor_site_id,
       pbp.requested_supplier_id,
       pbp.requested_supplier_name,
       pbp.requested_supplier_contact_id,
       pbp.requested_supp_contact_name,
       pcr.email_address rs_contact_email
    from pon_bidding_parties pbp,
         pos_contact_requests pcr
    where auction_header_id = x_auction_header_id
    and pbp.requested_supplier_contact_id = pcr.contact_request_id(+)
    and wf_item_key IS NULL;
Line: 6634

    select auction_type, event_id, event_title, open_bidding_date, trading_partner_id,
           staggered_closing_interval
    from pon_auction_headers_all
    where auction_header_id = x_auction_header_id;
Line: 6646

    select wf_item_key , trading_partner_contact_name into p_itemkey, x_auctioneer_user_name
      from pon_auction_headers_all
      where auction_header_id = x_auction_header_id;
Line: 6698

    select NLS_LANGUAGE into x_nls_language
    from fnd_languages
    where language_code = x_language_code;
Line: 6702

    select nls_territory into x_nls_territory
    from   fnd_territories
    where  territory_code = x_territory_code;
Line: 6717

    select wf_role_name, wf_item_key into x_role_name, p_itemkey
    from pon_auction_headers_all
    where auction_header_id = x_auction_header_id;
Line: 6738

       select count(*) into x_bidder_count
     from wf_local_user_roles
     where role_name = x_role_name
     and user_name = x_user_name;
Line: 6810

      SELECT pon_auction_wf_publish_s.nextval
      INTO   x_sequence
      FROM   dual;
Line: 7035

         SELECT pon_auction_wf_bidder_s.nextval
      INTO   x_sequence
      FROM   dual;
Line: 7042

         select count(*) into x_bidder_count
         from wf_local_user_roles
         where role_name = x_role_name
        and user_name = bidder.wf_user_name;
Line: 7059

                 select registration_key
                  into x_registration_key
                  from fnd_registrations
                 where registration_id = bidder.registration_id;
Line: 7092

        select NLS_LANGUAGE into x_nls_addnl_language
        from fnd_languages
        where language_code = x_language_code;
Line: 7096

        select nls_territory into x_nls_addnl_territory
        from   fnd_territories
        where  territory_code = x_territory_code;
Line: 7118

            UPDATE pon_bidding_parties set
            wf_user_name = x_additional_user_name
            WHERE auction_header_id = x_auction_header_id
            AND  trading_partner_id = bidder.trading_partner_id
            AND  vendor_site_id = bidder.vendor_site_id;
Line: 7131

       SELECT pon_auction_wf_bidder_s.nextval
                INTO   x_sequence
                FROM   dual;
Line: 7135

       SELECT count(*) INTO x_bidder_count
       FROM wf_local_user_roles
       WHERE role_name = x_role_name
          AND user_name = bidder.wf_user_name;
Line: 7173

          UPDATE pon_bidding_parties SET
            wf_user_name = x_rs_user_name
            WHERE auction_header_id = x_auction_header_id
            AND  (trading_partner_id = bidder.trading_partner_id
                             or requested_supplier_id = bidder.requested_supplier_id)
            AND  vendor_site_id = bidder.vendor_site_id;
Line: 7195

       update pon_bidding_parties
       set wf_item_key = t_itemkey
       where  auction_header_id = x_auction_header_id and
              (trading_partner_id = bidder.trading_partner_id
               or requested_supplier_id = bidder.requested_supplier_Id) and
              vendor_site_id = bidder.vendor_site_id and
              wf_item_key is null;
Line: 7216

  select wf_item_key into x_item_key
  from pon_auction_headers_all
  where auction_header_id = p_auction_header_id;
Line: 7232

  select user_name
        into x_user_name
  from fnd_user
        where person_party_id = p_user_id
        and nvl(end_date,sysdate+1) > sysdate;
Line: 7247

         select user_name
         into x_user_name
         from fnd_user
         where person_party_id = p_user_id
         and nvl(end_date, sysdate+1) > sysdate
         and rownum=1;
Line: 7262

  select count(*) into x_count
  from fnd_user where user_name = p_user_name;
Line: 7278

    select trading_partner_contact_id
        into x_user_id
    from pon_bidding_parties
    where auction_header_id = p_doc_id
    and wf_user_name = p_user_name;
Line: 7313

    select name
    into x_timezone_desc
    from fnd_timezones_tl tl, fnd_timezones_b b
    where b.upgrade_tz_id = p_timezone_id
    and b.timezone_code = tl.timezone_code
          and tl.language = lang;
Line: 7350

    select user_id
    into  x_user_id
    from fnd_user
    where person_party_id = contact_id
                and nvl(end_date, sysdate+1) > sysdate;
Line: 7366

                 select user_id
                 into x_user_id
                 from fnd_user
                 where person_party_id = contact_id
                 and nvl(end_date, sysdate+1) > sysdate
                 and rownum=1;
Line: 7384

                 select user_id
                 into x_user_id
                 from fnd_user
                 where person_party_id = contact_id
                 and rownum=1;
Line: 7416

    SELECT person_party_id
    INTO x_contact_id
    FROM fnd_user
    WHERE user_name = contact_name;
Line: 7463

select need_by_start_date,need_by_date
from   pon_auction_item_prices_all
where  auction_header_id = auctionID and
      line_number = lineNumber;
Line: 7523

  select parameter_value into l_debug_level from pon_operator_parameters where parameter_name ='xmlDebugLevel' ;
Line: 7528

 select to_char(PON_PO_WF_ITEMKEY_S.NEXTVAL)
 into l_seq from sys.dual;
Line: 7600

select PON_PO_WF_ITEMKEY_S.nextval into l_wf_item_seq from dual;
Line: 7635

   SELECT close_bidding_date, reminder_date
     INTO x_closedate, x_reminderdate
     FROM pon_auction_headers_all
     WHERE auction_header_id=x_this_auction_header_id;
Line: 7650

PROCEDURE  update_ack_to_YES (        itemtype    in varchar2,
             itemkey    in varchar2,
             actid           in number,
             uncmode    in varchar2,
             resultout          out NOCOPY varchar2)

  IS

     x_trading_partner_id     NUMBER;
Line: 7693

   SELECT close_bidding_date,auction_status
     INTO x_closedate, x_auction_status
     FROM pon_auction_headers_all
     WHERE auction_header_id=x_doc_number;
Line: 7700

   IF (x_closedate>x_now AND x_auction_status<>'CANCELLED' AND x_auction_status<>'DELETED') then

        UPDATE pon_bidding_parties
  SET supp_acknowledgement='Y',
    ack_note_to_auctioneer = x_note,
          ack_partner_contact_id = trading_partner_contact_id,
          acknowledgement_time = x_now
        WHERE (trading_partner_id= x_trading_partner_id
         or  wf_user_name= x_wf_user_name )
         and nvl(vendor_site_id, -1) = nvl(x_vendor_site_id , -1)
         and auction_header_id=x_doc_number;
Line: 7716

   END update_ack_to_yes;
Line: 7721

PROCEDURE  UPDATE_ACK_TO_NO (        itemtype    in varchar2,
             itemkey    in varchar2,
             actid           in number,
             uncmode    in varchar2,
             resultout          out NOCOPY varchar2)

  IS

     x_trading_partner_id     NUMBER;
Line: 7764

  SELECT close_bidding_date,auction_status
     INTO x_closedate, x_auction_status
     FROM pon_auction_headers_all
     WHERE auction_header_id=x_doc_number;
Line: 7771

   IF (x_closedate>x_now AND x_auction_status<>'CANCELLED' AND x_auction_status<>'DELETED') then


        UPDATE pon_bidding_parties
  SET supp_acknowledgement='N',
    ack_note_to_auctioneer = x_note,
          ack_partner_contact_id = trading_partner_contact_id,
          acknowledgement_time = x_now
       WHERE (trading_partner_id= x_trading_partner_id
         or  wf_user_name= x_wf_user_name )
         and nvl(vendor_site_id,-1) = nvl(x_vendor_site_id,-1)
         and auction_header_id=x_doc_number;
Line: 7788

   END update_ack_to_no;
Line: 7933

      SELECT pon_auction_wf_publish_s.nextval
      INTO   x_sequence
      FROM   dual;
Line: 8297

 UPDATE pon_bidding_parties set
 wf_item_key = x_itemkey
 WHERE trading_partner_id = x_tp_id
 AND auction_header_id = x_auction_header_id;
Line: 8322

   select
     fu.user_name my_user_name,
     pbd.trading_partner_id,
     pbd.trading_partner_name my_user_display_name,
     decode(pbd.vendor_site_code, '-1', null, pbd.vendor_site_code) vendor_site_code,
     pbd.wf_user_name additional_name,
     pbd.wf_item_key,
     pbd.additional_contact_email,
     pbd.registration_id,
     pbd.trading_partner_contact_id, -- Bug 3824928 added
     pbd.vendor_site_id
   from pon_bidding_parties pbd,
        fnd_user fu
   WHERE pbd.trading_partner_contact_id=fu.person_party_id (+) AND -- Bug 3824928: added outer join
          nvl(fu.end_date, sysdate+1) > sysdate  AND                                -- Added for TCA project
          pbd.auction_header_id=x_doc_number AND
          nvl(pbd.supp_acknowledgement,'havenot')= 'havenot'
          and pbd.trading_partner_id is not null;
Line: 8457

    SELECT wf_item_key
    INTO x_wf_item_key
    FROM pon_auction_headers_all
    WHERE auction_header_id=x_doc_number;
Line: 8462

       select trading_partner_id, trading_partner_contact_name
          into x_tp_id, x_auction_tp_contact_name
          from pon_auction_headers_all
          where auction_header_id = x_doc_number;
Line: 8472

  SELECT COUNT(bid_number)
    INTO x_bids_by_company
    FROM pon_bid_headers
    WHERE auction_header_id=x_doc_number
    AND trading_partner_id=bidder.trading_partner_id;
Line: 8491

            SELECT person_party_id
        INTO x_person_party_id
        FROM fnd_user
        WHERE user_name = bidder.my_user_name;
Line: 8566

    SELECT pon_auction_wf_publish_s.nextval
      INTO   x_sequence
      FROM   dual;
Line: 8776

                select registration_key
                  into x_registration_key
                  from fnd_registrations
                 where registration_id = bidder.registration_id;
Line: 8815

        UPDATE pon_bidding_parties set
            wf_item_key = x_itemkey
        WHERE trading_partner_id = bidder.trading_partner_id
        AND auction_header_id = x_doc_number
        AND vendor_site_id = bidder.vendor_site_id; -- Supplier/supplier site combination can be different in 11.5.10
Line: 8873

 PROCEDURE :  DELETE_NEGOTIATION_LINE_REF    PUBLIC
 PARAMETERS:
  x_negotiation_id        in      auction header id
  x_negotiation_line_num  in      negotiation line number
  x_org_id                in      organization id
x  x_error_code            out     internal code for error

 COMMENT   : delete negotiation line references
======================================================================*/
PROCEDURE DELETE_NEGOTIATION_LINE_REF (
    x_negotiation_id        in   number,
    x_negotiation_line_num  in   number,
    x_org_id                in   number,
    x_error_code            out  NOCOPY varchar2) is

BEGIN

      -- first, remove records in pon_backing_requisitions
      delete
        from  pon_backing_requisitions
       where  auction_header_id = x_negotiation_id
         and  line_number = x_negotiation_line_num;
Line: 8898

      PO_NEGOTIATIONS_SV1.DELETE_NEGOTIATION_REF(
  X_NEGOTIATION_ID  =>  x_negotiation_id,
  X_NEGOTIATION_LINE_NUM  =>  x_negotiation_line_num,
  X_ERROR_CODE    =>  x_error_code);
Line: 8903

END DELETE_NEGOTIATION_LINE_REF;
Line: 8906

 PROCEDURE :  DELETE_NEGOTIATION_REF    PUBLIC
 PARAMETERS:
  x_negotiation_id        in      auction header id
  x_error_code            out     internal code for error

 COMMENT   : delete negotiation references
======================================================================*/
PROCEDURE DELETE_NEGOTIATION_REF (
   x_negotiation_id in  number,
   x_error_code     out NOCOPY varchar2) is

BEGIN

      PO_NEGOTIATIONS_SV1.DELETE_NEGOTIATION_REF(
  X_NEGOTIATION_ID  =>  x_negotiation_id,
  X_NEGOTIATION_LINE_NUM  =>  null,
  X_ERROR_CODE    =>  x_error_code);
Line: 8924

END DELETE_NEGOTIATION_REF;
Line: 8941

      PO_NEGOTIATIONS_SV1.UPDATE_REQ_POOL(
  X_NEGOTIATION_ID  =>  x_negotiation_id,
  X_NEGOTIATION_LINE_NUM  =>  null,
  X_FLAG_VALUE    =>  'Y',
  X_ERROR_CODE    =>  x_error_code);
Line: 8950

 PROCEDURE :  UPDATE_NEGOTIATION_REF   PUBLIC
 PARAMETERS:
  x_old_negotiation_id   in   old auction header id
  x_old_negotiation_num  in   old auction display number
  x_new_negotiation_id   in   new auction header id
  x_new_negotiation_num  in   new auction display number
  x_error_code           out  internal code for error
  x_error_message        out  error message

 COMMENT   : update negotiation references
======================================================================*/
PROCEDURE UPDATE_NEGOTIATION_REF(
    x_old_negotiation_id   in   number,
    x_old_negotiation_num  in   varchar2,
    x_new_negotiation_id   in   number,
    x_new_negotiation_num  in   varchar2,
    x_error_code           out  NOCOPY varchar2,
    x_error_message        out  NOCOPY varchar2  ) is

l_line_number number;
Line: 8971

CURSOR deletedItems IS
     SELECT LINE_NUMBER
      FROM  PON_AUCTION_ITEM_PRICES_ALL
     WHERE  auction_header_id = x_old_negotiation_id and
            line_number not in ( select line_number
                                   from PON_AUCTION_ITEM_PRICES_ALL
                                  where auction_header_id = x_new_negotiation_id);
Line: 8981

      PO_NEGOTIATIONS_SV1.UPDATE_NEGOTIATION_REF(
  X_OLD_NEGOTIATION_ID  =>  x_old_negotiation_id,
  X_NEW_NEGOTIATION_ID  =>  x_new_negotiation_id,
  X_NEW_NEGOTIATION_NUM  =>  x_new_negotiation_num,
  X_ERROR_CODE    =>  x_error_code);
Line: 9005

      OPEN deletedItems;
Line: 9007

        FETCH deletedItems INTO
          l_line_number;
Line: 9009

        EXIT WHEN deletedItems%NOTFOUND OR (x_error_code <> FND_API.G_RET_STS_SUCCESS);
Line: 9013

        PO_NEGOTIATIONS_SV1.UPDATE_NEGOTIATION_LINE_REF(
    P_API_VERSION      =>  1.0,
    P_OLD_NEGOTIATION_ID    =>  x_new_negotiation_id,
    P_OLD_NEGOTIATION_LINE_NUM  =>  l_line_number,
    P_NEW_NEGOTIATION_ID    =>  x_old_negotiation_id,
    P_NEW_NEGOTIATION_LINE_NUM  =>  l_line_number,
    P_NEW_NEGOTIATION_NUM    =>  x_old_negotiation_num,
    X_RETURN_STATUS      =>  x_error_code,
    X_ERROR_MESSAGE      =>  x_error_message);
Line: 9026

        PO_NEGOTIATIONS_SV1.UPDATE_REQ_POOL(
    X_NEGOTIATION_ID    =>  x_old_negotiation_id,
    X_NEGOTIATION_LINE_NUM     =>  null,
    X_FLAG_VALUE      =>  'Y',
    X_ERROR_CODE      =>  x_error_code);
Line: 9038

END UPDATE_NEGOTIATION_REF;
Line: 9047

 COMMENT   : update negotiation references
======================================================================*/
PROCEDURE COPY_BACKING_REQ(x_old_negotiation_id in  number,
                           x_new_negotiation_id in  number,
                           x_error_code         out NOCOPY varchar2) is

neg_item_count    NUMBER;
Line: 9063

     SELECT LINE_NUMBER,
            REQUISITION_HEADER_ID,
            REQUISITION_LINE_ID,
            REQUISITION_QUANTITY,
            REQUISITION_NUMBER
      FROM  PON_BACKING_REQUISITIONS
     WHERE  auction_header_id = x_old_negotiation_id;
Line: 9083

       SELECT count(*)
         INTO l_count
         FROM PON_BACKING_REQUISITIONS
        WHERE auction_header_id = x_new_negotiation_id and
              line_number = l_line_number and
              requisition_header_id = l_req_header_id and
              requisition_line_id = l_req_line_id;
Line: 9092

       SELECT count(*)
   INTO neg_item_count
         FROM PON_AUCTION_ITEM_PRICES_ALL
        WHERE auction_header_id = x_new_negotiation_id and
              line_number = l_line_number;
Line: 9099

          INSERT INTO PON_BACKING_REQUISITIONS(
            AUCTION_HEADER_ID,
            LINE_NUMBER,
            REQUISITION_HEADER_ID,
            REQUISITION_LINE_ID,
            REQUISITION_QUANTITY,
            REQUISITION_NUMBER)
          VALUES (
            x_new_negotiation_id,
            l_line_number,
            l_req_header_id,
            l_req_line_id,
            l_req_quantity,
            l_req_number);
Line: 9143

      PO_NEGOTIATIONS_SV1.UPDATE_REQ_POOL(
    X_NEGOTIATION_ID  =>  x_negotiation_id,
    X_NEGOTIATION_LINE_NUM   =>  x_negotiation_line_id,
    X_FLAG_VALUE    =>  'Y',
    X_ERROR_CODE    =>  x_error_code);
Line: 9194

   SELECT org_id, contract_type
   INTO   v_org_id, v_contract_type
   FROM   pon_auction_headers_all
   WHERE  auction_header_id = p_auction_id;
Line: 9238

   select   notification_id,   ACTIVITY_STATUS
      into   l_notification_id, l_activity_status
    from   wf_item_activity_statuses
    where   item_key  = p_wf_item_key
    and   item_type  = 'PONPBLSH'
    and   notification_id is not null
  and   activity_status = 'NOTIFIED'
    and   rownum    = 1;
Line: 9297

  select (sysdate - close_bidding_date) into p_time_remaining
  from pon_auction_headers_all
  where auction_header_id = p_auction_header_id;
Line: 9317

  select application_id
  into   x_app_id
  from   fnd_application
  where application_short_name = x_product_name ;
Line: 9400

 PROCEDURE :  DELETE_NEGOTIATION_AMENDMENTS    PUBLIC
 PARAMETERS:
  x_negotiation_id        in      auction header id
  x_error_code            out     internal code for error

 COMMENT   : delete negotiation amendments created
======================================================================*/
PROCEDURE DELETE_NEGOTIATION_AMENDMENTS (
    x_negotiation_id        in   number,
    x_error_code            out  NOCOPY varchar2) is

BEGIN

    x_error_code := 'SUCCESS';
Line: 9417

  UPDATE PON_AUCTION_HEADERS_ALL
  SET AUCTION_STATUS = 'DELETED'
  WHERE
    AUCTION_HEADER_ID_ORIG_AMEND IS NOT NULL
  AND  AUCTION_HEADER_ID_ORIG_AMEND = x_negotiation_id;
Line: 9423

  UPDATE PON_AUCTION_HEADERS_ALL
  SET AUCTION_STATUS = 'DELETED'
  WHERE
    AUCTION_HEADER_ID  = x_negotiation_id;
Line: 9434

END DELETE_NEGOTIATION_AMENDMENTS;
Line: 9455

    select auction_status
    into   v_auction_status
    from   pon_auction_headers_all
    where  auction_header_id = p_auction_header_id;
Line: 9462

      select auction_header_id_orig_amend
      into   v_auction_header_id_orig_amend
      from   pon_auction_headers_all
      where  auction_header_id = p_auction_header_id;
Line: 9467

      select auction_header_id
      into   v_most_recent_amendment
      from   pon_auction_headers_all
      where  auction_header_id_orig_amend = v_auction_header_id_orig_amend and
             auction_status <> 'AMENDED' and auction_status <> 'DRAFT' and
             rownum = 1;  -- rownum = 1 is a sanity check
Line: 9489

    select nvl(member_type,'X')
                into v_member_type
                from pon_neg_team_members
    where auction_header_id =p_auction_header_id
    and user_id = p_user_id;
Line: 9517

        select display_flag
          into l_price_break_display_flag
          from PON_AUC_DOCTYPE_RULES dr,
               PON_AUC_BIZRULES b
         where b.bizrule_id = dr.bizrule_id
           and dr.doctype_id = p_doctype_id
           and b.name = 'PRICE_BREAK';
Line: 9590

      select contract_type, doctype_id, price_break_response, po_style_id, template_id, org_id, price_tiers_indicator
        into l_contract_type, l_doctype_id, l_price_break_response, l_po_style_id, l_template_id, l_org_id, l_price_tiers_indicator
        from pon_auction_headers_all
       where auction_header_id = p_auction_header_id;
Line: 9595

      select display_flag
        into l_price_break_display_flag
        from PON_AUC_DOCTYPE_RULES dr,
             PON_AUC_BIZRULES b
       where b.bizrule_id = dr.bizrule_id
         and dr.doctype_id = l_doctype_id
         and b.name = 'PRICE_BREAK';
Line: 9650

                       select price_break_type
                         into l_template_pb_type
                         from pon_auction_item_prices_all
                        where auction_header_id = l_template_id;
Line: 9665

                        select decode(price_break_lookup_code, 'NON CUMULATIVE',
                                      'NON-CUMULATIVE', price_break_lookup_code)
                          into l_po_pb_type
                          from po_system_parameters_all
                         where org_id = l_org_id;
Line: 9770

    SELECT 'N'
      INTO x_req_backed
      FROM dual
     WHERE EXISTS (SELECT 1
       FROM pon_auction_item_prices_all al
      WHERE al.auction_header_id = p_auction_header_id
            AND al.group_type NOT IN ('GROUP','LOT_LINE')
            AND nvl(al.line_origination_code,'-9998') <> 'REQUISITION');
Line: 9855

           SELECT LANGUAGE_CODE
           INTO l_lang_code
           FROM FND_LANGUAGES
           WHERE NLS_LANGUAGE = l_language_code;
Line: 9862

           select auh.DOCUMENT_NUMBER,
                  auh.OPEN_BIDDING_DATE,
                  auh.CLOSE_BIDDING_DATE,
                  auh.VIEW_BY_DATE,
                  pad.MESSAGE_SUFFIX,
                  auh.AUCTION_TITLE,
                  hz.PARTY_NAME PREPARER_TP_NAME,
                  pntm.TASK_NAME,
                  pntm.TARGET_DATE TASK_TARGET_DATE,
                  pntm.LAST_NOTIFIED_DATE TASK_ASSIGNMENT_DATE,
                  auh.TRADING_PARTNER_CONTACT_NAME,
                  fu.person_party_id,
                  fu.user_name,
                  auh.open_auction_now_flag,
                  auh.publish_auction_now_flag

            into  l_doc_number,
                  l_auction_start_date,
                  l_auction_end_date,
                  l_preview_date,
                  l_msg_suffix,
                  l_auction_title,
                  l_preparer_tp_name,
                  l_task_name,
                  l_task_target_date,
                  l_task_assignment_date,
                  l_auctioneer_user_name,
                  l_person_party_id,
                  l_user_name,
                  l_open_auction_now_flag,
                  l_publish_auction_now_flag

           from pon_auction_headers_all auh,
                  hz_parties hz,
                  pon_neg_team_members pntm,
                  fnd_user fu,
                  pon_auc_doctypes pad
           where auh.auction_header_id = p_auction_header_id
                  AND hz.party_id = auh.trading_partner_id
                  AND pntm.auction_header_id = auh.auction_header_id
                  AND pntm.user_id = p_user_id
                  AND fu.user_id = pntm.user_id
                  AND pad.doctype_id = auh.doctype_id;
Line: 9984

          SELECT pon_auction_wf_publish_s.nextval
          INTO   l_sequence
          FROM   dual;
Line: 10187

                   select auh.DOCUMENT_NUMBER,
                          auh.OPEN_BIDDING_DATE,
                          auh.CLOSE_BIDDING_DATE,
                          auh.VIEW_BY_DATE,
                          pad.MESSAGE_SUFFIX,
                          auh.AUCTION_TITLE,
                          auh.TRADING_PARTNER_CONTACT_NAME,
                          auh.TRADING_PARTNER_CONTACT_ID,
                          auh.TRADING_PARTNER_ID,
                          fu.user_id,
                          auh.open_auction_now_flag,
                          auh.publish_auction_now_flag
                    into  l_doc_number,
                          l_auction_start_date,
                          l_auction_end_date,
                          l_preview_date,
                          l_msg_suffix,
                          l_auction_title,
                          l_auctioneer_user_name,
                          l_tp_contact_id,
                          l_trading_partner_id,
                          l_tp_contact_usr_id,
                          l_open_auction_now_flag,
                          l_publish_auction_now_flag
                   from pon_auction_headers_all auh,
                          pon_auc_doctypes pad,
                          fnd_user fu
                   where auh.auction_header_id = p_auction_header_id
                          AND pad.doctype_id = auh.doctype_id
                          AND fu.person_party_id = auh.TRADING_PARTNER_CONTACT_ID
                          AND nvl(fu.end_date,sysdate+1) > sysdate;
Line: 10229

                    select auh.DOCUMENT_NUMBER,
                          auh.OPEN_BIDDING_DATE,
                          auh.CLOSE_BIDDING_DATE,
                          auh.VIEW_BY_DATE,
                          pad.MESSAGE_SUFFIX,
                          auh.AUCTION_TITLE,
                          auh.TRADING_PARTNER_CONTACT_NAME,
                          auh.TRADING_PARTNER_CONTACT_ID,
                          auh.TRADING_PARTNER_ID,
                          fu.user_id,
                          auh.open_auction_now_flag,
                          auh.publish_auction_now_flag
                     into  l_doc_number,
                          l_auction_start_date,
                          l_auction_end_date,
                          l_preview_date,
                          l_msg_suffix,
                          l_auction_title,
                          l_auctioneer_user_name,
                          l_tp_contact_id,
                          l_trading_partner_id,
                          l_tp_contact_usr_id,
                          l_open_auction_now_flag,
                          l_publish_auction_now_flag
                    from pon_auction_headers_all auh,
                          pon_auc_doctypes pad,
                          fnd_user fu
                    where auh.auction_header_id = p_auction_header_id
                          AND pad.doctype_id = auh.doctype_id
                          AND fu.person_party_id = auh.TRADING_PARTNER_CONTACT_ID
                          AND nvl(fu.end_date,sysdate+1) > sysdate
                          AND rownum=1;
Line: 10290

           SELECT LANGUAGE_CODE
           INTO l_lang_code
           FROM FND_LANGUAGES
           WHERE NLS_LANGUAGE = l_language_code;
Line: 10297

           select hz.PARTY_NAME PREPARER_TP_NAME,
                  pntm.TASK_NAME,
                  pntm.TARGET_DATE TASK_TARGET_DATE,
                  pntm.COMPLETION_DATE TASK_COMPLETION_DATE,
                  fu.user_name
            into  l_preparer_tp_name,
                  l_task_name,
                  l_task_target_date,
                  l_task_completion_date,
                  l_user_name
           from hz_parties hz,
                  pon_neg_team_members pntm,
                  fnd_user fu
           where pntm.auction_header_id = p_auction_header_id
                  AND hz.party_id = l_trading_partner_id
                  AND pntm.user_id = p_user_id
                  AND fu.user_id = pntm.user_id;
Line: 10386

          SELECT pon_auction_wf_publish_s.nextval
          INTO   l_sequence
          FROM   dual;
Line: 10576

           select auh.DOCUMENT_NUMBER,
                  auh.OPEN_BIDDING_DATE,
                  auh.CLOSE_BIDDING_DATE,
                  auh.VIEW_BY_DATE,
                  pad.MESSAGE_SUFFIX,
                  auh.AUCTION_TITLE,
                  auh.TRADING_PARTNER_CONTACT_NAME,
                  auh.TRADING_PARTNER_NAME PREPARER_TP_NAME,
                  auh.TRADING_PARTNER_CONTACT_ID,
                  auh.TRADING_PARTNER_ID,
                  fu.user_name,
                  decode(pbh.VENDOR_SITE_CODE, null, '', pbh.VENDOR_SITE_CODE) SUPPLIER_SITE_NAME,
                  pbh.TRADING_PARTNER_NAME BIDDER_TP_NAME,
                  pbh.PUBLISH_DATE BID_PUBLISH_DATE,
                  pbh.TRADING_PARTNER_CONTACT_ID BIDDER_TPC_ID,
                  auh.AUCTION_HEADER_ID
           into  l_doc_number,
                  l_auction_start_date,
                  l_auction_end_date,
                  l_preview_date,
                  l_msg_suffix,
                  l_auction_title,
                  l_auctioneer_user_name,
                  l_preparer_tp_name,
                  l_tp_contact_id,
                  l_trading_partner_id,
                  l_bidder_user_name,
                  l_supplier_site_name,
                  l_bidder_tp_name,
                  l_bid_publish_date,
                  l_bidder_tpc_id,
                  l_auction_header_id
           from pon_auction_headers_all auh,
                  pon_auc_doctypes pad,
                  pon_bid_headers pbh,
                  fnd_user fu
           where pbh.bid_number = p_bid_number
                  AND pad.doctype_id = auh.doctype_id
                  AND auh.auction_header_id = pbh.auction_header_id
                  AND fu.person_party_id = pbh.trading_partner_contact_id
                  AND nvl(fu.end_date, sysdate+1) > sysdate;
Line: 10627

           select auh.DOCUMENT_NUMBER,
                  auh.OPEN_BIDDING_DATE,
                  auh.CLOSE_BIDDING_DATE,
                  auh.VIEW_BY_DATE,
                  pad.MESSAGE_SUFFIX,
                  auh.AUCTION_TITLE,
                  auh.TRADING_PARTNER_CONTACT_NAME,
                  auh.TRADING_PARTNER_NAME PREPARER_TP_NAME,
                  auh.TRADING_PARTNER_CONTACT_ID,
                  auh.TRADING_PARTNER_ID,
                  fu.user_name,
                  decode(pbh.VENDOR_SITE_CODE, null, '', pbh.VENDOR_SITE_CODE) SUPPLIER_SITE_NAME,
                  pbh.TRADING_PARTNER_NAME BIDDER_TP_NAME,
                  pbh.PUBLISH_DATE BID_PUBLISH_DATE,
                  pbh.TRADING_PARTNER_CONTACT_ID BIDDER_TPC_ID,
                  auh.AUCTION_HEADER_ID
           into  l_doc_number,
                  l_auction_start_date,
                  l_auction_end_date,
                  l_preview_date,
                  l_msg_suffix,
                  l_auction_title,
                  l_auctioneer_user_name,
                  l_preparer_tp_name,
                  l_tp_contact_id,
                  l_trading_partner_id,
                  l_bidder_user_name,
                  l_supplier_site_name,
                  l_bidder_tp_name,
                  l_bid_publish_date,
                  l_bidder_tpc_id,
                  l_auction_header_id
           from pon_auction_headers_all auh,
                  pon_auc_doctypes pad,
                  pon_bid_headers pbh,
                  fnd_user fu
           where pbh.bid_number = p_bid_number
                  AND pad.doctype_id = auh.doctype_id
                  AND auh.auction_header_id = pbh.auction_header_id
                  AND fu.person_party_id = pbh.trading_partner_contact_id
                  AND nvl(fu.end_date, sysdate+1) > sysdate
                  AND rownum = 1;
Line: 11033

        SELECT
                hz.party_id TO_PARTY_ID,
                PON_LOCALE_PKG.get_party_display_name(hz.party_id,2, userenv('LANG')) TO_PARTY_NAME,
                hz.person_first_name FIRST_NAME,
                hz.person_last_name LAST_NAME
        FROM pon_neg_team_members  pntm,
                  HZ_PARTIES hz,
                  fnd_user fu
        WHERE hz.party_id=fu.person_party_id
        AND nvl(fu.end_date,sysdate+1) > sysdate
        AND fu.user_id=pntm.user_id
        AND fu.person_party_id <> p_sender_id
        AND pntm.auction_header_id = p_auction_header_id
        UNION
        SELECT
                distinct pte.from_id TO_PARTY_ID,
                PON_LOCALE_PKG.get_party_display_name(pte.from_id,2, userenv('LANG'))  TO_PARTY_NAME,
                pte.from_first_name FIRST_NAME, pte.from_last_name LAST_NAME
        FROM pon_threads pt,
                  pon_thread_entries pte
        WHERE pt.discussion_id = p_discussion_id
        AND pt.discussion_id = pte.discussion_id
        AND pt.thread_number = pte.thread_number
        AND pte.from_id <> p_sender_id
        AND pte.vendor_id is null;
Line: 11063

      SELECT DISTINCT
        PBP.TRADING_PARTNER_CONTACT_ID TO_PARTY_ID,
        PON_LOCALE_PKG.GET_PARTY_DISPLAY_NAME(PBP.TRADING_PARTNER_CONTACT_ID, 2 , USERENV('LANG'))||' - '||NVL(HZ.PARTY_NAME,'')  TO_PARTY_NAME,
        HZ1.PERSON_FIRST_NAME FIRST_NAME,
        HZ1.PERSON_LAST_NAME LAST_NAME,
        HZ.PARTY_ID COMPANY_ID,
        HZ.PARTY_NAME COMPANY_NAME
      FROM PON_BIDDING_PARTIES PBP,
        HZ_PARTIES HZ,
        HZ_PARTIES HZ1
      WHERE PBP.AUCTION_HEADER_ID = p_auction_header_id
        AND HZ.PARTY_ID=PBP.TRADING_PARTNER_ID
        AND HZ1.PARTY_ID= PBP.TRADING_PARTNER_CONTACT_ID
      UNION
      SELECT DISTINCT
        PBH.TRADING_PARTNER_CONTACT_ID TO_PARTY_ID,
        PON_LOCALE_PKG.GET_PARTY_DISPLAY_NAME(PBH.TRADING_PARTNER_CONTACT_ID,2,USERENV('LANG'))||' - '||NVL(HZ.PARTY_NAME,'')  TO_PARTY_NAME,
        HZ1.PERSON_FIRST_NAME FIRST_NAME,
        HZ1.PERSON_LAST_NAME LAST_NAME,
        HZ.PARTY_ID COMPANY_ID,
        HZ.PARTY_NAME COMPANY_NAME
      FROM PON_BID_HEADERS PBH,
        HZ_PARTIES HZ,
        HZ_PARTIES HZ1
      WHERE PBH.AUCTION_HEADER_ID = p_auction_header_id
        AND HZ.PARTY_ID=PBH.TRADING_PARTNER_ID
        AND HZ1.PARTY_ID=PBH.TRADING_PARTNER_CONTACT_ID
        AND PBH.BID_STATUS NOT IN ('ARCHIVED','DISQUALIFIED')
      UNION
      SELECT DISTINCT
        PTE.FROM_ID TO_PARTY_ID,
        PON_LOCALE_PKG.GET_PARTY_DISPLAY_NAME(PTE.FROM_ID, 2,USERENV('LANG')) ||' - '||NVL(PTE.FROM_COMPANY_NAME,'')  TO_PARTY_NAME,
        PTE.FROM_FIRST_NAME FIRST_NAME,
        PTE.FROM_LAST_NAME LAST_NAME,
        PTE.FROM_COMPANY_ID COMPANY_ID,
        PTE.FROM_COMPANY_NAME COMPANY_NAME
      FROM PON_THREADS PT,
        PON_THREAD_ENTRIES PTE,
        PON_TE_RECIPIENTS PTR
      WHERE PT.DISCUSSION_ID = p_discussion_id
        AND PT.DISCUSSION_ID = PTE.DISCUSSION_ID
        AND PT.THREAD_NUMBER = PTE.THREAD_NUMBER
        AND PTE.ENTRY_ID = PTR.ENTRY_ID
        AND PTR.TO_ID = p_auctioneer_tpc_id
        AND PTE.VENDOR_ID IS NOT NULL;
Line: 11114

                SELECT
                        hz.party_id TO_PARTY_ID,
                        PON_LOCALE_PKG.get_party_display_name(hz.party_id,2, userenv('LANG')) TO_PARTY_NAME,
                        hz.person_first_name FIRST_NAME,
                        hz.person_last_name LAST_NAME
                FROM pon_scoring_team_members  pntm,
                          HZ_PARTIES hz,
                          fnd_user fu
                WHERE hz.party_id=fu.person_party_id
                AND fu.user_id=pntm.user_id
                AND nvl(fu.end_date,sysdate+1) > sysdate
                AND fu.person_party_id <> p_sender_id
                AND pntm.auction_header_id = p_auction_header_id
                AND pntm.team_id = p_team_id;
Line: 11132

                SELECT  distinct
                        hz.party_id TO_PARTY_ID,
                        PON_LOCALE_PKG.get_party_display_name(hz.party_id,2, userenv('LANG')) TO_PARTY_NAME,
                        hz.person_first_name FIRST_NAME,
                        hz.person_last_name LAST_NAME
                FROM pon_scoring_team_members  pntm,
                          HZ_PARTIES hz,
                          fnd_user fu
                WHERE hz.party_id=fu.person_party_id
                AND fu.user_id=pntm.user_id
                AND nvl(fu.end_date,sysdate+1) > sysdate
                AND fu.person_party_id <> p_sender_id
                AND pntm.auction_header_id = p_auction_header_id;
Line: 11149

                SELECT ptr.to_id TO_PARTY_ID,
                       PON_LOCALE_PKG.get_party_display_name(ptr.to_id,2, userenv('LANG')) TO_PARTY_NAME,
                       ptr.to_first_name FIRST_NAME,
                       ptr.to_last_name LAST_NAME
                FROM pon_te_recipients ptr
                WHERE ptr.entry_id = p_entryId
                  AND ptr.to_id <> p_sender_id;
Line: 11186

           SELECT
                auh.DOCUMENT_NUMBER,
                auh.AUCTION_HEADER_ID,
                auh.OPEN_BIDDING_DATE,
                auh.CLOSE_BIDDING_DATE,
                auh.VIEW_BY_DATE,
                pad.MESSAGE_SUFFIX,
                auh.AUCTION_TITLE,
                auh.TRADING_PARTNER_CONTACT_NAME,
                auh.TRADING_PARTNER_CONTACT_ID,
                auh.STAGGERED_CLOSING_INTERVAL,
                decode(nvl(auh.bid_visibility_code,'N'),
                          'SEALED_AUCTION','Y',
                                           'N'),
                SYSDATE,
                pt.SUBJECT,
                pte.FROM_ID,
                pte.FROM_COMPANY_ID,
                pd.discussion_id,
                open_auction_now_flag,
                publish_auction_now_flag
            INTO
                  l_doc_number,
                  l_auction_header_id,
                  l_auction_start_date,
                  l_auction_end_date,
                  l_preview_date,
                  l_msg_suffix,
                  l_auction_title,
                  l_auctioneer_user_name,
                  l_auctioneer_tpc_id,
                  l_staggered_cls_intrvl,
                  l_is_sealed_neg,
                  l_msg_sent_date,
                  l_subject,
                  l_from_id,
                  l_from_company_id,
                  l_discussion_id,
                  l_open_auction_now_flag ,
                  l_publish_auction_now_flag
            FROM pon_auction_headers_all auh,
                pon_auc_doctypes pad,
                pon_thread_entries pte,
                pon_threads pt,
                pon_discussions pd
            WHERE pte.entry_id = p_entryid
                AND pd.discussion_id = pte.discussion_id
                AND pt.discussion_id = pte.discussion_id
                AND pt.thread_number = pte.thread_number
                AND auh.auction_header_id = pd.pk1_value
                AND pad.doctype_id = auh.doctype_id;
Line: 11786

                    SELECT
                        USER_ID,
                        USER_NAME
                    INTO
                        l_user_id,
                        l_user_name
                    FROM FND_USER
                    WHERE PERSON_PARTY_ID = p_userPartyId
                    AND NVL(END_DATE, SYSDATE+1) > SYSDATE;
Line: 11806

                     SELECT
                        USER_ID,
                        USER_NAME
                    INTO
                        l_user_id,
                        l_user_name
                    FROM FND_USER
                    WHERE PERSON_PARTY_ID = p_userPartyId
                    AND NVL(END_DATE, SYSDATE+1) > SYSDATE
                    AND ROWNUM=1;
Line: 11821

                    SELECT
                        USER_NAME
                    INTO
                        l_sender_user
                    FROM FND_USER
                    WHERE PERSON_PARTY_ID = p_from_id
                    AND NVL(END_DATE, SYSDATE+1) > SYSDATE;
Line: 11839

                    SELECT
                        USER_NAME
                    INTO
                        l_sender_user
                    FROM FND_USER
                    WHERE PERSON_PARTY_ID = p_from_id
                    AND NVL(END_DATE, SYSDATE+1) > SYSDATE
                    AND ROWNUM=1;
Line: 11857

               SELECT LANGUAGE_CODE
                       INTO l_lang_code
               FROM FND_LANGUAGES
               WHERE NLS_LANGUAGE = l_language;
Line: 12149

    select nvl(shopping_category_id, -2)
    into   v_ip_category_id
    from   icx_cat_purchasing_cat_map_v
    where  po_category_id = p_po_category_id and
           rownum = 1;
Line: 12187

    select nvl(po_category_id, -2)
    into   v_po_category_id
    from   icx_cat_shopping_cat_map_v
    where  shopping_category_id = p_ip_category_id and
           rownum = 1;
Line: 12229

      IF (p_publish_auction_now_flag = 'Y') THEN --if Immediately is selected

        wf_engine.SetItemAttrDate (itemtype  => p_itemtype,
                    itemkey  => p_itemkey,
                    aname  => 'PREVIEW_DATE',
                    avalue  => null);
Line: 12314

      IF (p_open_auction_now_flag = 'Y') THEN --if Immediately  is selected

        wf_engine.SetItemAttrDate (itemtype   => p_itemtype,
                   itemkey    => p_itemkey,
                   aname      => 'AUCTION_START_DATE',
                   avalue     => null);
Line: 12485

  SELECT
    org_id,
    carrier_code,
    decode(two_part_flag,'Y',decode(sealed_auction_status,'LOCKED',technical_unlock_tp_contact_id,sealed_unlock_tp_contact_id),sealed_unlock_tp_contact_id),
    decode(two_part_flag,'Y',decode(sealed_auction_status,'ACTIVE', sealed_unseal_tp_contact_id,technical_unseal_tp_contact_id),sealed_unseal_tp_contact_id),
    is_paused,
    staggered_closing_interval,
    trading_partner_contact_id
  INTO
    v_org_id,
    v_carrier_code,
    v_sealed_unlock_tp_contact_id,
    v_sealed_unseal_tp_contact_id,
    v_is_paused,
    v_staggered_closing_interval,
    v_trading_partner_contact_id
  FROM
    pon_auction_headers_all_v
  WHERE
    auction_header_id = p_auction_header_id;
Line: 12523

    SELECT
      a.auction_header_id
    INTO
      v_temp
    FROM
      pon_auction_headers_all a,
      pon_bid_headers b
    WHERE
      a.auction_header_id = b.auction_header_id
      and a.auction_header_id =  p_auction_header_id
      and b.trading_partner_id = p_user_trading_partner_id
      and b.bid_status = 'ACTIVE'
      AND rownum = 1;
Line: 12544

    SELECT
      ppbp.auction_header_id
    INTO
      v_temp
    FROM
      pon_bidding_parties ppbp
    WHERE
      ppbp.auction_header_id = p_auction_header_id
      and ppbp.trading_partner_id = p_user_trading_partner_id
      AND rownum = 1;
Line: 12561

  SELECT
    DECODE(
      (SELECT
         count(distinct vendor_site_id)
       FROM
         pon_bid_headers ppbh
       WHERE
         ppbh.auction_header_id = p_auction_header_id
         and ppbh.trading_partner_id = p_user_trading_partner_id
         and ppbh.bid_status = 'ACTIVE'
      ),
      (SELECT
         count(pbp.auction_header_id)
       FROM
         pon_bidding_parties pbp
       WHERE
         pbp.auction_header_id = p_auction_header_id
         and pbp.trading_partner_id = p_user_trading_partner_id
      ), 'Y', 'N')
  INTO
    x_all_site_bid_on
  FROM
    DUAL;
Line: 12585

  SELECT
    DECODE( nvl(v_is_paused, 'N'), 'Y', 'Y', nvl2(v_staggered_closing_interval, 'S', 'N'))
  INTO
    x_is_paused
  FROM
    DUAL;
Line: 12601

  SELECT
    ps.display_name,
    pdsh.advances_flag,
    pdsh.retainage_flag,
    nvl2(pspay.pay_item_type , 'Y','N')
  INTO
    x_outcome_display,
    x_advances_flag,
    x_retainage_flag,
    x_payment_rate_rype_enabled
  FROM
    po_all_doc_style_lines ps,
    pon_auction_headers_all_v ah,
    po_doc_style_headers pdsh,
    po_style_enabled_pay_items pspay,
    po_lookup_codes fl_pay_item
  WHERE
    ah.auction_header_id = p_auction_header_id
    AND ah.po_style_id = ps.style_id(+)
    AND ah.contract_type = ps.document_subtype(+)
    AND USERENV('LANG') = ps.language(+)
    AND ah.po_style_id = pdsh.style_id(+)
    AND ah.po_style_id = pspay.style_id(+)
    AND pspay.pay_item_type(+) ='RATE'
    AND fl_pay_item.lookup_type(+)  =  'PAYMENT TYPE'
    AND fl_pay_item.lookup_code(+) = pspay.pay_item_type;
Line: 12678

        SELECT (close_bidding_date - decode(is_paused, 'Y', last_pause_date, sysdate)), auction_status
        INTO v_time_remaining, v_auction_status
        FROM pon_auction_headers_all
        WHERE auction_header_id = p_auction_header_id
        AND open_bidding_date < sysdate;
Line: 12782

        SELECT (close_bidding_date-decode(is_paused, 'Y', last_pause_date, sysdate)), nvl2(staggered_closing_interval, 'Y', 'N'),
        -- if auto extend is enabled and auto extends all lines, 'N' else 'Y'
        decode(auto_extend_flag, 'Y', decode(auto_extend_all_lines_flag, 'N', 'Y', 'N'), 'N')
        INTO v_time_left, v_is_staggered, v_ext_all_lines
        FROM pon_auction_headers_all
        WHERE auction_header_id = p_auction_header_id;
Line: 12856

        update_cache_rec;
Line: 12902

        update_cache_rec;
Line: 12953

    SELECT bid_number, trading_partner_contact_name, nvl(shortlist_flag, 'Y') as shortlist_flag
    FROM pon_bid_headers
    WHERE   auction_header_id = p_auction_header_id
      AND bid_status = 'ACTIVE';
Line: 12977

    SELECT   auction_title, document_number, trading_partner_name
    INTO  l_auction_title, l_document_number, l_trading_partner_name
    FROM  pon_auction_headers_all
    WHERE  auction_header_id = p_auction_header_id;
Line: 13023

    SELECT   pon_auction_wf_dqbid_s.nextval
    INTO   x_item_key
    FROM   dual;
Line: 13172

   SELECT nvl(two_part_flag,'N'),
          nvl(technical_lock_status,''),
          nvl(technical_evaluation_status,''),
          nvl(sealed_auction_status, ''),
          decode(nvl(is_paused, 'N'), 'Y', 'NOTCLOSED',
              decode(SIGN(close_bidding_date - sysdate) , -1, 'CLOSED', 'NOTCLOSED')), --auction status
          trading_partner_id,
          auction_status,
          award_status
   INTO
          l_two_part_flag,
          l_technical_lock_status,
          l_technical_evaluation_status,
          l_commercial_lock_status,
          l_auction_status,
          l_auction_trading_partner_id,
          l_auction_status2,
          l_award_status
    FROM pon_auction_headers_all
    WHERE auction_header_id = p_auction_header_id;
Line: 13254

          SELECT fl.meaning,
                 nvl2(pav.sealed_auction_status,
                      ' (' ||
                              (select meaning
                              from fnd_lookups
                              where lookup_type = 'PON_SEALED_AUCTION_STATUS'
                              and (
                                  (nvl(pav.two_part_flag, 'N') <> 'Y' and lookup_code = pav.sealed_auction_status)
                                  or lookup_code = pav.technical_lock_status))
                       ||')', '')
          INTO l_buyer_meaning, l_buyer_sealed_meaning
          FROM fnd_lookups fl, pon_auction_headers_all_v pav
          WHERE pav.auction_header_id = p_auction_header_id
            AND fl.lookup_type = 'PON_AUCTION_STATUS'
            AND fl.lookup_code = pav.negotiation_status;
Line: 13304

          SELECT fl.meaning, nvl2(pav.sealed_auction_status,
                              ' (' || (select meaning
                              from fnd_lookups
                              where lookup_type = 'PON_SEALED_AUCTION_STATUS'
                              and (
                                  (nvl(pav.two_part_flag, 'N') <> 'Y' and lookup_code = pav.sealed_auction_status)
                                  or lookup_code = decode(pav.sealed_auction_status, 'UNLOCKED', pav.sealed_auction_status,pav.technical_lock_status)) )
                              ||')', '')
          INTO l_supp_meaning, l_supp_sealed_meaning
          FROM fnd_lookups fl, pon_auction_headers_all_v pav
          WHERE pav.auction_header_id = p_auction_header_id
            AND fl.lookup_type = 'PON_AUCTION_STATUS'
            AND fl.lookup_code = pav.suppl_negotiation_status;
Line: 13352

      SELECT  (SELECT meaning from fnd_lookups
       WHERE lookup_type = 'PON_SEALED_AUCTION_STATUS' and
        lookup_code = nvl(technical_lock_status,'')), --technical status
       (SELECT meaning from fnd_lookups
       WHERE lookup_type = 'PON_SEALED_AUCTION_STATUS' and
       lookup_code = nvl(sealed_auction_status,'')) --commercial status
      INTO l_technical_lock_meaning, l_commercial_lock_meaning
      FROM pon_auction_headers_all
      WHERE auction_header_id = p_auction_header_id;
Line: 13938

  SELECT doctype_id
  INTO l_rfi_doctype_id
  FROM PON_AUC_DOCTYPES
  WHERE doctype_group_name = 'REQUEST_FOR_INFORMATION';
Line: 14023

    SELECT flv1.LANGUAGE, flv1.meaning AS technical_meaning, flv2.meaning AS commercial_meaning
    BULK COLLECT INTO g_two_part_cache
    FROM fnd_lookup_values flv1, fnd_lookup_values flv2
    WHERE flv1.lookup_type='PON_TWO_PART_TYPE'
    AND flv2.lookup_type=flv1.lookup_type
    AND flv1.lookup_code='TECHNICAL'
    AND flv2.lookup_code='COMMERCIAL'
    AND flv1.LANGUAGE=flv2.LANGUAGE;
Line: 14044

PROCEDURE update_cache_rec
AS
BEGIN
  IF (FND_LOG.level_procedure >= FND_LOG.g_current_runtime_level) THEN --{
    FND_LOG.string(log_level => FND_LOG.level_procedure,
      module  =>  g_module_prefix || 'update_cache_rec',
      message  => 'Entered procedure update_cache_rec');
Line: 14057

        module  =>  g_module_prefix || 'update_cache_rec',
        message  => 'User session language is now ' || USERENV('LANG'));
Line: 14071

      module  =>  g_module_prefix || 'update_cache_rec',
      message  => 'Exiting procedure update_cache_rec');
Line: 14074

END update_cache_rec;