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

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

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

         SELECT employee_id
         FROM fnd_user
         WHERE user_id = user_id1;
Line: 450

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

/*   select employee_id
   into p_requestor_id
   from fnd_user
   where user_id = l_created_by;
Line: 561

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 END SelectFirstPrimaryApproverId;
Line: 1885

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

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

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

 END SelectPrimaryApproverId;
Line: 2067

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

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

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

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

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

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

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

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

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

      SELECT terms_sequence_number,payment_schedule_id , due_date , dispute_date , amount_in_dispute , amount_due_remaining
        FROM ar_payment_schedules ps
        WHERE ps.customer_trx_id = p_customer_trx_id
	AND   NVL(ps.amount_in_dispute,0) <> 0 		/*12998583-M1*/
        ORDER BY terms_sequence_number desc;
Line: 2953

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

                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_amount_in_dispute=> ps_rec.amount_in_dispute,   /*12998583*/
	              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: 3016

                arp_process_cutil.update_ps
                     (p_ps_id=> ps_rec.payment_schedule_id,
	              p_due_date=> ps_rec.due_date,
	              p_amount_in_dispute=> NULL ,
	              p_dispute_date=> NULL,
                      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: 3153

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

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

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

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

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

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

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

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

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

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

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

end InsertSubmissionNotes;
Line: 3466

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

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

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

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

end InsertApprovalReminderNotes;
Line: 3571

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

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

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

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

end InsertEscalationNotes;
Line: 3670

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

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

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

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

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

end InsertRequestManualNotes;
Line: 3772

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

 l_last_updated_by     number;
Line: 3789

 l_last_update_login   number;
Line: 3800

  l_last_updated_by   := ARP_GLOBAL.user_id;
Line: 3801

  l_last_update_login := ARP_GLOBAL.last_update_login ;
Line: 3804

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

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

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

     /* 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: 3891

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

end InsertCompletedManualNotes;
Line: 3898

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

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

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

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

end InsertRequestApprovalNotes;
Line: 3996

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

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

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

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

end InsertApprovedResponseNotes;
Line: 4096

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

 l_last_updated_by     number;
Line: 4112

 l_last_update_login   number;
Line: 4123

  l_last_updated_by := ARP_GLOBAL.user_id;
Line: 4124

  l_last_update_login := ARP_GLOBAL.last_update_login ;
Line: 4127

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

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

     /* 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: 4212

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

end InsertRejectedResponseNotes;
Line: 4220

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

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

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


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

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

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

end InsertSuccessfulAPINotes;
Line: 4320

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

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

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

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

end InsertNotes;
Line: 4439

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

l_last_updated_by     number;
Line: 4449

l_last_update_date    date;
Line: 4450

l_last_update_login   number;
Line: 4456

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

      l_last_update_login     := ARP_GLOBAL.last_update_login ;
Line: 4471

      l_last_update_date      := sysdate;
Line: 4472

      l_last_updated_by       := ARP_GLOBAL.USER_ID;
Line: 4474

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

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

END InsertTrxNotes;
Line: 4520

l_last_updated_by     number;
Line: 4521

l_last_update_login   number;
Line: 4527

SELECT ra.receivable_application_id,
       ra.customer_trx_id,
       ct.trx_number
from ar_receivable_applications ra, ra_customer_trx ct
where ra.posting_control_id=-3
and ra.application_type = 'CM'
and ra.customer_trx_id=p_customer_trx_id
and ra.event_id is null
and ra.customer_trx_id = ct.customer_trx_id;
Line: 4549

  l_last_updated_by := ARP_GLOBAL.user_id;
Line: 4550

  l_last_update_login := ARP_GLOBAL.last_update_login ;
Line: 4630

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

        /* 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: 4677

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

        /* 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: 4812

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

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

   select org_id into l_org_id
   from ra_cm_requests_all
   where request_id = p_item_key;