DBA Data[Home] [Help]

APPS.ARI_DB_UTILITIES SQL Statements

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

Line: 178

        select lines.days_start,
               lines.days_to,
               lines.type
        from   ar_aging_bucket_lines    lines,
               ar_aging_buckets         buckets
        where  lines.aging_bucket_id      = buckets.aging_bucket_id
        and    buckets.aging_bucket_id = to_number(p_bucket_name)
        and nvl(buckets.status,'A')       = 'A'
        order  by lines.bucket_sequence_num
        ;
Line: 238

     select decode(l_bucket_line_type ,
                   'DISPUTE_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'PENDADJ_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'DISPUTE_PENDADJ', 'OIR_AGING_' || l_bucket_line_type ,
                   'OIR_AGING_' || to_char(l_bucket_days_from) || '_' || to_char(l_bucket_days_to)
                   ) into p_bucket_status_code0
     from dual ;
Line: 251

     select decode(l_bucket_line_type ,
                   'DISPUTE_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'PENDADJ_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'DISPUTE_PENDADJ', 'OIR_AGING_' || l_bucket_line_type ,
                   'OIR_AGING_' || to_char(l_bucket_days_from) || '_' || to_char(l_bucket_days_to)
                   ) into p_bucket_status_code1
     from dual ;
Line: 264

     select decode(l_bucket_line_type ,
                   'DISPUTE_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'PENDADJ_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'DISPUTE_PENDADJ', 'OIR_AGING_' || l_bucket_line_type ,
                   'OIR_AGING_' || to_char(l_bucket_days_from) || '_' || to_char(l_bucket_days_to)
                   ) into p_bucket_status_code2
     from dual ;
Line: 277

     select decode(l_bucket_line_type ,
                   'DISPUTE_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'PENDADJ_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'DISPUTE_PENDADJ', 'OIR_AGING_' || l_bucket_line_type ,
                   'OIR_AGING_' || to_char(l_bucket_days_from) || '_' || to_char(l_bucket_days_to)
                   ) into p_bucket_status_code3
     from dual ;
Line: 290

     select decode(l_bucket_line_type ,
                   'DISPUTE_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'PENDADJ_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'DISPUTE_PENDADJ', 'OIR_AGING_' || l_bucket_line_type ,
                   'OIR_AGING_' || to_char(l_bucket_days_from) || '_' || to_char(l_bucket_days_to)
                   ) into p_bucket_status_code4
     from dual ;
Line: 303

     select decode(l_bucket_line_type ,
                   'DISPUTE_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'PENDADJ_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'DISPUTE_PENDADJ', 'OIR_AGING_' || l_bucket_line_type ,
                   'OIR_AGING_' || to_char(l_bucket_days_from) || '_' || to_char(l_bucket_days_to)
                   ) into p_bucket_status_code5
     from dual ;
Line: 316

     select decode(l_bucket_line_type ,
                   'DISPUTE_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'PENDADJ_ONLY' , 'OIR_AGING_' || l_bucket_line_type ,
                   'DISPUTE_PENDADJ', 'OIR_AGING_' || l_bucket_line_type ,
                   'OIR_AGING_' || to_char(l_bucket_days_from) || '_' || to_char(l_bucket_days_to)
                   ) into p_bucket_status_code6
     from dual ;
Line: 404

        select lines.days_start,
               lines.days_to,
               lines.report_heading1,
               lines.report_heading2,
               lines.type
        from   ar_aging_bucket_lines    lines,
               ar_aging_buckets         buckets
        where  lines.aging_bucket_id      = buckets.aging_bucket_id
        and    buckets.aging_bucket_id = to_number(p_bucket_name)
        and nvl(buckets.status,'A')       = 'A'
        order  by lines.bucket_sequence_num
        ;
