DBA Data[Home] [Help]

APPS.FND_USER_RESP_GROUPS_API SQL Statements

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

Line: 116

  select security_group_key
    into secgrpkey
    from fnd_security_groups
   where security_group_id = x_secgrp_id;
Line: 121

  select application_short_name
    into appsname
    from fnd_application
   where application_id = x_resp_appl_id;
Line: 126

  select responsibility_key
    into respkey
    from fnd_responsibility
   where application_id = x_resp_appl_id
     and responsibility_id = x_resp_id;
Line: 138

/* like inline inside a SQL select statement */
function Role_Name_from_Resp_No_Exc(
  x_resp_id in number,
  x_resp_appl_id in number,
  x_secgrp_id in number)
 return varchar2 is
begin

  return fnd_user_resp_groups_api.Role_Name_from_Resp(
    x_resp_id,
    x_resp_appl_id,
    x_secgrp_id);
Line: 199

     select null
       into dummy
       from wf_all_user_roles
      where user_name = username
        and role_name = rolename
        and rownum = 1;
Line: 215

     select null
       into dummy
       from wf_all_user_roles
      where user_name = username
        and role_name = rolename
        and direct_flag = 'D'
        and rownum = 1;
Line: 232

     select null
       into dummy
       from wf_all_user_roles
      where user_name = username
        and role_name = rolename
        and direct_flag = 'I'
        and rownum = 1;
Line: 298

    select user_name
      into username
      from fnd_user
     where user_id = assignment_exists.user_id;
Line: 351

  select 'Y'
  into x_status
  from dual
  where exists
   (select null
    from fnd_user u,
         fnd_user_resp_groups urg,
         fnd_responsibility r
    where u.user_id = p_user_id
    and sysdate between u.start_date and nvl(u.end_date, sysdate)
    and urg.user_id = u.user_id
    and urg.responsibility_application_id = p_resp_appl_id
    and urg.responsibility_id = p_responsibility_id
    and urg.security_group_id in (-1, p_security_group_id)
/*NOT NEEDED: and sysdate between urg.start_date and nvl(urg.end_date,sysdate)*/
    and r.application_id = urg.responsibility_application_id
    and r.responsibility_id = urg.responsibility_id
    and sysdate between r.start_date and nvl(r.end_date, sysdate));
Line: 397

   select start_date,
          end_date
     from wf_all_user_role_assignments    --BUG5467610
    where user_name = user
      and role_name = role
      and rownum = 1
      for update of start_date nowait;
Line: 409

  select user_name
    into username
    from fnd_user
   where user_id = x_user_id;
Line: 422

    fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
Line: 454

procedure Insert_Assignment(
  user_id in number,
  responsibility_id in number,
  responsibility_application_id in number,
  security_group_id in number,
  start_date in date,
  end_date in date,
  description in varchar2)
is
 sgid number;
Line: 492

  select user_name
    into username
    from fnd_user
   where user_id = Insert_assignment.user_id;
Line: 498

  select application_short_name
    into appsname
    from fnd_application
   where application_id = responsibility_application_id;
Line: 505

  /* we can't insert a duplicate. */
  result := assignment_check(username, rolename, 'D');
Line: 508

    fnd_message.set_name('FND', 'FND_CANT_INSERT_USER_ROLE');
Line: 512

                           'FND_USER_RESP_GROUPS_API.Insert_Assignment');
Line: 549

                              p_lastUpdatedBy => fnd_global.user_id,
                              p_lastUpdateLogin => 0,
                              p_creationDate => sysdate, /*Bug3626390 sysdate*/
                              p_lastUpdatedate=> sysdate,
                              p_assignmentReason=>description);
Line: 574

                              p_lastUpdatedBy => fnd_global.user_id,
                              p_lastUpdateLogin => 0,
                              p_creationDate => sysdate, /*Bug3626390 sysdate*/
                              p_lastUpdatedate=> sysdate,
                              p_assignmentReason=>description);
