DBA Data[Home] [Help]

APPS.PON_CONTERMS_UTL_PVT SQL Statements

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

Line: 46

      select auction_header_id
      into x_auction_header_id
      from pon_bid_headers
      where bid_number = p_contracts_doc_id;
Line: 73

       select DOCTYPE_GROUP_NAME
       into x_doctype_grp_name
       from pon_auc_doctypes
       where DOCTYPE_ID = p_doc_type_id;
Line: 93

       select DOCTYPE_GROUP_NAME
       into x_doctype_grp_name
       from pon_auc_doctypes
       where DOCTYPE_ID = p_doc_type_id;
Line: 139

        select org_id
        into l_org_id
        from pon_auction_headers_all
        where auction_header_id = p_document_id;
Line: 221

    select
      hrl.address_line_1 || ' ' || hrl.address_line_2 || ' ' || hrl.address_line_3 || ' ' || hrl.town_or_city || ' ',
      hrl.region_1 || ' ' || hrl.region_2 || ' ' || hrl.region_3 || ' ' || hrl.postal_code || ' ' || nvl(ftl.territory_short_name, hrl.country)
    into
      v_address1,
      v_address2
    from
      hr_locations_all hrl,
      fnd_territories_tl ftl
    where
      hrl.location_id = p_location_id and
      ftl.territory_code(+) = hrl.country and
      ftl.territory_code(+) NOT IN ('ZR','FX','LX') and
      ftl.language(+) = userenv('LANG');
Line: 302

      select doctype_id, open_bidding_date, close_bidding_date, org_id
      into l_doc_type_id, l_open_date, l_close_date, l_org_id
      from pon_auction_headers_all
      where auction_header_id = p_auction_id;
Line: 309

      	select bid_status
	into l_new_bid_status
	from pon_bid_headers
	where bid_number = p_new_bid_number;
Line: 315

        select bid_status into l_old_bid_status from pon_bid_headers where bid_number = p_old_bid_number;
Line: 334

			-- bug 3608706 - new api to update the status history

			OKC_MANAGE_DELIVERABLES_GRP.postDelStatusChanges (
       				p_api_version  		=> 1.0,
       				p_init_msg_list 	=> FND_API.G_FALSE,
       				p_commit           	=> FND_API.G_FALSE,
       				p_bus_doc_id 		=> p_new_bid_number,
       				p_bus_doc_type 		=> l_bus_doc_type,
       				p_bus_doc_version 	=> -99,
                            	x_msg_data             	=> l_msg_data,
                            	x_msg_count          	=> l_msg_count,
                            	x_return_status      	=> l_return_status);
Line: 469

 PROCEDURE : updateDeliverables   PUBLIC
   PARAMETERS:
   p_auction_header_id    IN              NUMBER       auction header id for negotiation
   p_doc_type_id          IN              NUMBER       doc type id for negotiation
   p_close_bidding_date   IN              NUMBER       new close bidding date for negotiation
   x_result             OUT     NOCOPY  VARCHAR2       result returned to called indicating SUCCESS or FAILURE
   x_error_code         OUT     NOCOPY  VARCHAR2       error code if x_result is FAILURE, NULL otherwise
   x_error_message      OUT     NOCOPY  VARCHAR2       error message if x_result is FAILURE, NULL otherwise
                                                       size is 250.
 COMMENT :  This procedure is to be called whenever there is a changed in close
bidding date of any negotiation.

==============================================================================================*/

PROCEDURE updateDeliverables (
  p_auction_header_id    IN  NUMBER,
  p_doc_type_id          IN  NUMBER,
  p_close_bidding_date   IN  DATE,
  x_msg_data             OUT NOCOPY  VARCHAR2,
  x_msg_count            OUT NOCOPY  NUMBER,
  x_return_status        OUT NOCOPY  VARCHAR2
)
IS

  l_negotiation_doc_type     		VARCHAR2(30);
Line: 498

  l_api_name        			CONSTANT  VARCHAR2(30) := 'updateDeliverables';
