DBA Data[Home] [Help]

APPS.ARP_CMREQ_WF SQL Statements

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

Line: 56

    SELECT org_id
    FROM   ra_cm_requests_all
    WHERE  request_id = p_item_key;
Line: 153

/*7367350 storing internal comment and inserting notes*/
l_internal_comment                 VARCHAR2(1760) DEFAULT NULL;
Line: 157

          SELECT name, display_name
          FROM wf_users
          WHERE     orig_system = 'PER'
              AND   orig_system_id = l_requestor_id;
Line: 164

          SELECT name, display_name
          FROM wf_users
          WHERE     orig_system = 'FND_USR'
              AND   orig_system_id = l_requestor_id;
Line: 412

   select  r.request_id,
           r.customer_trx_id,
           r.total_amount,
           r.cm_reason_code,
           l.meaning,
           r.created_by,
           r.comments,
           r.line_credits_flag,
           r.line_amount,
           r.tax_amount,
           r.freight_amount,
           r.ORIG_TRX_NUMBER,
           r.TAX_EX_CERT_NUM,
	   r.internal_comment
   into    l_workflow_document_id,
           l_customer_trx_id,
           l_amount,
           p_reason,
           p_reason_meaning,
           l_created_by,
           p_comments,
           l_line_credit_flag,
           l_line_amount,
           l_tax_amount,
           l_freight_amount,
           l_orig_trx_number,
           l_tax_ex_cert_num,
	   p_internal_comment
   from   ar_lookups l,
          ra_cm_requests r
   where  r.request_id = p_item_key
   and    r.cm_reason_code = l.lookup_code
   and    l.lookup_type = 'CREDIT_MEMO_REASON';
Line: 460

   select employee_id
   into p_requestor_id
   from fnd_user
   where user_id = l_created_by;
Line: 520

   select sum(ps.amount_line_items_original), sum(ps.tax_original),
          sum(ps.freight_original),           sum(ps.amount_due_original),
          ps.invoice_currency_code
   into   p_original_line_amount ,       p_original_tax_amount,
          p_original_freight_amount,     p_original_total, p_currency_code
   from  ar_payment_schedules ps
   where ps.customer_trx_id = p_customer_trx_id
   group by ps.invoice_currency_code ;
Line: 684

    select url
    into   l_url
    from   ra_cm_requests
    where  request_id = p_item_key;
Line: 700

    select transaction_url
    into l_trans_url
    from  ra_cm_requests
    where request_id = p_item_key;
Line: 712

    select activities_url
    into l_act_url
    from ra_cm_requests
    where request_id =p_item_key;
Line: 774

      select rct.bill_to_site_use_id,
             rct.bill_to_customer_id,
             substrb(party.party_name,1,50),
             bill_to_cust.account_number,
             rct.trx_number
      into   p_bill_to_site_use_id,     p_customer_id,
          p_bill_to_customer_name,   p_bill_to_customer_number,
          p_trx_number
      from   hz_cust_accounts bill_to_cust,
             hz_parties party,
             ra_customer_trx  rct
      where     rct.customer_trx_id       = p_customer_trx_id
            and rct.bill_to_customer_id   = bill_to_cust.cust_account_id
            and bill_to_cust.party_id = party.party_id ;
Line: 805

     select substrb(party.party_name,1,50),
            ship_to_cust.account_number
     into   p_ship_to_customer_name,
            p_ship_to_customer_number
     from   hz_cust_accounts ship_to_cust,
            hz_parties  party,
            ra_customer_trx  rct
     where    rct.customer_trx_id       = p_customer_trx_id
         and  rct.ship_to_customer_id   = ship_to_cust.cust_account_id
         and  ship_to_cust.party_id = party.party_id;
Line: 1001

   select  col.employee_id, cp.collector_id,
           col.name
   into    p_collector_employee_id,   p_collector_id,
           p_collector_name
   from    ar_collectors col, hz_customer_profiles cp
   where cp.cust_account_id = p_customer_id
   and   cp.site_use_id     = p_bill_to_site_use_id
   and   cp.collector_id    = col.collector_id ;