Line: 581

                   Insert_Assignment.user_id||':'||
                             Insert_Assignment.responsibility_id,
                   null, null);
Line: 587

                             p_value         => Insert_Assignment.user_id,
                             p_parameterlist => l_parameters);
Line: 591

                             p_value         => Insert_Assignment.responsibility_id,
                             p_parameterlist => l_parameters);
Line: 599

                             p_value         => Insert_Assignment.responsibility_application_id,
                             p_parameterlist => l_parameters);
Line: 602

 wf_event.raise(p_event_name => 'oracle.apps.fnd.user.role.insert',
                p_event_key  => to_char(Insert_Assignment.user_id)||':'||to_char(Insert_Assignment.responsibility_id)||':'||appsname||':'||to_char(Insert_Assignment.responsibility_application_id),
                  p_event_data => NULL,
                  p_parameters => l_parameters,
                  p_send_date  => Sysdate);
Line: 610

    Generic_Error('FND_USER_RESP_GROUPS_API.INSERT_ASSIGNMENT',
        sqlcode, sqlerrm);
Line: 612

end Insert_Assignment;
Line: 633

procedure Update_Assignment(
  user_id in number,
  responsibility_id in number,
  responsibility_application_id in number,
  security_group_id in number,
  start_date in date,
  end_date in date,
  description in varchar2,
  update_who_columns in varchar2 default null
     /* 'N' = leave old who vals.  'Y' (default) = update who to current*/)
is
  sgid number;
Line: 655

  l_last_update_date date;
Line: 656

  l_last_updated_by number;
Line: 657

  l_last_update_login number;
Line: 660

  l_update_who boolean;  --Bug5467610
Line: 680

  select user_name
    into username
    from fnd_user
   where user_id = Update_assignment.user_id;
Line: 686

  select application_short_name
    into appsname
    from fnd_application
   where application_id = responsibility_application_id;
Line: 692

  /* Check whether there already is a direct row to update; if not, */
Line: 694

  /* update it which is not allowed. */
  result := assignment_check(username, rolename,'D');
Line: 697

    fnd_message.set_name('FND', 'FND_CANT_UPDATE_USER_ROLE');
Line: 701

                           'FND_USER_RESP_GROUPS_API.Update_Assignment');
Line: 743

  /* If we passed the flag saying to update the who columns */
  /* then we set the last_update who columns to current user/date. */
  if (update_who_columns = 'Y') then
     l_last_updated_by :=  fnd_global.user_id;
Line: 747

     l_last_update_login :=  0;
Line: 748

     l_last_update_date := sysdate;
Line: 749

     l_update_who := TRUE;     -- Bug5467610 update who columns.
Line: 772

                              p_lastUpdatedate=> l_last_update_date,
                              p_lastUpdatedBy => l_last_updated_by,
                              p_lastUpdateLogin => l_last_update_login,
                              p_assignmentReason=>description,
                              p_updatewho => l_update_who); -- Bug5467610
Line: 798

                              p_lastUpdatedate=> l_last_update_date,
   			      p_lastUpdatedBy => l_last_updated_by,
                              p_lastUpdateLogin => l_last_update_login,
                              p_assignmentReason=>description,
                              p_updatewho => l_update_who); -- Bug5467610
Line: 806

                   Update_Assignment.user_id||':'||
                             Update_Assignment.responsibility_id,
                   null, null);
Line: 818

                             p_value         => Update_Assignment.user_id,
                             p_parameterlist => l_parameters);
Line: 822

                             p_value         => Update_Assignment.responsibility_id,
                             p_parameterlist => l_parameters);
Line: 830

                             p_value         => Update_Assignment.responsibility_application_id,
                             p_parameterlist => l_parameters);
