The following lines contain the word 'select', 'insert', 'update' or 'delete':
select error_type, message
from ZPB_BUSAREA_VALIDATIONS;
select business_area_id into l_business_area_id
from zpb_analysis_cycles
where analysis_cycle_id = (select analysis_cycle_id
from zpb_analysis_cycle_tasks where task_id = TaskId);
select VERSION_ID into l_version_id
from ZPB_BUSAREA_VERSIONS
where VERSION_TYPE = 'P' and BUSINESS_AREA_ID = l_business_area_id;
delete wf_local_roles
where name = roleName;
select count(name)
into lcount
from wf_roles
where name = rolename;
select APPLICATION_ID
into appID
from FND_APPLICATION
where APPLICATION_SHORT_NAME = 'ZPB';
select RESPONSIBILITY_ID
into respID
from fnd_responsibility_vl
where APPLICATION_ID = appID and RESPONSIBILITY_KEY = RespKey;
select NAME, value
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID;
select C.USER_NAME
from FND_RESPONSIBILITY A,
ZPB_ACCOUNT_STATES B,
FND_USER C
where B.BUSINESS_AREA_ID = l_business_area_id AND
A.RESPONSIBILITY_ID = B.RESP_ID AND
A.RESPONSIBILITY_KEY = 'ZPB_SUPER_CONTROLLER_RESP' AND
C.USER_ID = B.USER_ID ;
select C.USER_NAME
from FND_RESPONSIBILITY A,
ZPB_ACCOUNT_STATES B,
FND_USER C
where A.RESPONSIBILITY_ID = B.RESP_ID AND
A.RESPONSIBILITY_KEY = 'ZPB_CONTROLLER_RESP' AND
C.USER_ID = B.USER_ID ;
select C.USER_NAME
from zpb_analysis_cycles A,
FND_USER C
where analysis_cycle_id = ACID AND
C.USER_ID = A.OWNER_ID ;
SELECT ACTIVITY_NAME, PROCESS_NAME INTO ActEntry, workflowprocess
FROM WF_PROCESS_ACTIVITIES
WHERE INSTANCE_ID=actid;
select business_area_id into l_business_area_id from
zpb_analysis_cycles where analysis_cycle_id = (select analysis_cycle_id
from zpb_analysis_cycle_tasks where task_id = TaskId) ;
select INSTANCE_DESCRIPTION
into InstDesc
from ZPB_ANALYSIS_CYCLE_INSTANCES
where INSTANCE_AC_ID = InstanceID;
select value into l_authorIDT
from zpb_task_parameters
where task_id = TaskID and name = 'OWNER_ID';
update ZPB_ANALYSIS_CYCLES
set prev_status_code = status_code
where ANALYSIS_CYCLE_ID = InstanceID;
-- then update status_code to PAUSED
update ZPB_ANALYSIS_CYCLES
set status_code = 'PAUSED'
where ANALYSIS_CYCLE_ID = InstanceID;
update ZPB_ANALYSIS_CYCLE_TASKS
set status_code = 'COMPLETE'
where TASK_ID = TaskID;
select user_name
from wf_user_roles
where role_name = fndResp;
select distinct user_name
from wf_user_roles
where ROLE_ORIG_SYSTEM = fndResp;
select distinct v.analysis_cycle_id thisACID, v.name thisACName,
u.user_name thisUser
from zpb_all_cycles_v v, zpb_process_details_v pro, fnd_user u
where v.analysis_cycle_id in (select pa.analysis_cycle_id from zpb_ac_param_values pa
where pa.param_id = 20 and pa.value in(select d.value from ZPB_PROCESS_DETAILS_V d
where d.name = 'CREATE_EVENT_IDENTIFIER' and d.task_id = TaskID))
and v.last_updated_by = u.user_id;
select task_name into TaskName
from zpb_process_details_v
where task_id = TaskID and name = 'CREATE_EVENT_IDENTIFIER';
procedure NOTIFY_ON_DELETE (numericID in number,
IDType in Varchar2 default 'TASK')
IS
retval varchar2(30);
select TASK_ID, TASK_NAME
from ZPB_PROCESS_DETAILS_V
where ANALYSIS_CYCLE_ID = numericID AND
name = 'CREATE_EVENT_IDENTIFIER';
end NOTIFY_ON_DELETE;
select NAME, value
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'SPECIFIED_NOTIFICATION_RECIPIENT';
select name, value
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'NOTIFICATION_RECIPIENT_TYPE';
select count(*)
into cCount
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'SPECIFIED_NOTIFICATION_RECIPIENT';
select distinct display_name
into NewDispName
from wf_users
where name = thisRecipient;
select distinct display_name
into NewDispName
from wf_users
where name = thisOwner;
select distinct user_name
from wf_user_roles
where ROLE_ORIG_SYSTEM = fndResp;
| FUNCTION update_Role_with_Shadows
|
| DESCRIPTION
| Updates the role with shadow users(if any) of the present user.
| and returns the same.
|
+=========================================================================*/
function update_Role_with_Shadows (roleName varchar2, thisUser in varchar2 ) return varchar2
AS
thisUserID number;
select user_name into fndUser
from fnd_user
where user_id = userID;
select user_id into userID
from fnd_user
where user_name = fndUser;
select shadow_id
from zpb_shadow_users
where user_id = UserId and privilege_lookup in ('FULLACCESS', 'NOTIFICATIONSONLY');
select user_name
from wf_user_roles
where role_name = rolename and user_name = UserName;
select shadow_id
from zpb_shadow_users
where user_id = UserId and privilege_lookup in ('FULLACCESS', 'NOTIFICATIONSONLY');
select distinct display_name
into NewDispName
from wf_users
where name = curUser;
| FUNCTION update_Role_with_Shadows
|
| DESCRIPTION
| To be used when the EPBPrerformer Attrubute is a single user and not
| a list of users or if BP owner ID is passed in. When called this will
| set any shadow users the EPBPerformer may have so notifications will be
| sent to shadows also.
|
| Parameters: itemtype - usually EPBCYCLE will work for other ITEMTYPES that have
| WF attributes TASKID, INSTANCEID OWNERID and EPBPERFORMER.
| itemkey - for the currently running WF EPB process
| actid - 0 if not called directly by WF
| functmode - RUN when called directly by WF or
| EPBPERFORMER or EPB_BPOWNERID if called from procedure
| and not from WF directly.
+=========================================================================*/
procedure SHADOWS_FOR_EPBPERFORMER (itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out nocopy varchar2)
IS
l_thisUserID NUMBER;
select distinct display_name
into l_NewDispName
from wf_users
where name = l_thisRecipient;
SELECT count(user_name) into l_count
FROM ZPB_WF_INACTIVE_USERS_GT;
select t.task_name, ac.business_area_id, v.name, i.INSTANCE_DESCRIPTION, t.ANALYSIS_CYCLE_ID
into l_taskName, l_BAID, l_BA_name, l_BP_runName, l_BP_runID
from zpb_analysis_cycles ac, zpb_analysis_cycle_tasks t,
ZPB_BUSINESS_AREAS_VL v, zpb_analysis_cycle_instances i
where t.task_id = l_taskID
and t.ANALYSIS_CYCLE_ID = ac.ANALYSIS_CYCLE_ID
and ac.ANALYSIS_CYCLE_ID = i.INSTANCE_AC_ID
and ac.business_area_id = v.business_area_id;
select distinct display_name
into l_NewDispName
from wf_users
where name = l_thisRecipient;
select RESPONSIBILITY_ID, RESPONSIBILITY_NAME
into l_respID, l_respDisplay
from fnd_responsibility_vl
where application_id = 210 and
RESPONSIBILITY_KEY = 'ZPB_MANAGER_RESP';
select USER_ID from zpb_account_states
where RESP_ID = p_respID AND ACCOUNT_STATUS = 0 AND BUSINESS_AREA_ID = p_BAID;
select distinct(user_name) from ZPB_WF_INACTIVE_USERS_GT;
SELECT SUM(LENGTH(user_name)) into l_fulllength
FROM ZPB_WF_INACTIVE_USERS_GT;