Line: 1019

        select  col.employee_id,
                cp_cust.collector_id,
                col.name
        into    p_collector_employee_id,
                p_collector_id,
                p_collector_name
        from    ar_collectors col,
                hz_customer_profiles cp_cust
        where cp_cust.cust_account_id = p_customer_id
        and   cp_cust.site_use_id     IS NULL
        and   cp_cust.collector_id    = col.collector_id ;
Line: 1071

         Select user_id
         From   fnd_user
	 Where  employee_id  = l_collector_employee_id;
Line: 1108

     SelectFirstPrimaryApproverId(l_reason_code,
                                  l_currency_code,
                                  l_approver_id);
Line: 1186

            SELECT invoicing_rule_id
              INTO l_invoicing_rule_id
              FROM ra_customer_trx
            WHERE customer_trx_id = l_customer_trx_id;
Line: 1267

     l_debug_mesg := 'Get the user name of selected role';
Line: 1289

     SELECT user_id INTO l_employee_id
     FROM fnd_user
     WHERE user_name = l_approver_name;
Line: 1293

     SELECT primary_flag INTO l_primary_flag
     FROM ar_approval_user_limits aul
     WHERE reason_code = l_reason_code
     AND currency_code = l_currency_code
     AND user_id   = l_employee_id;
Line: 1385

       SelectFirstPrimaryApproverId(l_reason_code,
                                    l_currency_code,
                                    l_first_approver_id);
Line: 1423

      SelectPrimaryApproverId(l_reason_code,
                              l_currency_code,
                              l_approver_count,
                              l_approver_id);
Line: 1522

     select employee_id, user_id into l_employee_id, l_approver_id
     from fnd_user
     where user_name = l_approver_user_name;
Line: 1611

     select employee_id into l_employee_id
     from fnd_user
     where user_id = l_approver_id;
Line: 1620

      SELECT hremp.supervisor_id
     INTO   l_supervisor_emp_id
     FROM   per_all_assignments_f hremp
     WHERE  hremp.person_id = l_employee_id
     AND primary_flag = 'Y'       -- get primary assgt
     AND assignment_type = 'E'    -- ensure emp assgt, not applicant assgt
     AND trunc(sysdate) BETWEEN hremp.effective_start_date AND
                                hremp.effective_end_date ;
Line: 1636

     select user_id into l_approver_id
     from fnd_user
     where employee_id = l_supervisor_emp_id;
Line: 1709

  select count(*)
  from per_all_people_f
  where person_id=p_employee_id;
Line: 1748

  select count(*)
  from ar_approval_user_limits aul
  where aul.reason_code   = l_reason_code
  and   aul.currency_code = l_currency_code
  and   aul.primary_flag  = p_primary_flag
  and   user_id = p_employee_id
  order by - aul.amount_from;
Line: 1789

PROCEDURE SelectFirstPrimaryApproverId(p_reason_code              IN  VARCHAR2,
                                       p_currency_code            IN  VARCHAR2,
                                       p_approver_employee_id     OUT NOCOPY NUMBER) IS


cursor c1 is
  select aul.user_id
  from ar_approval_user_limits aul
  where aul.reason_code   = p_reason_code
  and   aul.currency_code = p_currency_code
  and   aul.primary_flag  = 'Y'
  order by - aul.amount_from;
Line: 1809

 l_debug_mesg := 'Select first employee_id with lowest dollar value';
Line: 1838

     Wf_Core.Context('AR_CMREQ_WF', 'SelectFirstPrimaryApproverId',
                      null, null, null, l_debug_mesg);
Line: 1841

 END SelectFirstPrimaryApproverId;
Line: 1844

PROCEDURE SelectPrimaryApproverId(p_reason_code           IN  VARCHAR2,
                                  p_currency_code         IN  VARCHAR2,
                                  p_approver_count        IN  NUMBER,
                                  p_approver_employee_id  OUT NOCOPY NUMBER) IS

cursor c1 is
  select aul.user_id
  from ar_approval_user_limits aul
  where aul.reason_code   = p_reason_code
  and   aul.currency_code = p_currency_code
  and   aul.primary_flag  = 'Y'
  order by - aul.amount_from;
Line: 1865