Line: 512

      SELECT bid_number
      FROM pon_bid_headers
      WHERE  auction_header_id in (select a.auction_header_id
				  from pon_auction_headers_all a,
				        pon_auction_headers_all b
				  where b.auction_header_id = p_auction_header_id
				  and   b.auction_header_id_orig_amend = a.auction_header_id_orig_amend)
      AND bid_status in ( 'ACTIVE', 'RESUBMISSION') ;
Line: 526

      SELECT auction_header_id
      FROM   pon_auction_headers_all
      WHERE  auction_header_id in (select a.auction_header_id
				  from pon_auction_headers_all a,
				       pon_auction_headers_all b
				  where b.auction_header_id = p_auction_header_id
				  and   b.auction_header_id_orig_amend = a.auction_header_id_orig_amend);
Line: 555

  select org_id
  into l_org_id
  from pon_auction_headers_all
  where auction_header_id = p_auction_header_id;
Line: 573

   OKC_MANAGE_DELIVERABLES_GRP.updateDeliverables(
                             	p_api_version		=> 1.0,
				p_init_msg_list 	=> FND_API.G_FALSE,
				p_commit 		=> FND_API.G_FALSE,
                             	p_bus_doc_id 		=> p_auction_header_id,
                             	p_bus_doc_type 		=> l_negotiation_doc_type,
				p_bus_doc_version	=> -99,
                             	p_bus_doc_date_events_tbl => l_bus_doc_dates_tbl,
                             	x_msg_data 		=> l_msg_data,
                             	x_msg_count 		=> x_msg_count,
                             	x_return_status 	=> l_return_status
                                                 );
Line: 600

	-- need to update deliverables on them as well

	IF (current_amendment.auction_header_id <> p_auction_header_id) THEN

   		OKC_MANAGE_DELIVERABLES_GRP.updateDeliverables(
                	             	p_api_version		=> 1.0,
					p_init_msg_list 	=> FND_API.G_FALSE,
					p_commit 		=> FND_API.G_FALSE,
	                             	p_bus_doc_id 		=> current_amendment.auction_header_id,
        	                     	p_bus_doc_type 		=> l_negotiation_doc_type,
					p_bus_doc_version	=> -99,
                        	     	p_bus_doc_date_events_tbl => l_bus_doc_dates_tbl,
	                             	x_msg_data 		=> l_msg_data,
        	                     	x_msg_count 		=> x_msg_count,
                	             	x_return_status 	=> l_return_status
                                                 );
Line: 638

        OKC_MANAGE_DELIVERABLES_GRP.updateDeliverables(
                             p_api_version 		=> 1.0,
			     p_init_msg_list 		=> FND_API.G_FALSE,
			     p_commit 			=> FND_API.G_FALSE,
                             p_bus_doc_id 		=> active_bid.bid_number,
                             p_bus_doc_type 		=> l_response_doc_type,
			     p_bus_doc_version		=> -99,
                             p_bus_doc_date_events_tbl 	=> l_bus_doc_dates_tbl,
                             x_msg_data 		=> l_msg_data,
                             x_msg_count 		=> x_msg_count,
                             x_return_status 		=> l_return_status
                                                 );
Line: 676

END updateDeliverables;
Line: 715

      SELECT bid_number
        FROM pon_bid_headers
       WHERE  auction_header_id = p_auction_header_id
         and   bid_status = 'ACTIVE';
Line: 723

        select doctype_id into x_doctype_id
        from pon_auction_headers_all
        where auction_header_id=p_auction_header_id;
Line: 732

   select org_id
   into l_org_id
   from pon_auction_headers_all
   where auction_header_id = p_auction_header_id;
Line: 818

 PROCEDURE : Delete_Doc   PUBLIC
   PARAMETERS:
   p_auction_header_id    IN              NUMBER          auction header id for negotiation
   p_doc_type_id          IN              NUMBER          doc type id for negotiation
   x_result             OUT     NOCOPY  VARCHAR2        result returned to called indicating SUCCESS or FAILURE
   x_error_code         OUT     NOCOPY  VARCHAR2        error code if x_result is FAILURE, NULL otherwise
   x_error_message      OUT     NOCOPY  VARCHAR2        error message if x_result is FAILURE, NULL otherwise
                                                        size is 250.

 COMMENT :  This procedure is to be called whenever negotiation gets deleted. As
 of now only draft negotiation is allowed to be deleted. Therefore this API
 should only be called for draft negotiation deletion only.