Line: 833

 wf_event.raise(p_event_name => 'oracle.apps.fnd.user.role.update',
                p_event_key  => to_char(Update_Assignment.user_id)||':'||to_char(Update_Assignment.responsibility_id)||':'||appsname||':'||to_char(Update_Assignment.responsibility_application_id),
                  p_event_data => NULL,
                  p_parameters => l_parameters,
                  p_send_date  => Sysdate);
Line: 841

    Generic_Error('FND_USER_RESP_GROUPS_API.UPDATE_ASSIGNMENT',
        sqlcode, sqlerrm);
Line: 844

end Update_Assignment;
Line: 855

  X_LAST_UPDATE_DATE    in      DATE default sysdate) is
    u_id      number;
Line: 868

  select user_id into u_id
  from   fnd_user
  where  user_name = X_USER_NAME;
Line: 872

  select application_id into app_id
  from   fnd_application
  where  application_short_name = X_APP_SHORT_NAME;
Line: 876

  select responsibility_id into resp_id
  from   fnd_responsibility
  where  responsibility_key = X_RESP_KEY
  and    application_id = app_id;
Line: 881

  select security_group_id into sgroup_id
  from   fnd_security_groups
  where  security_group_key = X_SECURITY_GROUP;
Line: 885

  select decode(X_END_DATE,
                fnd_load_util.null_value, null,
                null, X_END_DATE,
                X_END_DATE)
  into l_end_date
  from dual;
Line: 945

                           p_lastUpdatedate=> x_last_update_date,
                           p_lastUpdatedBy => l_owner,
                           p_lastUpdateLogin => 0,
                           p_assignmentReason=>X_DESCRIPTION);
Line: 970

                           p_lastUpdatedBy => l_owner,
                           p_lastUpdateLogin => 0,
                           p_creationDate => sysdate, /*Bug3626390 sysdate*/
                           p_lastUpdatedate=> x_last_update_date,
                           p_assignmentReason=>X_DESCRIPTION);
Line: 1002

  update_who_columns in varchar2 default null
     /* 'N' = leave old who vals.  'Y' (default) = update who to current*/)
is
  sgid number;
Line: 1021

    Fnd_User_Resp_Groups_Api.Update_Assignment(
      Upload_Assignment.user_id,
      Upload_Assignment.responsibility_id,
      Upload_Assignment.responsibility_application_id,
      Upload_Assignment.sgid,
      Upload_Assignment.start_date,
      Upload_Assignment.end_date,
      Upload_Assignment.description,
      update_who_columns);
Line: 1031

    Fnd_User_Resp_Groups_Api.Insert_Assignment(
      Upload_Assignment.user_id,
      Upload_Assignment.responsibility_id,
      Upload_Assignment.responsibility_application_id,
      Upload_Assignment.sgid,
      Upload_Assignment.start_date,
      Upload_Assignment.end_date,
      Upload_Assignment.description);
Line: 1073

  my_lastupdatedate date;
Line: 1075

  my_lastupdatedby number;
Line: 1076

  my_lastupdatelogin number;
Line: 1090

      select responsibility_key
        into l_respkey
        from fnd_responsibility
       where responsibility_id = respid
         and application_id = appid;
Line: 1106

      select security_group_key
        into l_secgrpkey
        from fnd_security_groups
       where security_group_id = secgrpid;
Line: 1120

    select application_short_name
      into applsname
      from fnd_application
     where application_id = appid;
Line: 1138

    select responsibility_name, description
      into resp_name, descr
      from fnd_responsibility_tl
     where responsibility_id = respid
       and application_id = appid
       and language = (select language_code
                         from fnd_languages
                        where installed_flag = 'B');
Line: 1154

  /* Don't need the name for STANDARD, so skip the select */
  if (secgrpid <> 0) then
    begin
      select security_group_name
        into secgrp_name
        from fnd_security_groups_tl
        where security_group_id = secgrpid
        and language = (select language_code
                           from fnd_languages
                          where installed_flag = 'B');
