DBA Data[Home] [Help]

APPS.QPR_DEAL_APPROVALS_PVT SQL Statements

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

Line: 41

   procedure update_ame_status(p_response_header_id in number,
			       p_user_id in number,
			       p_status in varchar2,
			       x_prior_approvals_tab out nocopy approval_table_type,
			       x_approvals_complete out nocopy varchar2);
Line: 47

   procedure insert_approval_records(p_response_header_id in number,
				     p_approvals_tab in approval_table_type);
Line: 50

   procedure insert_archive_record(p_response_header_id in number,
				   p_user_id in number,
				   p_action in varchar2,
				   p_comments in varchar2);
Line: 55

   procedure update_with_ame(p_response_header_id in number,
			     p_user_id in number,
			     p_action in varchar2);
Line: 84

	 select application_id into g_appl_id
	 from fnd_application
	 where application_short_name = 'QPR';
Line: 96

      delete from qpr_pn_response_approvals
	 where response_header_id = p_response_header_id
	 and archive_flag = 'N'
	 and approver_id <> p_user_id;
Line: 109

	  select user_id
	  from fnd_user
	  where employee_id = c_emp_id;
Line: 142

	 select approver_id,
	 approval_status,
	 rule_id,
	 notification_date,
	 response_date,
	 comments
	 from qpr_pn_response_approvals
	 where response_header_id = c_response_header_id;
Line: 183

	  select approver_name, approval_status
	  from qpr_pn_response_approvals
	  where response_header_id = c_resp_id
	  and archive_flag = 'N';
Line: 190

       select count(*) into l_count
	  from qpr_pn_response_approvals
	  where response_header_id = p_response_header_id
	  and archive_flag = 'N'
	  and approval_status in ('NOTIFIED', 'APPROVE');
Line: 213

	     ame_api2.updateApprovalStatus(
					   applicationIdIn => get_application_id(),
					   transactionTypeIn => g_transaction_type_id,
					   transactionIdIn => p_response_header_id,
					   approverIn => l_approver_record);
Line: 237

	 select approval_status into l_status
	    from qpr_pn_response_approvals
	    where response_header_id = p_response_header_id
	    and approver_id = p_user_id
	    and archive_flag = 'N'
	    and approval_status = 'NOTIFIED';
Line: 409

     procedure update_ame_status(p_response_header_id in number,
				 p_user_id in number,
				 p_status in varchar2,
				 x_prior_approvals_tab out nocopy approval_table_type,
				 x_approvals_complete out nocopy varchar2)
     is
       l_ame_approver_table ame_util.approversTable2;
Line: 436

	select distinct approver_name
	   into l_user_name
	   from qpr_pn_response_approvals
	   where response_header_id = p_response_header_id
	   and approver_id = p_user_id;
Line: 447

   	   ame_api2.updateApprovalStatus(
					 applicationIdIn => get_application_id(),
					 transactionTypeIn => g_transaction_type_id,
					 transactionIdIn => p_response_header_id,
					 approverIn => l_approver_record);
Line: 455

	ame_api2.updateApprovalStatus(
				      applicationIdIn => get_application_id(),
				      transactionTypeIn => g_transaction_type_id,
				      transactionIdIn => p_response_header_id,
				      approverIn => l_approver_record);
Line: 524

     end update_ame_status;
Line: 580

	      ame_api2.updateApprovalStatus(
					    applicationIdIn => get_application_id(),
					    transactionTypeIn => g_transaction_type_id,
					    transactionIdIn => p_response_header_id,
					    approverIn => l_ame_rec);
Line: 655

     procedure insert_approval_records(p_response_header_id in number,
				       p_approvals_tab in approval_table_type)
     is
	l_current_date date;
Line: 676

	      select qpr_pn_response_approvals_s.nextval into l_approval_transaction_id from dual;
Line: 677

	      insert into qpr_pn_response_approvals (
                                                     "APPROVAL_TRANSACTION_ID",
					             "RESPONSE_HEADER_ID",
					             "APPROVAL_SEQUENCE",
					             "APPROVER_ID",
						     "APPROVER_NAME",
					             "APPROVAL_STATUS",
						     "RULE_ID",
						     "RULE_DESCRIPTION",
						     "NOTIFICATION_DATE",
						     "RESPONSE_DATE",
						     "COMMENTS",
					             "ARCHIVE_FLAG",
						     "ITEM_CLASS",
						     "ITEM_ID",
					             "CREATION_DATE",
					             "CREATED_BY",
					             "LAST_UPDATE_DATE",
					             "LAST_UPDATED_BY",
					             "LAST_UPDATE_LOGIN")
		 values (
			 l_approval_transaction_id,
			 p_response_header_id,
			 l_approver_record.approval_sequence,
			 l_approver_record.approver_id,
			 l_approver_record.approver_name,
			 l_approver_record.approval_status,
			 l_approver_record.rule_id,
			 l_approver_record.rule_description,
			 l_approver_record.notification_date,
			 l_approver_record.response_date,
			 l_approver_record.comments,
			 l_approver_record.archive_flag,
			 l_approver_record.item_class,
			 l_approver_record.item_id,
			 l_current_date,
			 l_user_id,
			 l_current_date,
			 l_user_id,
			 l_login_id);
Line: 720

     end insert_approval_records;
Line: 733

	   select APPROVAL_SEQUENCE,
	   APPROVER_ID,
	   APPROVER_NAME,
	   APPROVAL_STATUS,
	   RULE_ID,
	   RULE_DESCRIPTION,
	   NOTIFICATION_DATE,
	   RESPONSE_DATE,
	   COMMENTS,
	   ARCHIVE_FLAG,
	   ITEM_CLASS,
	   ITEM_ID
	   from qpr_pn_response_approvals
	   where response_header_id = c_Response_header_id
	   and approver_id = c_user_id
	   and archive_flag = 'N';