=============================================================================================== */

PROCEDURE Delete_Doc (
  p_auction_header_id    IN  NUMBER,
  p_doc_type_id          IN  NUMBER,
  x_msg_data             OUT NOCOPY  VARCHAR2,
  x_msg_count            OUT NOCOPY  NUMBER,
  x_return_status        OUT NOCOPY  VARCHAR2
                     )
IS

  l_negotiation_doc_type     VARCHAR2(30);
Line: 845

  l_api_name        CONSTANT  VARCHAR2(30) := 'Delete_Doc';
Line: 861

  select org_id
  into l_org_id
  from pon_auction_headers_all
  where auction_header_id = p_auction_header_id;
Line: 877

  OKC_TERMS_UTIL_GRP.Delete_Doc(
                             p_api_version => 1.0,
                             p_doc_id =>p_auction_header_id,
                             p_doc_type => l_negotiation_doc_type,
                             x_msg_data => l_msg_data,
                             x_msg_count => x_msg_count,
                             x_return_status => l_return_status
                             );
Line: 909

END Delete_Doc;
Line: 960

    SELECT doctype_id, view_by_Date, open_bidding_date, close_bidding_date, org_id
     INTO  l_doc_type_id, l_view_by_date, l_open_date, l_close_bidding_date, l_org_id
    FROM   pon_auction_headers_all
   WHERE   auction_header_id = p_auction_header_id;
Line: 1096

        select h.org_id
        into l_org_id
        from pon_auction_headers_all h,
             pon_bid_headers b
        where b.bid_number = p_source_bid_number
        and h.auction_header_id = b.auction_header_id;
Line: 1201

	select b.doctype_id ,
               a.org_id
        into l_doc_type_id,
             l_org_id
        from pon_bid_headers b,
             pon_auction_headers_all a
        where b.bid_number = p_bid_number
        and a.auction_header_id = b.auction_header_id;
Line: 1304

      SELECT bid_number
        FROM pon_bid_headers
       WHERE  auction_header_id =p_auction_number
         and   bid_status = 'ACTIVE';
Line: 1316

                  select org_id
                  into l_org_id
                  from pon_auction_headers_all
                  where auction_header_id = p_auction_number;
Line: 1472

  select org_id
  into l_org_id
  from pon_auction_headers_all
  where auction_header_id = v_doc_id;
Line: 1546

  select org_id
  into l_org_id
  from pon_auction_headers_all
  where auction_header_id = v_doc_id;
Line: 1625

  select org_id
  into l_org_id
  from pon_auction_headers_all
  where auction_header_id = v_doc_id;
Line: 1699

  select org_id
  into l_org_id
  from pon_auction_headers_all
  where auction_header_id = v_doc_id;
Line: 1775

  select org_id
  into l_org_id
  from pon_auction_headers_all
  where auction_header_id = v_doc_id;
Line: 1850

  select org_id
  into l_org_id
  from pon_auction_headers_all
  where auction_header_id = v_doc_id;
Line: 1895

PROCEDURE updateDelivOnVendorMerge
(   p_from_vendor_id IN         NUMBER,
    p_from_site_id   IN         NUMBER,
    p_to_vendor_id   IN         NUMBER,
    p_to_site_id     IN         NUMBER,
    x_msg_data       OUT NOCOPY VARCHAR2,
    x_msg_count      OUT NOCOPY NUMBER,
    x_return_status  OUT NOCOPY VARCHAR2
) IS

l_api_name  CONSTANT VARCHAR2(60) := 'updateDeliverablesOnVendorMerge';
Line: 1928

        	OKC_MANAGE_DELIVERABLES_GRP.updateExtPartyOnDeliverables
	        ( p_api_version                 => 1.0,
        	  p_init_msg_list               => FND_API.G_TRUE,
	          p_commit                      => FND_API.G_FALSE,
        	  p_document_class              => 'SOURCING',
	          p_from_external_party_id      => p_from_vendor_id,
        	  p_from_external_party_site_id => p_from_site_id,
	          p_to_external_party_id        => p_to_vendor_id,
        	  p_to_external_party_site_id   => p_to_site_id,
	          x_msg_data                    => x_msg_data,
        	  x_msg_count                   => x_msg_count,
	          x_return_status               => x_return_status
        	);