l_debug_mesg := 'Select employee_id with dollar value larger than previous one';
Line: 1896

     Wf_Core.Context('AR_CMREQ_WF', 'SelectPrimaryApproverId',
                      null, null, null, l_debug_mesg);
Line: 1900

 END SelectPrimaryApproverId;
Line: 2026

SELECT employee_id
INTO l_employee_id
FROM fnd_user
WHERE user_id = p_user_id;
Line: 2032

  select wu.name, wu.display_name
  into   p_user_name, p_display_name
  from wf_users wu, fnd_user fu
  where wu.orig_system    = 'PER'
  and   wu.orig_system_id = l_employee_id
  and   wu.orig_system_id = fu.employee_id
  and   fu.user_id = p_user_id
  and   fu.user_name = wu.name;
Line: 2069

    SELECT employee_id
    FROM   fnd_user
    WHERE  user_id = l_approver_id;
Line: 2073

    Select user_id
    From   fnd_user
    Where  employee_id = l_manager_id ;
Line: 2112

  SELECT hremp.supervisor_id
  INTO   l_manager_id
  FROM   per_all_assignments_f  hremp
  WHERE  hremp.person_id = l_employee_id
  AND primary_flag = 'Y'          -- get primary assgt
  AND assignment_type = 'E'       -- ensure emp assgt, not applicant assgt
  AND trunc(sysdate) BETWEEN hremp.effective_start_date AND
                             hremp.effective_end_date;
Line: 2208

  Select user_id
  From   fnd_user
  Where  employee_id  = l_collector_employee_id;
Line: 2818

   l_debug_mesg := 'Check if the selected approver is a final one';
Line: 2821

   select aul.amount_to, aul.amount_from
   into   l_amount_to, l_amount_from
   from ar_approval_user_limits aul
   where aul.user_id   = p_approver_id
   and aul.reason_code     = p_reason_code
   and aul.currency_code   = p_currency_code ;
Line: 2874

      SELECT payment_schedule_id, due_date, amount_in_dispute, dispute_date
         FROM  ar_payment_schedules ps
         WHERE  ps.customer_trx_id = p_customer_trx_id;
Line: 2901

        SELECT total_amount  * -1
          into remove_from_dispute_amt
          from ra_cm_requests
        WHERE request_id = l_request_id;
Line: 2920

                arp_process_cutil.update_ps
                     (p_ps_id=> ps_rec.payment_schedule_id,
	              p_due_date=> ps_rec.due_date,
	              p_amount_in_dispute=> new_dispute_amt,
	              p_dispute_date=> new_dispute_date,
                      p_update_dff => 'N',
	              p_attribute_category=>NULL,
	              p_attribute1=>NULL,
	              p_attribute2=>NULL,
	              p_attribute3=>NULL,
	              p_attribute4=>NULL,
	              p_attribute5=>NULL,
	              p_attribute6=>NULL,
	              p_attribute7=>NULL,
	              p_attribute8=>NULL,
	              p_attribute9=>NULL,
	              p_attribute10=>NULL,
	              p_attribute11=>NULL,
	              p_attribute12=>NULL,
	              p_attribute13=>NULL,
	              p_attribute14=>NULL,
	              p_attribute15=>NULL );
Line: 3046

        SELECT display_name,orig_system_id INTO l_role_display_name, l_role_id
        FROM wf_roles
        WHERE name = l_receivable_role;
Line: 3137

        SELECT orig_system_id, display_name
	INTO l_approver_id, l_approver_display_name
        FROM wf_users
        WHERE orig_system = 'PER'
        AND   name = l_approver_user_name;
Line: 3197

PROCEDURE InsertSubmissionNotes(p_item_type        IN  VARCHAR2,
                                p_item_key         IN  VARCHAR2,
                                p_actid            IN  NUMBER,
                                p_funcmode         IN  VARCHAR2,
                                p_result           OUT NOCOPY VARCHAR2) IS

 l_debug_mesg                 varchar2(240);
Line: 3216

 /* Bug 7367350 inserting internal notes */
 l_internal_comment           VARCHAR2(1760) DEFAULT NULL;
