DBA Data[Home] [Help]

APPS.AME_UPDATE_USERNAME_PKG SQL Statements

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

Line: 10

    select ame_exceptions_log_s.nextval
      into l_log_id
      from dual;
Line: 14

    insert into ame_exceptions_log
      (log_id,package_name,routine_name,transaction_id,application_id,exception_number,exception_string)
     values
      (l_log_id,'ame_update_username_pkg','update_username','','',p_errorcode,to_char(sysdate, 'YYYY:MM:DD:HH24:MI:SS')|| p_message);
Line: 21

  procedure update_username
    (itemtype    in            varchar2
    ,itemkey     in            varchar2
    ,actid       in            number
    ,funcmode    in            varchar2
    ,resultout   in out nocopy varchar2
    ) as

    l_event_key varchar2(650);
Line: 68

        update ame_config_vars acv
           set acv.variable_value = l_new_name
         where acv.variable_value = l_old_name
           and acv.variable_name = 'adminApprover';
Line: 87

        update ame_approval_group_items aagi
           set aagi.parameter = l_new_name
         where aagi.parameter = l_old_name
           and aagi.parameter_name = 'wf_roles_name';
Line: 106

        update ame_approval_group_members aagm
           set aagm.parameter = l_new_name
         where aagm.parameter = l_old_name
           and aagm.parameter_name = 'wf_roles_name';
Line: 125

        update ame_conditions ac
           set ac.parameter_two = l_new_name
         where ac.parameter_two = l_old_name
           and ac.attribute_id = 0;
Line: 144

        update ame_actions aa
           set aa.parameter = l_new_name,
               aa.description = replace(aa.description,l_old_name,l_new_name)
         where aa.parameter = l_old_name
           and exists (select aat.action_type_id
                         from ame_action_types aat
                        where aat.action_type_id = aa.action_type_id
                          and aat.name = 'substitution');
Line: 167

        update ame_temp_old_approver_lists atoal
           set atoal.name = l_new_name
         where atoal.name = l_old_name;
Line: 183

      log_message('Migrating name field in ame_temp_insertions');
Line: 185

        update ame_temp_insertions ati
           set ati.name = l_new_name
         where ati.name = l_old_name;
Line: 203

        update ame_temp_deletions atd
           set atd.name = l_new_name
         where atd.name = l_old_name;
Line: 219

      log_message('Migrating parameter field in ame_temp_insertions');
Line: 221

        update ame_temp_insertions ati
           set ati.parameter = l_new_name ||
                               substrb(ati.parameter
                                      ,instrb(ati.parameter
                                             ,fnd_global.local_chr(11)
                                             ,1
                                             ,1)
                                      ,(lengthb(ati.parameter) - instrb(ati.parameter
                                                                       ,fnd_global.local_chr(11)
                                                                       ,1
                                                                       ,1) + 1))
         where ati.order_type in ('before approver','after approver')
           and instrb(ati.parameter,l_old_name,1,1) = 1;
Line: 247

      log_message('Migrating description field in ame_temp_insertions');
Line: 249

        update ame_temp_insertions ati
           set ati.description = decode(order_type
                                       ,'after_approver'
                                       ,'Always put the new approver right after the following approver:  ' || l_new_name
                                       ,'Always put the new approver right before the following approver:  ' || l_new_name)
         where ati.order_type in ('before approver','after approver')
           and exists (select aca.application_id
                         from ame_calling_apps aca
                        where aca.application_id = ati.application_id)
           and instrb(ati.parameter,l_new_name,1,1) = 1
           and exists (select wr.name
                         from wf_roles wr
                        where wr.name = l_new_name
                          and wr.orig_system = 'FND_USR');
Line: 278

        update ame_trans_approval_history atah
           set atah.name = l_new_name
         where atah.name = l_old_name;
Line: 297

      select variable_value
        into admin_approver
        from ame_config_vars
       where sysdate between start_date and nvl(end_date - (1/86400),sysdate)
         and variable_name = 'adminApprover'
         and (application_id is null or application_id = 0)
         and rownum < 2;
Line: 331

        select variable_value
          into admin_approver
          from ame_config_vars
         where sysdate between start_date and nvl(end_date - (1/86400),sysdate)
           and variable_name = 'adminApprover'
           and (application_id is null or application_id = 0)
           and rownum < 2;
Line: 356

  end update_username;