Line: 418

  SELECT sum(amt), sum(b0*amt), sum(b1*amt), sum(b2*amt), sum(b3*amt), sum(b4*amt), sum(b5*amt), sum(b6*amt)
  FROM (select decode(p_currency_code, NULL, ps.acctd_amount_due_remaining,
                ps.amount_due_remaining) amt,
         decode(v_bucket_line_type_0,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_0,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_0,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b0,
	decode(v_bucket_line_type_1,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_1,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_1,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b1,
	decode(v_bucket_line_type_2,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_2,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_2,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b2,
	decode(v_bucket_line_type_3,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_3,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_3,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b3,
	decode(v_bucket_line_type_4,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_4,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_4,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b4,
	decode(v_bucket_line_type_5,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_5,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_5,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b5,
	decode(v_bucket_line_type_6,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_6,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_6,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b6
  from   ar_payment_schedules        ps,
         ar_irec_user_acct_sites_all AcctSites,
  ra_customer_trx ct
  where  ps.status = 'OP'
  and AcctSites.user_id=FND_GLOBAL.USER_ID()
  and AcctSites.customer_id=ps.customer_id
  and AcctSites.customer_site_use_id=ps.customer_site_use_id
  and AcctSites.session_id=p_session_id
  and AcctSites.customer_id= p_customer_id
  and AcctSites.org_id = ps.org_id
  and   upper(p_currency_code)  = ps.invoice_currency_code
  --and   'CM'      <> ps.class
  and   'PMT'     <> ps.class
  and   'GUAR'    <> ps.class
  AND ps.customer_trx_id = ct.customer_trx_id
  AND(TRUNC(ps.trx_date)) >= trunc(decode( nvl(FND_PROFILE.VALUE('ARI_FILTER_TRXDATE_OLDER'), 0), 0, ps.trx_date, (sysdate-FND_PROFILE.VALUE('ARI_FILTER_TRXDATE_OLDER'))))
  AND ct.printing_option =  decode(nvl(FND_PROFILE.VALUE('ARI_FILTER_DONOTPRINT_TRX'), 'NOT'), 'Y', 'PRI', ct.printing_option)
) ;
Line: 574

  SELECT SUM(amt), SUM(amt*b0),SUM(amt*b1),SUM(amt*b2),SUM(amt*b3),SUM(amt*b4),SUM(amt*b5),SUM(amt*b6)
  FROM (
  select decode(p_currency_code, NULL, ps.acctd_amount_due_remaining,
                ps.amount_due_remaining) amt,
         decode(v_bucket_line_type_0,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_0,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_0,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b0,
	decode(v_bucket_line_type_1,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_1,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_1,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b1,
	decode(v_bucket_line_type_2,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_2,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_2,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b2,
	decode(v_bucket_line_type_3,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_3,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_3,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b3,
	decode(v_bucket_line_type_4,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_4,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_4,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b4,
	decode(v_bucket_line_type_5,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_5,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_5,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b5,
	decode(v_bucket_line_type_6,
		'DISPUTE_ONLY',decode(nvl(ps.amount_in_dispute,0),0,0,1),
		'PENDADJ_ONLY',decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
		'DISPUTE_PENDADJ',decode(nvl(ps.amount_in_dispute,0),
			0,decode(nvl(ps.amount_adjusted_pending,0),0,0,1),
			1),
		decode(	greatest(v_bucket_days_from_6,
				ceil(p_as_of_date-ps.due_date)),
			least(v_bucket_days_to_6,
				ceil(p_as_of_date-ps.due_date)),1,
			0)
		* decode(nvl(ps.amount_in_dispute,0), 0, 1,
			decode(v_bucket_category,
				'DISPUTE_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))
		* decode(nvl(ps.amount_adjusted_pending,0), 0, 1,
			decode(v_bucket_category,
				'PENDADJ_ONLY', 0, 'DISPUTE_PENDADJ', 0,
				1))) b6
  from   ar_payment_schedules        ps,
  ar_irec_user_acct_sites_all AcctSites,
  ra_customer_trx ct
  where  ps.status = 'OP'
  and AcctSites.user_id=FND_GLOBAL.USER_ID()
  and AcctSites.customer_id=ps.customer_id
  and AcctSites.customer_site_use_id=ps.customer_site_use_id
  and AcctSites.session_id=p_session_id
  and AcctSites.org_id = ps.org_id
  and    p_currency_code        = ps.invoice_currency_code
  and    'CM'    <> ps.class
  and    'PMT'   <> ps.class
  and    'GUAR'   <> ps.class
  AND ps.customer_trx_id = ct.customer_trx_id
  AND(TRUNC(ps.trx_date)) >= trunc(decode( nvl(FND_PROFILE.VALUE('ARI_FILTER_TRXDATE_OLDER'), 0), 0, ps.trx_date, (sysdate-FND_PROFILE.VALUE('ARI_FILTER_TRXDATE_OLDER'))))
  AND ct.printing_option =  decode(nvl(FND_PROFILE.VALUE('ARI_FILTER_DONOTPRINT_TRX'), 'NOT'), 'Y', 'PRI', ct.printing_option)
);
Line: 981

  select 'Y' into l_valid_user
  from   fnd_concurrent_requests fcr,
         fnd_concurrent_programs fcp
  where  fcr.request_id = p_request_id
  and    fcr.requested_by = p_user_id
  and    fcp.concurrent_program_id = fcr.concurrent_program_id
  and    fcp.concurrent_program_name = 'RAXINV_SEL';
Line: 992

    select status_code into l_status
    from fnd_concurrent_requests
    where request_id = p_request_id;
Line: 1029

 |      inserts the record in ar_irec_print_requests table.
 |
 | PSEUDO CODE/LOGIC
 |
 | PARAMETERS
 |      p_id_list            	The ids to be submitted
 |      p_list_type             List type
 |      p_description           Description
 |	p_template_id		Template id
 |	p_customer_id		Customer id
 |	p_site_id		Customer Site Use Id
 |
 | RETURNS
 |      x_req_id_list           Request Id
 |
 | KNOWN ISSUES
 |
 |
 |
 | NOTES
 |
 |
 |
 | MODIFICATION HISTORY
 | Date                  Author            Description of Changes
 | 01-Aug-2005           rsinthre          Created
 | 13-May-2011           avepati           Click on print button should print the invoices
 |                                         Using cusotm BPA  templates
 *=======================================================================*/
PROCEDURE oir_bpa_print_invoices(
                                 p_id_list   IN  VARCHAR2,
                                 x_req_id_list  OUT NOCOPY VARCHAR2,
                                 p_list_type    IN  VARCHAR2,
                                 p_description  IN  VARCHAR2 ,
                                 p_customer_id  IN  NUMBER,
                                 p_customer_site_id      IN  NUMBER DEFAULT NULL,
                                 p_user_name IN VARCHAR2
) IS
l_start_location NUMBER default 0;
Line: 1072

l_last_update_login NUMBER(15);
Line: 1073

l_last_update_date DATE;
Line: 1074

l_last_updated_by NUMBER(15);
Line: 1079

    l_template_id := FND_PROFILE.value('OIR_BPA_TEMPLATE_SELECTION');
Line: 1089

    l_last_update_login     := FND_GLOBAL.LOGIN_ID;
Line: 1090

    l_last_update_date      := sysdate;
Line: 1091

    l_last_updated_by       := FND_GLOBAL.USER_ID;
Line: 1098

			INSERT INTO AR_IREC_PRINT_REQUESTS(REQUEST_ID, CUSTOMER_ID, CUSTOMER_SITE_USE_ID, REQUESTED_BY, PROGRAM_NAME, UPLOAD_DATE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN)
			VALUES (to_number(l_req_id_list), p_customer_id, p_customer_site_id, l_created_by, p_description, sysdate, l_created_by, l_creation_date, l_last_update_login, l_last_update_date, l_last_updated_by);
Line: 1104

			INSERT INTO AR_IREC_PRINT_REQUESTS(REQUEST_ID, CUSTOMER_ID, CUSTOMER_SITE_USE_ID, REQUESTED_BY, PROGRAM_NAME, UPLOAD_DATE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN)
			VALUES (to_number(l_request_id), p_customer_id, p_customer_site_id, l_created_by, p_description, sysdate, l_created_by, l_creation_date, l_last_update_login, l_last_update_date, l_last_updated_by);
Line: 1113

 | PUBLIC procedure oir_invoice_print_selected_invoices
 |
 | DESCRIPTION
 |      This procedure submits cuncurrent request to print the
 |      selected invoices .The notification is sent to the user
 |      who has submited this request .
 |      ----------------------------------------
 |
 | PSEUDO CODE/LOGIC
 |
 | PARAMETERS
 |      p_resp_name             Responsibility Name
 |      p_user_name             User Name
 |      p_random_invoices_flag  Randomly selected invoices or a range of invoices
 |      p_invoice_list_string   Customer_trx_ids of all selected invoices
 |
 | RETURNS
 |      p_request_id            Request ID
 |
 | KNOWN ISSUES
 |
 |
 |
 | NOTES
 |
 |
 |
 | MODIFICATION HISTORY
 | Date                  Author            Description of Changes
 | 21-Jul-2009           avepati         Created
 | 08-Apr-2011		 rsinthre	 Bug 12329147 Removed the apps schema reference
 |
 *=======================================================================*/
PROCEDURE oir_print_selected_invoices(
        p_resp_name             IN VARCHAR2,
        p_user_name             IN VARCHAR2,
        p_org_id                IN NUMBER,
        p_random_invoices_flag  IN VARCHAR2,
        p_invoice_list_string   IN VARCHAR2,
        p_customer_id           IN VARCHAR2,
        p_customer_site_id      IN VARCHAR2,
        p_request_id            OUT NOCOPY NUMBER
) IS

        appl_id fnd_responsibility_vl.application_id%type;
Line: 1169

l_last_update_login NUMBER(15);
Line: 1170

l_last_update_date DATE;
Line: 1171

l_last_updated_by NUMBER(15);
Line: 1181

    l_last_update_login     := FND_GLOBAL.LOGIN_ID;
Line: 1182

    l_last_update_date      := sysdate;
Line: 1183

    l_last_updated_by       := FND_GLOBAL.USER_ID;
Line: 1186

  select application_id, responsibility_id, responsibility_name
  into   appl_id, resp_id, resp_name
  from fnd_responsibility_vl
  where responsibility_name = p_resp_name;
Line: 1191

  select user_id, user_name
  into user_id, user_name
  from fnd_user
  where user_name = p_user_name;
Line: 1200

	fnd_log.string(fnd_log.LEVEL_STATEMENT,G_PKG_NAME, 'oir_print_selected_invoices, l_server_id = ' || l_server_id||' l_security_group_id = '||l_security_group_id);
Line: 1256

  	INSERT INTO AR_IREC_PRINT_REQUESTS(REQUEST_ID, CUSTOMER_ID, CUSTOMER_SITE_USE_ID, REQUESTED_BY, PROGRAM_NAME, UPLOAD_DATE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN)
			VALUES (to_number(l_request_id), p_customer_id, p_customer_site_id, l_created_by, l_program_name, sysdate, l_created_by, l_creation_date, l_last_update_login, l_last_update_date, l_last_updated_by);
Line: 1261

END oir_print_selected_invoices ;
Line: 1306

       SELECT routing_number,
              new_routing_number,
              nvl(bank_name,routing_number) bank_name,
              nvl(bank_name,routing_number) AS branch_name,
              nvl(country,'US') AS country
      FROM ar_bank_directory;
Line: 1314

      SELECT bank_party_id,branch_party_id
      FROM   ce_bank_branches_V
      WHERE  branch_number = l_routing_number;
Line: 1319

      SELECT bank_party_id,branch_party_id, branch_number
      FROM   ce_bank_branches_V
      WHERE  upper(bank_name) = upper(l_bank_name);
Line: 1324

      SELECT bank_party_id,branch_party_id, branch_number
      FROM   ce_bank_branches_V
      WHERE  upper(bank_branch_name) = upper(l_bank_name);
Line: 1329

      SELECT object_version_number from hz_parties where party_id = l_party_id;
Line: 1433

              iby_ext_bankacct_pub.update_ext_bank_branch (
                  -- IN parameters
                  p_api_version         => l_api_version,
                  p_init_msg_list       => l_init_msg_list,
                  p_ext_bank_branch_rec => l_ext_branch_rec,
                  -- OUT parameters
                  x_return_status       => RETCODE,
                  x_msg_count           => l_msg_count,
                  x_msg_data            => ERRBUF,
                  x_response            => l_branch_response );
Line: 1629

        fnd_file.put_line( FND_FILE.LOG, 'Successfully Created/Updated Records :: '||l_success_recs);
Line: 1630

        fnd_file.put_line( FND_FILE.LOG, 'Failed to Create/Update Records :: '||l_failure_recs);
Line: 1638

			message => 'Not all banks informartion were created/updated successfully. Please review the log file.');
Line: 1705

      select min(request_date) into l_fnd_request_date from fnd_concurrent_requests;
Line: 1729

		select count(*) into numrows from ar_irec_print_requests where  trunc(creation_date) < trunc(l_fnd_request_date);
Line: 1730

 		delete from ar_irec_print_requests where  trunc(creation_date) < trunc(l_fnd_request_date);
Line: 1800

      select trunc(sysdate)-1 into l_purge_date from dual;
Line: 1824

		select count(*) into numrows from ar_irec_user_acct_sites_all where  trunc(creation_date) < trunc(l_purge_date);
Line: 1825

 		delete from ar_irec_user_acct_sites_all where  trunc(creation_date) < trunc(l_purge_date);