Line: 3224

  l_debug_mesg   := 'Insert WF submission notes';
Line: 3274

        select meaning into l_reason_meaning
        from ar_lookups
        where lookup_type = 'CREDIT_MEMO_REASON'
          and lookup_code = l_reason_code;
Line: 3292

	select meaning into l_comment_type
 	  from ar_lookups
	  where  LOOKUP_TYPE='AR_COMMENT_CLASSIFICATION'
	  AND    LOOKUP_CODE='C';
Line: 3299

	 select meaning into l_comment_type
 	  from ar_lookups
	  where  LOOKUP_TYPE='AR_COMMENT_CLASSIFICATION'
	  AND    LOOKUP_CODE='I';
Line: 3305

	  InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text1,
                        l_note_id);
Line: 3315

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text,
                        l_note_id);
Line: 3352

    wf_core.context('ARP_CMREQ_WF', 'InsertSubmissionNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 3356

end InsertSubmissionNotes;
Line: 3359

PROCEDURE InsertApprovalReminderNotes(p_item_type        IN  VARCHAR2,
                                     p_item_key         IN  VARCHAR2,
                                     p_actid            IN  NUMBER,
                                     p_funcmode         IN  VARCHAR2,
                                     p_result           OUT NOCOPY VARCHAR2) IS

l_debug_mesg                 varchar2(240);
Line: 3377

  l_debug_mesg   := 'Insert Request Approval Reminder notes';
Line: 3414

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text,
                        l_note_id);
Line: 3457

    wf_core.context('ARP_CMREQ_WF', 'InsertApprovalReminderNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 3461

end InsertApprovalReminderNotes;
Line: 3464

PROCEDURE InsertEscalationNotes     (p_item_type        IN  VARCHAR2,
                                     p_item_key         IN  VARCHAR2,
                                     p_actid            IN  NUMBER,
                                     p_funcmode         IN  VARCHAR2,
                                     p_result           OUT NOCOPY VARCHAR2) IS

l_debug_mesg                 varchar2(240);
Line: 3482

  l_debug_mesg   := 'Insert Escalation notes';
Line: 3519

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text,
                        l_note_id);
Line: 3556

    wf_core.context('ARP_CMREQ_WF', 'InsertEscalationNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 3560

end InsertEscalationNotes;
Line: 3563

PROCEDURE InsertRequestManualNotes  (p_item_type        IN  VARCHAR2,
                                     p_item_key         IN  VARCHAR2,
                                     p_actid            IN  NUMBER,
                                     p_funcmode         IN  VARCHAR2,
                                     p_result           OUT NOCOPY VARCHAR2) IS

l_debug_mesg                 varchar2(240);
Line: 3582

  l_debug_mesg   := 'Insert Request Manual Entry notes';
Line: 3607

     SELECT display_name INTO l_role_display_name
     FROM wf_roles
     WHERE name = l_receivable_role;
Line: 3621

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text,
                        l_note_id);
