DBA Data[Home] [Help]

APPS.OKE_FUNDING_PUB SQL Statements

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

Line: 17

FUNCTION check_update_add_pa(p_fund_allocation_id NUMBER) RETURN BOOLEAN is

   cursor c_exist is
      select 'Y'
      from   oke_k_fund_allocations
      where  fund_allocation_id = p_fund_allocation_id
      and    agreement_version is not null;
Line: 61

END check_update_add_pa;
Line: 71

FUNCTION check_update_add(p_fund_allocation_id		NUMBER) RETURN	BOOLEAN	is

   cursor c_update is
      select 'x'
      from   oke_k_fund_allocations
      where  fund_allocation_id = p_fund_allocation_id;
Line: 82

   OPEN c_update;
Line: 83

   FETCH c_update into l_dummy_value;
Line: 84

   CLOSE c_update;
Line: 96

   CLOSE c_update;
Line: 108

       IF (c_update%ISOPEN) THEN
           CLOSE c_update;
Line: 114

END check_update_add;
Line: 129

      select 'x'
      from   pa_agreements_all
      where  agreement_id = p_agreement_id
      and    pm_product_code = G_PRODUCT_CODE
      and    substr(pm_agreement_reference, -1 * x_length, x_length) = '-'|| p_funding_source_id;
Line: 197

      select fund_allocation_id		,
      	     funding_source_id		,
             project_id			,
             task_id			,
             amount			,
             start_date_active		,
             pa_conversion_type		,
             pa_conversion_date		,
             pa_conversion_rate,
             funding_category
      from   oke_k_fund_allocations
      where  fund_allocation_id = p_fund_allocation_id;
Line: 526

   OKE_FUNDSOURCE_PVT.update_funding(p_api_version		=> p_api_version	,
   				     p_init_msg_list		=> OKE_API.G_FALSE	,
   				     p_commit			=> OKE_API.G_FALSE	,
   				     p_msg_count		=> x_msg_count		,
   				     p_msg_data			=> x_msg_data		,
   				     p_funding_in_rec		=> l_funding_in_rec	,
   				     p_funding_out_rec		=> x_funding_out_rec	,
   				     p_return_status		=> x_return_status
   				    );
Line: 643

PROCEDURE update_funding(p_api_version		IN 		NUMBER				,
			 p_init_msg_list	IN		VARCHAR2 := OKE_API.G_FALSE	,
			 p_commit		IN		VARCHAR2 := OKE_API.G_FALSE	,
			 x_return_status	OUT  NOCOPY	VARCHAR2			,
			 x_msg_count		OUT  NOCOPY	NUMBER				,
			 x_msg_data		OUT  NOCOPY	VARCHAR2			,
			 p_agreement_flag	IN		VARCHAR2 := OKE_API.G_FALSE	,
			 p_agreement_type	IN		VARCHAR2 			,
                         p_receivables_term_id  IN              NUMBER   DEFAULT NULL,
			 p_funding_in_rec	IN		FUNDING_REC_IN_TYPE		,
			 x_funding_out_rec	OUT  NOCOPY	FUNDING_REC_OUT_TYPE		,
			 p_allocation_in_tbl	IN		ALLOCATION_IN_TBL_TYPE		,
			 x_allocation_out_tbl	OUT  NOCOPY	ALLOCATION_OUT_TBL_TYPE
			) is

   l_api_name		CONSTANT	VARCHAR2(30) := 'update_funding';
Line: 666

select term_id
      from   pa_agreements_all  where  pm_product_code = 'OKE'
      and   pm_agreement_reference LIKE '%-' || to_char(p_funding_in_rec.funding_source_id);