Line: 790

	   select APPROVAL_SEQUENCE,
	   APPROVER_ID,
	   APPROVER_NAME,
	   APPROVAL_STATUS,
	   RULE_ID,
	   RULE_DESCRIPTION,
	   NOTIFICATION_DATE,
	   RESPONSE_DATE,
	   COMMENTS,
	   ARCHIVE_FLAG,
	   ITEM_CLASS,
	   ITEM_ID
	   from qpr_pn_response_approvals
	   where response_header_id = c_Response_header_id
	   and archive_flag = 'N'
	   order by approval_transaction_id;
Line: 833

     procedure insert_archive_record(p_response_header_id in number,
				     p_user_id in number,
				     p_action in varchar2,
				     p_comments in varchar2)
     is
	l_approval_tab approval_table_type;
Line: 850

	   select user_name into l_approval_rec.approver_name
	      from fnd_user
	      where user_id = p_user_id;
Line: 862

	insert_approval_records(p_response_header_id => p_response_header_id,
				p_approvals_tab => l_archive_tab);
Line: 865

     end insert_archive_record;
Line: 867

     procedure update_with_ame(p_response_header_id in number,
			       p_user_id in number,
			       p_action in varchar2)
     is
	l_ame_approver_table ame_util.approversTable2;
Line: 922

	       update qpr_pn_response_approvals
		  set approval_status = l_approvals_tab(i).approval_status
		  where response_header_id = p_response_header_id
		  and approver_id = l_approvals_tab(i).approver_id
		  and rule_id = l_approvals_tab(i).rule_id
		  and item_class = l_approvals_tab(i).item_class
		  and item_id = l_approvals_tab(i).item_id
		  and archive_flag = 'N';
Line: 932

	    update qpr_pn_response_approvals
	       set notification_date = sysdate
	       where response_header_id = p_response_header_id
	       and approval_status like 'NOTIFIED%'
	       and notification_date is null
	       and archive_flag = 'N';
Line: 943

	    update qpr_pn_response_approvals
	       set approval_status = p_action
	       where response_header_id = p_response_header_id
	       and approver_id = p_user_id
	       and nvl(approval_status, 'NULL') in ('NOTIFIED', 'NULL')
	       and archive_flag = 'N';
Line: 952

      end update_with_ame;
Line: 1006

	--alosh: inserting new set of active records
	insert_approval_records(p_response_header_id => p_response_header_id,
				p_approvals_tab => l_approvals_tab);
Line: 1037

	  select approver_name
	  from qpr_pn_response_approvals
	  where approval_status = 'NOTIFIED'
	  and archive_flag = 'N'
	  and response_header_id = p_response_header_id;
Line: 1045

	  select approver_name
	  from qpr_pn_response_approvals
	  where approval_status = 'SUBMIT'
	  and archive_flag = 'Y'
	  and response_header_id = p_response_header_id
	  order by last_update_date desc;
Line: 1166

	  update_ame_status(p_response_header_id => p_response_header_id,
			    p_user_id => p_user_id,
			    p_status => p_action_code,
			    x_prior_approvals_tab => l_approval_tab,
			    x_approvals_complete => x_approvals_complete);
Line: 1183

	  --alosh: update ame as notified
	  mark_ame_notified(
			    p_response_header_id => p_response_header_id,
			    x_notified_approvals_tab => l_temp_approval_tab);
Line: 1215

       insert_archive_record(p_response_header_id => p_response_header_id,
			     p_user_id => p_user_id,
			     p_action => p_action_code,
			     p_comments => p_comments);
Line: 1221

       update_with_ame(p_response_header_id => p_response_header_id,
		       p_user_id => p_user_id,
		       p_action => p_action_code);
Line: 1229

	     update qpr_pn_response_hdrs
		set response_status = 'REJECT'
		where response_header_id = p_response_header_id;
Line: 1234

	     update qpr_pn_response_hdrs
		set response_status = 'PEND_ACCEPT_APPROVE'
		where response_header_id = p_response_header_id;
Line: 1266

       select distinct approver_id
	  into l_user_id
	  from qpr_pn_response_approvals
	  where response_header_id = p_response_header_id
	  and approver_name = p_user_name
	  and archive_flag = 'N';
Line: 1298

	  select APPROVAL_SEQUENCE,
	  APPROVER_ID,
	  APPROVER_NAME,
	  APPROVAL_STATUS,
	  RULE_ID,
	  RULE_DESCRIPTION,
	  NOTIFICATION_DATE,
	  RESPONSE_DATE,
	  COMMENTS,
	  ARCHIVE_FLAG,
	  ITEM_CLASS,
	  ITEM_ID
	  from qpr_pn_response_approvals
	  where response_header_id = c_Response_header_id
	  order by archive_flag,approval_transaction_id;
Line: 1345

	     ame_api2.updateApprovalStatus(
					   applicationIdIn => get_application_id(),
					   transactionTypeIn => g_transaction_type_id,
					   transactionIdIn => p_new_response_id,
					   approverIn => l_ame_rec);
Line: 1372

       insert_approval_records(p_response_header_id => p_new_response_id,
			       p_approvals_tab => l_approvals_tab);
Line: 1402

	  select distinct approver_name into l_user_name
	     from qpr_pn_response_approvals
	     where response_header_id = p_response_header_id
	     and approver_id = p_user_id;
Line: 1430

      delete from qpr_pn_response_approvals
	 where approval_transaction_id = (
					  select max(approval_transaction_id)
					  from qpr_pn_response_approvals
					  where response_header_id = p_response_header_id
					  and approver_id = p_user_id
					  and approval_status = p_action_code
					  and archive_flag = 'Y');