Line: 3658

    wf_core.context('ARP_CMREQ_WF', 'InsertRequestManualNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 3662

end InsertRequestManualNotes;
Line: 3665

PROCEDURE InsertCompletedManualNotes(p_item_type        IN  VARCHAR2,
                                     p_item_key         IN  VARCHAR2,
                                     p_actid            IN  NUMBER,
                                     p_funcmode         IN  VARCHAR2,
                                     p_result           OUT NOCOPY VARCHAR2) IS

 l_debug_mesg                 varchar2(240);
Line: 3681

 l_last_updated_by     number;
Line: 3682

 l_last_update_login   number;
Line: 3693

  l_last_updated_by   := ARP_GLOBAL.user_id;
Line: 3694

  l_last_update_login := ARP_GLOBAL.last_update_login ;
Line: 3697

  l_debug_mesg   := 'Insert Completed Manual Entry notes';
Line: 3723

    SELECT display_name INTO l_role_display_name
    FROM wf_roles
    WHERE   name = l_receivable_role;
Line: 3739

    InsertTrxNotes(NULL,
                   NULL,
                   NULL,
                   l_customer_trx_id,
                   'MAINTAIN',
                   l_note_text,
                   l_note_id);
Line: 3747

     /* Bug 1908252 : update last_update* fields */
     update ra_cm_requests
	set status = 'COMPLETE',
	    approval_date = SYSDATE,
            last_updated_by = l_last_updated_by,
            last_update_date = SYSDATE,
            last_update_login = l_last_update_login
	where request_id = p_item_key;
Line: 3784

    wf_core.context('ARP_CMREQ_WF', 'InsertCompletedManualNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 3788

end InsertCompletedManualNotes;
Line: 3791

PROCEDURE InsertRequestApprovalNotes(p_item_type        IN  VARCHAR2,
                                     p_item_key         IN  VARCHAR2,
                                     p_actid            IN  NUMBER,
                                     p_funcmode         IN  VARCHAR2,
                                     p_result           OUT NOCOPY VARCHAR2) IS

l_debug_mesg                 varchar2(240);
Line: 3809

  l_debug_mesg   := 'Insert Request Approval notes';
Line: 3847

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text,
                        l_note_id);
Line: 3883

    wf_core.context('ARP_CMREQ_WF', 'InsertRequestApprovalNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 3887

end InsertRequestApprovalNotes;
Line: 3889

PROCEDURE InsertApprovedResponseNotes(p_item_type        IN  VARCHAR2,
                                      p_item_key         IN  VARCHAR2,
                                      p_actid            IN  NUMBER,
                                      p_funcmode         IN  VARCHAR2,
                                      p_result           OUT NOCOPY VARCHAR2) IS

l_debug_mesg                 varchar2(240);
Line: 3907

  l_debug_mesg   := 'Insert Approved Response notes';
Line: 3945

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text,
                        l_note_id);
Line: 3982

    wf_core.context('ARP_CMREQ_WF', 'InsertApprovedResponseNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 3986

end InsertApprovedResponseNotes;
Line: 3989

PROCEDURE InsertRejectedResponseNotes(p_item_type        IN  VARCHAR2,
                                      p_item_key         IN  VARCHAR2,
                                      p_actid            IN  NUMBER,
                                      p_funcmode         IN  VARCHAR2,
                                      p_result           OUT NOCOPY VARCHAR2) IS

 l_debug_mesg                 varchar2(240);
Line: 4004

 l_last_updated_by     number;
Line: 4005

 l_last_update_login   number;
Line: 4016

  l_last_updated_by := ARP_GLOBAL.user_id;
Line: 4017

  l_last_update_login := ARP_GLOBAL.last_update_login ;
Line: 4020

  l_debug_mesg   := 'Insert Rejected Response notes';
Line: 4058

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text,
                        l_note_id);
Line: 4066

     /* Bug 1908252 : update last_update* fields */

     UPDATE ra_cm_requests
     SET status = 'NOT_APPROVED',
         last_updated_by = l_last_updated_by,
         last_update_date = SYSDATE,
         last_update_login = l_last_update_login
     WHERE request_id = p_item_key;
Line: 4105

    wf_core.context('ARP_CMREQ_WF', 'InsertRejectedResponseNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 4110

end InsertRejectedResponseNotes;
Line: 4113

PROCEDURE InsertSuccessfulAPINotes(p_item_type        IN  VARCHAR2,
                                   p_item_key         IN  VARCHAR2,
                                   p_actid            IN  NUMBER,
                                   p_funcmode         IN  VARCHAR2,
                                   p_result           OUT NOCOPY VARCHAR2) IS

 l_debug_mesg                 varchar2(240);
Line: 4131

  l_debug_mesg   := 'Insert Completed Successful API notes';
Line: 4156

 /* Get trx number for CM and the insert into note text */


    fnd_message.set_name('AR', 'AR_WF_COMPLETED_SUCCESSFUL');
Line: 4169

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        l_note_text,
                        l_note_id);
Line: 4206

    wf_core.context('ARP_CMREQ_WF', 'InsertSuccessfulAPINotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 4210

end InsertSuccessfulAPINotes;
Line: 4213

PROCEDURE InsertNotes(p_item_type        IN  VARCHAR2,
                      p_item_key         IN  VARCHAR2,
                      p_actid            IN  NUMBER,
                      p_funcmode         IN  VARCHAR2,
                      p_result           OUT NOCOPY VARCHAR2) IS


 l_debug_mesg                 varchar2(240);
Line: 4240

  l_debug_mesg   := 'Create a call record and insert a note';
Line: 4288

         InsertTrxNotes(NULL,
                        NULL,
                        NULL,
                        l_customer_trx_id,
                        'MAINTAIN',
                        'Credit Memo request was approved by receivable role.',
                        l_note_id);
Line: 4325

    wf_core.context('ARP_CMREQ_WF', 'InsertNotes',
		    p_item_type, p_item_key, to_char(p_actid), p_funcmode);
Line: 4329

end InsertNotes;
Line: 4332

PROCEDURE InsertTrxNotes(x_customer_call_id          IN  NUMBER,
                           x_customer_call_topic_id    IN  NUMBER,
                           x_action_id                 IN  NUMBER,
                           x_customer_trx_id           IN  NUMBER,
                           x_note_type                 IN  VARCHAR2,
                           x_text                      IN  VARCHAR2,
                           x_note_id                   OUT NOCOPY NUMBER) IS

l_debug_mesg          varchar2(240);
Line: 4341

l_last_updated_by     number;
Line: 4342

l_last_update_date    date;
Line: 4343

l_last_update_login   number;
Line: 4349

   l_debug_mesg := 'Insert call topic notes';
Line: 4363

      l_last_update_login     := ARP_GLOBAL.last_update_login ;
Line: 4364

      l_last_update_date      := sysdate;
Line: 4365

      l_last_updated_by       := ARP_GLOBAL.USER_ID;
Line: 4367

   arp_notes_pkg.insert_cover(
        p_note_type              => x_note_type,
        p_text                   => x_text,
        p_customer_call_id       => null,
        p_customer_call_topic_id => null,
        p_call_action_id         => NULL,
        p_customer_trx_id        => x_customer_trx_id,
        p_note_id                => x_note_id,
        p_last_updated_by        => l_last_updated_by,
        p_last_update_date       => l_last_update_date,
        p_last_update_login      => l_last_update_login,
        p_created_by             => l_created_by,
        p_creation_date          => l_creation_date);
Line: 4385

      wf_core.Context('ARP_CMREQ_WF', 'InsertTrxNotes',
                      null, null, null, l_debug_mesg);
Line: 4389

END InsertTrxNotes;
Line: 4413

l_last_updated_by     number;
Line: 4414

l_last_update_login   number;
Line: 4427

  l_last_updated_by := ARP_GLOBAL.user_id;
Line: 4428

  l_last_update_login := ARP_GLOBAL.last_update_login ;
Line: 4508

        select cm_customer_trx_id
        into l_credit_memo_id
        from ra_cm_requests
        where request_id = l_request_id;
Line: 4529

        /* Bug 1908252 : update last_update* fields */
        update ra_cm_requests
        set status='COMPLETE',
            approval_date = SYSDATE,
            last_updated_by = l_last_updated_by,
            last_update_date = SYSDATE,
            last_update_login = l_last_update_login
        where request_id = p_item_key;
Line: 4541

          select trx_number
          into l_credit_memo_number
	  from   ra_customer_trx
	  where  customer_trx_id = l_credit_memo_id;
Line: 4573

        /* Bug 1908252 : update last_update* fields */
        update ra_cm_requests
        set status='APPROVED_PEND_COMP',
            approval_date = SYSDATE,
            last_updated_by = l_last_updated_by,
            last_update_date = SYSDATE,
            last_update_login = l_last_update_login
        where request_id = p_item_key;
Line: 4676

     SELECT COUNT(*) INTO l_count
     FROM ra_terms_lines
     WHERE term_id = (SELECT term_id FROM ra_customer_trx
		      WHERE customer_trx_id = l_customer_trx_id);
Line: 4698

     SELECT invoicing_rule_id INTO l_invoicing_rule_id
     FROM   ra_customer_trx
     WHERE  customer_trx_id = l_customer_trx_id;
Line: 4774

   select org_id into l_org_id
   from ra_cm_requests_all
   where request_id = p_item_key;