Line: 729

        IF (check_update_add(p_fund_allocation_id => l_allocation_in_rec.fund_allocation_id)) THEN

   	   OKE_ALLOCATION_PVT.update_allocation(p_api_version			=>	p_api_version		,
   		             			p_init_msg_list			=>	OKE_API.G_FALSE		,
		             			p_commit			=>	OKE_API.G_FALSE		,
		             			p_return_status			=>      x_return_status		,
		             			p_msg_count			=>	x_msg_count		,
		             			p_msg_data			=>	x_msg_data		,
		             			p_allocation_in_rec		=>	l_allocation_in_rec	,
		            		        p_allocation_out_rec		=> 	l_allocation_out_rec	,
		            		        p_validation_flag		=>	OKE_API.G_FALSE
		            			);
Line: 783

   OKE_FUNDSOURCE_PVT.update_funding(p_api_version	=> p_api_version	,
   				     p_init_msg_list	=> OKE_API.G_FALSE	,
   				     p_commit		=> OKE_API.G_FALSE	,
   				     p_msg_count	=> x_msg_count		,
   				     p_msg_data		=> x_msg_data		,
   				     p_funding_in_rec	=> p_funding_in_rec	,
   				     p_funding_out_rec	=> x_funding_out_rec	,
   				     p_return_status	=> x_return_status	);
Line: 820

         OKE_AGREEMENT_PVT.update_agreement(p_api_version		=> 	p_api_version				,
   					    p_init_msg_list		=>	OKE_API.G_FALSE				,
   					    p_commit			=>      OKE_API.G_FALSE				,
   					    p_msg_count			=>	x_msg_count				,
   					    p_msg_data			=>	x_msg_data				,
			 		    p_agreement_type		=>	p_agreement_type			,
      					    p_funding_in_rec		=>	p_funding_in_rec			,
       					 --   p_allocation_in_tbl		=>	p_allocation_in_tbl			,
       					    p_return_status		=>	x_return_status		                 ,
                                            p_receivables_term_id       =>     l_receivables_term_id
       				           );
Line: 906

END update_funding;
Line: 920

PROCEDURE delete_funding(p_api_version		IN 		NUMBER				,
			 p_init_msg_list	IN		VARCHAR2 := OKE_API.G_FALSE	,
			 p_commit		IN		VARCHAR2 := OKE_API.G_FALSE	,
			 x_return_status	OUT  NOCOPY	VARCHAR2			,
			 x_msg_count		OUT  NOCOPY	NUMBER				,
			 x_msg_data		OUT  NOCOPY	VARCHAR2			,
			 p_funding_source_id	IN		NUMBER
			-- p_agreement_flag	IN		VARCHAR2 := OKE_API.G_FALSE
			) is

--   l_length				NUMBER;
Line: 934

   	select fund_allocation_id
   	from   oke_k_fund_allocations
   	where  funding_source_id = p_funding_source_id
   	order by amount asc;
Line: 940

   l_api_name		CONSTANT	VARCHAR2(30) := 'delete_funding';
Line: 978

        OKE_ALLOCATION_PVT.delete_allocation(p_api_version			=>	p_api_version				,
   			  		     p_init_msg_list			=>	OKE_API.G_FALSE				,
   			  		     p_commit				=>	OKE_API.G_FALSE				,
   		   	  		     p_return_status			=>      x_return_status				,
   		 	 		     p_msg_count			=>      x_msg_count				,
   		 	  		     p_msg_data				=>	x_msg_data				,
   			  		     p_fund_allocation_id		=>	l_allocation_id.fund_allocation_id
   			 		    );
Line: 1009

   OKE_FUNDSOURCE_PVT.delete_funding(p_api_version			=> 	p_api_version		,
   				     p_commit				=>	OKE_API.G_FALSE		,
   				     p_init_msg_list			=>	OKE_API.G_FALSE		,
   				     p_msg_count			=> 	x_msg_count		,
   				     p_msg_data				=> 	x_msg_data		,
   				     p_funding_source_id		=>	p_funding_source_id	,
   				  --   p_agreement_flag			=>	p_agreement_flag	,
   				     p_return_status			=>	x_return_status
   				    );
Line: 1069

END delete_funding;
Line: 1261