Line: 1957

                              		  	message  => 'UPDATE_DELIV_ON_VENDOR_MERGE_FAILED: '
                                                || 'p_from_external_party_id = ' || p_from_vendor_id
                                                || ' p_from_external_party_site_id=' || p_from_site_id
                                                || ' p_to_external_party_id=' || p_to_vendor_id
                                                || ' p_to_external_party_site_id=' || p_to_site_id);
Line: 1972

END updateDelivOnVendorMerge;
Line: 1978

 PROCEDURE : updateDelivOnAmendment   PUBLIC
   PARAMETERS:
   p_auction_header_id_orig  	IN         	NUMBER          auction header id of the original amendment
   p_auction_header_id_prev  	IN		NUMBER		auction header id of the previous amendment
   p_doc_type_id		IN		NUMBER		doc-type-id for the current negotiation
   p_close_bidding_date 	IN		DATE		new close date for the new amendment
   p_close_date_changed 	IN		VARCHAR2	flag to indicate whether the close date was changed
   x_result             	OUT     NOCOPY  VARCHAR2        result returned to called indicating SUCCESS or FAILURE
   x_error_code         	OUT     NOCOPY  VARCHAR2        error code if x_result is FAILURE, NULL otherwise
   x_error_message      	OUT     NOCOPY  VARCHAR2        error message if x_result is FAILURE, NULL otherwise
                                                        	size is 250.

 COMMENT :  This procedure is to be called whenever amendment is getting published.
 In OA Implementation, this should be called in beforeCommit method which publishes the negotiation.
=============================================================================================== */

PROCEDURE updateDelivOnAmendment (
  p_auction_header_id_orig    	IN  NUMBER,
  p_auction_header_id_prev     	IN  NUMBER,
  p_doc_type_id		 	IN  NUMBER,
  p_close_bidding_date   	IN  DATE,
  x_result	             	OUT NOCOPY  VARCHAR2,
  x_error_code            	OUT NOCOPY  VARCHAR2,
  x_error_message        	OUT NOCOPY  VARCHAR2
  )

IS

l_old_close_date     DATE;
Line: 2008

l_api_name 	  CONSTANT 	VARCHAR2(30) := 'updateDelivOnAmendment';
Line: 2019

	select close_bidding_date into l_old_close_date
	from pon_auction_headers_all
	where auction_header_id = p_auction_header_id_prev;
Line: 2024

	-- then we need to update all the deliverables in the new and old
	-- amendments that are based upon the close date event

	IF( p_close_bidding_date <> l_old_close_date) THEN

		PON_CONTERMS_UTL_PVT.updateDeliverables(p_auction_header_id 	=> p_auction_header_id_orig,
							p_doc_type_id		=> p_doc_type_id,
							p_close_bidding_date 	=> p_close_bidding_date,
							x_msg_data		=> l_msg_data,
							x_msg_count		=> l_msg_count,
							x_return_status		=> l_return_status);
Line: 2040

			x_error_code := 'UPDATE_DELIV_AMEND_FAILED';
Line: 2041

			x_error_message := 'Unable to update deliverables for auction ' || p_auction_header_id_orig;
Line: 2084

		x_error_code := 'UPDATE_DELIV_AMEND_FAILED_COMPLETELY - ' || SQLCODE;
Line: 2095

END updateDelivOnAmendment;
Line: 2124

    select org_id
    into l_org_id
    from pon_auction_headers_all
    where auction_header_id = p_document_id;
Line: 2211

    select org_id
    into l_org_id
    from pon_auction_headers_all
    where auction_header_id = p_document_id;
Line: 2299

    select org_id
    into l_org_id
    from pon_auction_headers_all
    where auction_header_id = p_document_id;