DBA Data[Home] [Help]

APPS.PON_CONTERMS_UTL_PVT SQL Statements

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

Line: 48

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

END updateDeliverables;
Line: 721

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

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

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

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

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

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

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

END Delete_Doc;
Line: 966

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

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

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

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

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

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

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

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

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

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

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

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

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

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

END updateDelivOnVendorMerge;
Line: 2080

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

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

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

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

			x_error_code := 'UPDATE_DELIV_AMEND_FAILED';
Line: 2143

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

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

END updateDelivOnAmendment;
Line: 2226

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

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

    select org_id
    into l_org_id
    from pon_auction_headers_all
    where auction_header_id = p_document_id;