PROCEDURE update_allocation(p_api_version		IN 		NUMBER				,
			    p_init_msg_list		IN		VARCHAR2 := OKE_API.G_FALSE	,
			    p_commit			IN		VARCHAR2 := OKE_API.G_FALSE	,
			    x_return_status		OUT  NOCOPY	VARCHAR2			,
			    x_msg_count			OUT  NOCOPY	NUMBER				,
			    x_msg_data			OUT  NOCOPY	VARCHAR2			,
			    p_agreement_flag		IN		VARCHAR2 := OKE_API.G_FALSE	,
			    p_allocation_in_rec		IN		ALLOCATION_REC_IN_TYPE		,
			    x_allocation_out_rec	OUT  NOCOPY	ALLOCATION_REC_OUT_TYPE
			   ) is

   l_api_name		CONSTANT	VARCHAR2(30) := 'update_allocation';
Line: 1312

   OKE_ALLOCATION_PVT.update_allocation(p_api_version		=> 	p_api_version		,
   				        p_init_msg_list		=> 	OKE_API.G_FALSE		,
   				        p_commit		=>	OKE_API.G_FALSE		,
   				        p_msg_count		=> 	x_msg_count		,
   				        p_msg_data		=> 	x_msg_data		,
   				        p_allocation_in_rec	=>	p_allocation_in_rec	,
   				        p_allocation_out_rec	=>	x_allocation_out_rec    ,
   				        p_validation_flag	=>	OKE_API.G_TRUE		,
   				        p_return_status		=>	x_return_status
   				      );
Line: 1355

       IF (check_update_add_pa(p_fund_allocation_id  => p_allocation_in_rec.fund_allocation_id)) THEN

             --dbms_output.put_line('calling oke_agreement_pvt.update_pa_funding from oke_funding_pub');
Line: 1360

             OKE_AGREEMENT_PVT.update_pa_funding(p_api_version			=> 	p_api_version		,
   				                 p_init_msg_list		=> 	OKE_API.G_FALSE		,
   				          	 p_commit			=>	OKE_API.G_FALSE		,
   				          	 p_msg_count			=> 	x_msg_count		,
   				         	 p_msg_data			=> 	x_msg_data		,
 						 p_allocation_in_rec		=>	l_allocation_in_rec	,
 				         	 p_return_status		=>	x_return_status
       				         	);
Line: 1439

END update_allocation;
Line: 1453

PROCEDURE delete_allocation(p_api_version			IN 		NUMBER				,
			    p_init_msg_list			IN		VARCHAR2 := OKE_API.G_FALSE	,
			    p_commit				IN		VARCHAR2 := OKE_API.G_FALSE	,
			    x_return_status			OUT  NOCOPY	VARCHAR2			,
			    x_msg_count				OUT  NOCOPY	NUMBER				,
			    x_msg_data				OUT  NOCOPY	VARCHAR2			,
			    p_fund_allocation_id		IN		NUMBER
			 --   p_agreement_flag			IN		VARCHAR2 := OKE_API.G_FALSE
			   ) is

   l_api_name		CONSTANT	VARCHAR2(30) := 'delete_allocation';
Line: 1468

      select s.amount, s.hard_limit, s.revenue_hard_limit, s.funding_source_id
      from   oke_k_funding_sources s,
             oke_k_fund_allocations f
      where  s.funding_source_id = f.funding_source_id
      and    f.fund_allocation_id = p_fund_allocation_id;
Line: 1475

      select sum(amount), sum(hard_limit), sum(revenue_hard_limit)
      from   oke_k_fund_allocations
      where  funding_source_id = x_funding_source_id;
Line: 1539

   OKE_ALLOCATION_PVT.delete_allocation(p_api_version			=>      p_api_version		,
   					p_commit			=>	OKE_API.G_FALSE		,
   				        p_init_msg_list			=>	OKE_API.G_FALSE		,
   				        p_msg_count			=> 	x_msg_count		,
   				        p_msg_data			=> 	x_msg_data		,
   					p_fund_allocation_id		=>	p_fund_allocation_id	,
   				        p_return_status			=>	x_return_status
   				      );
Line: 1667

END delete_allocation;