Line: 1177

    select start_date, end_date,
           created_by, creation_date,
           last_updated_by, last_update_date, last_update_login
     into   my_start, my_exp, my_createdby, my_creationdate,
            my_lastupdatedby, my_lastupdatedate, my_lastupdatelogin
     from   fnd_responsibility
     where responsibility_id = respid
     and application_id = appid;
Line: 1224

  wf_event.AddParameterToList('LAST_UPDATED_BY',my_lastupdatedby,wf_parameters);
Line: 1228

  wf_event.AddParameterToList('LAST_UPDATE_DATE',
                              to_char(my_lastupdatedate,WF_CORE.canonical_date_mask),wf_parameters);
Line: 1235

  wf_event.AddParameterToList('LAST_UPDATE_LOGIN',
                              my_lastupdatelogin,wf_parameters);
Line: 1276

  wf_event.AddParameterToList('LAST_UPDATED_BY',my_lastupdatedby,wf_parameters);
Line: 1280

  wf_event.AddParameterToList('LAST_UPDATE_DATE',
                              to_char(my_lastupdatedate,WF_CORE.canonical_date_mask), wf_parameters);
Line: 1284

  wf_event.AddParameterToList('LAST_UPDATE_LOGIN',
                              my_lastupdatelogin, wf_parameters);
Line: 1310

                select  security_group_id,
                        security_group_key
                  from  fnd_security_groups;
Line: 1353

                select  application_id,
                        responsibility_id,
                        responsibility_key,
                        start_date,
                        end_date
                  from  fnd_responsibility;
Line: 1391

                select  application_id,
                        responsibility_id,
                        responsibility_key,
                        start_date,
                        end_date
                  from  fnd_responsibility;
Line: 1446

                select   fu.user_name,
                         secgrp.security_group_key,
                         app.application_short_name,
                         resp.responsibility_key,
                         resp.start_date resp_start_date,
                         resp.end_date resp_end_date,
                         furgo.user_id,
                         furgo.responsibility_id,
                         furgo.responsibility_application_id,
                         furgo.start_date,
                         furgo.end_date,
                         furgo.security_group_id,
                         furgo.created_by,
                         furgo.creation_date,
                         furgo.last_updated_by,
                         furgo.last_update_date,
                         furgo.last_update_login
                    from fnd_user_resp_groups_old furgo,
                         fnd_user fu,
                         fnd_application app,
                         fnd_responsibility resp,
                         fnd_security_groups secgrp
                   where furgo.user_id = fu.user_id
                     and furgo.responsibility_id = resp.responsibility_id
                     and furgo.responsibility_application_id
                           = resp.application_id
                     and furgo.responsibility_application_id
                           = app.application_id
                     and furgo.security_group_id = secgrp.security_group_id;
Line: 1506

    select name
      into dummy
      from wf_local_roles partition (FND_RESP)
     where name = rolename
       and rownum = 1;
Line: 1529

    select role_name
      into dummy
      from wf_all_user_roles waur
     where waur.role_name = rolename
       and waur.user_name = rowrec.user_name
       and (   (waur.start_date = rowrec.start_date)
            OR((waur.start_date is NULL) AND (rowrec.start_date is NULL)))
       and (   (waur.expiration_date = rowrec.end_date)
            OR((waur.expiration_date is NULL) AND(rowrec.end_date is NULL)));
Line: 1541

            'USER_ROLE FOUND. Not inserting.');
Line: 1548

             'USER_ROLE Not FOUND. Need to insert');
Line: 1598

                           p_lastUpdatedBy => fnd_global.user_id,
                           p_lastUpdateLogin => 0,
                           p_creationDate => sysdate,
                           p_lastUpdatedate=> sysdate);
Line: 1656

                select  security_group_id,
                        security_group_key
                  from  fnd_security_groups;
Line: 1684

      select null
        into dummy
        from wf_local_roles
        where name = rolename
        and partition_id = 2
        and rownum = 1;