The following lines contain the word 'select', 'insert', 'update' or 'delete':
select application_id
from fnd_responsibility
where responsibility_id=pRespId;
select application_id into l_application_id
from fnd_responsibility
where responsibility_id=l_fn_responsibility_id;
select function_id
into l_customize_id
from fnd_form_functions
where function_name = l_form_func_name;
select FND_FORM_FUNCTIONS_S.NEXTVAL into l_customize_id from dual;
fnd_form_functions_pkg.INSERT_ROW(
X_ROWID => l_rowid,
X_FUNCTION_ID => l_customize_id,
X_WEB_HOST_NAME => null,
X_WEB_AGENT_NAME => null,
X_WEB_HTML_CALL => l_form_func_call,
X_WEB_ENCRYPT_PARAMETERS => null,
X_WEB_SECURED => null,
X_WEB_ICON => null,
X_OBJECT_ID => null,
X_REGION_APPLICATION_ID => null,
X_REGION_CODE => null,
X_FUNCTION_NAME => l_form_func_name,
X_APPLICATION_ID => l_application_id,
X_FORM_ID => null,
X_PARAMETERS => null,
X_TYPE => 'JSP',
X_USER_FUNCTION_NAME => 'BIS SCHEDULE',
X_DESCRIPTION => null,
X_CREATION_DATE => sysdate,
X_CREATED_BY => l_user_id,
X_LAST_UPDATE_DATE => sysdate,
X_LAST_UPDATED_BY => l_user_id,
X_LAST_UPDATE_LOGIN => l_user_id);
fnd_form_functions_pkg.insert_row (l_rowid,
l_customize_id, null,null,
l_form_func_call,
null,null,null,l_form_func_name,
l_application_id,null,null,'JSP','BIS SCHEDULE',
null,sysdate,l_user_id,sysdate,l_user_id,l_user_id);
procedure deleteReportGraphsLobs(p_user_id in varchar2
,p_schedule_id in varchar2
,p_function_name in varchar2);
delete_portlet(p_plug_id, p_user_id);
SELECT bis_scheduler_s.nextval INTO l_schedule_id FROM dual;
INSERT INTO BIS_SCHEDULER
(schedule_id
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
--,plug_id
,user_id
,function_name
,responsibility_id
-- ,title
-- ,graph_type
,concurrent_request_id
-- ,file_id
,creation_Date
,last_update_date
,created_By
,last_update_login
)
VALUES
(l_schedule_id
-- ,p_plug_id
,p_user_id
,p_function_name
,p_responsibility_id
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
-- ,p_title
-- ,p_graph_type
,p_concurrent_request_id
-- ,get_file_id(l_Request_Type)
,SYSDATE
,SYSDATE
,0
,0
);
delete_portlet(p_plug_id, p_user_id);
SELECT bis_scheduler_s.nextval INTO l_schedule_id FROM dual;
INSERT INTO BIS_SCHEDULER
(schedule_id
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
-- ,plug_id
,user_id
,function_name
,responsibility_id
-- ,title
-- ,graph_type
,concurrent_request_id
-- ,file_id
,creation_Date
,last_update_date
,created_By
,last_update_login
)
VALUES
(l_schedule_id
-- ,p_plug_id
,p_user_id
,p_function_name
,p_responsibility_id
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
-- ,p_title
-- ,p_graph_type
,NULL--current_request_id
-- ,get_File_id(l_request_Type)
,SYSDATE
,SYSDATE
,0
,0
);
UPDATE BIS_USER_ATTRIBUTES
SET schedule_id = l_schedule_id
WHERE session_id=p_Session_id AND
function_name = p_function_name AND
user_id = p_user_id AND
schedule_id is null;
insert into bis_user_attributes (USER_ID,
FUNCTION_NAME,
SESSION_ID,
SESSION_VALUE,
SESSION_DESCRIPTION,
DEFAULT_VALUE,
DEFAULT_DESCRIPTION,
ATTRIBUTE_NAME,
DIMENSION,
PERIOD_DATE)
select USER_ID,
FUNCTION_NAME,
SESSION_ID,
SESSION_VALUE,
SESSION_DESCRIPTION,
DEFAULT_VALUE,
DEFAULT_DESCRIPTION,
ATTRIBUTE_NAME,
DIMENSION,
PERIOD_DATE
from bis_user_attributes
where schedule_id = l_schedule_id;
SELECT bis_scheduler_s.nextval INTO l_schedule_id FROM dual;
INSERT INTO BIS_SCHEDULER
(schedule_id
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
--,plug_id
,user_id
,function_name
,responsibility_id
-- ,title
-- ,graph_type
,concurrent_request_id
-- ,file_id
,creation_Date
,last_update_date
,created_By
,last_update_login
)
VALUES
(l_schedule_id
-- ,p_plug_id
,p_user_id
,p_function_name
,p_responsibility_id
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
-- ,p_title
-- ,p_graph_type
,p_concurrent_request_id
-- ,get_file_id(l_Request_Type)
,SYSDATE
,SYSDATE
,0
,0
);
insert into bis_user_attributes (USER_ID,
FUNCTION_NAME,
SESSION_ID,
SESSION_VALUE,
SESSION_DESCRIPTION,
DEFAULT_VALUE,
DEFAULT_DESCRIPTION,
ATTRIBUTE_NAME,
DIMENSION,
PERIOD_DATE,
SCHEDULE_ID)
select USER_ID,
FUNCTION_NAME,
SESSION_ID,
SESSION_VALUE,
SESSION_DESCRIPTION,
DEFAULT_VALUE,
DEFAULT_DESCRIPTION,
ATTRIBUTE_NAME,
DIMENSION,
PERIOD_DATE,
l_schedule_id
from bis_user_attributes
WHERE session_id=p_Session_id AND
function_name = p_function_name AND
user_id = p_user_id AND
schedule_id is null;
PROCEDURE UPDATE_SCHEUDLE
(p_schedule_id IN NUMBER
,p_user_id IN VARCHAR2 DEFAULT NULL
,p_function_name IN VARCHAR2 DEFAULT NULL
,p_title IN VARCHAR2 DEFAULT NULL
,p_graph_type IN NUMBER DEFAULT NULL
,p_concurrent_Request_id IN NUMBER DEFAULT NULL
,p_file_id IN NUMBER DEFAULT NULL
,x_return_Status OUT NOCOPY VARCHAR2
,x_msg_data OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
-- mdamle 07/03/01 - Scheduling Enhancements
,p_parameters IN VARCHAR2 default null
)
IS
BEGIN
UPDATE BIS_SCHEDULER
SET user_id = p_user_id
,function_name = p_function_name
,title = p_title
,graph_type = p_graph_type
,concurrent_request_id=p_concurrent_request_id
,file_id = p_file_id
,last_update_date=SYSDATE
-- mdamle 07/03/01 - Scheduling Enhancements
,parameter_string = p_parameters
WHERE schedule_id=p_schedule_id;
PROCEDURE UPDATE_SCHEDULE
(p_schedule_id IN NUMBER
,p_concurrent_Request_id IN NUMBER
,x_return_Status OUT NOCOPY VARCHAR2
,x_msg_Data OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
-- mdamle 07/03/01 - Scheduling Enhancements
,p_parameters IN VARCHAR2 default null
,p_commit IN VARCHAR2 DEFAULT 'Y'
)
IS
BEGIN
-- mdamle 07/03/01 - Scheduling Enhancements
-- Added parameters field to update
UPDATE bis_scheduler
SET concurrent_request_id = p_concurrent_request_id
, parameter_string = p_parameters
WHERE schedule_id = p_schedule_id;
DELETE FROM bis_user_attributes
WHERE schedule_id = p_schedule_id
AND function_name = p_function_name;
UPDATE BIS_USER_ATTRIBUTES
SET schedule_id = p_schedule_id
WHERE session_id=p_Session_id AND
function_name = p_function_name AND
user_id = p_user_id AND
schedule_id is null;
SELECT attribute_name, session_value
FROM bis_user_attributes
WHERE user_id=p_user_id AND
function_name = p_function_name AND
schedule_id IS NOT NULL;
PROCEDURE UPDATE_LAST_UPDATE
(p_schedule_id IN NUMBER
,x_return_Status OUT NOCOPY VARCHAR2
,x_msg_Data OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
)
IS
BEGIN
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
UPDATE bis_schedule_preferences
SET last_update_date = SYSDATE
WHERE schedule_id = p_schedule_id;
select user_name
into vUserName
from fnd_user
where user_id = pUserId;
select count(1)
into vUserExists
from WF_LOCAL_USER_ROLES ur, fnd_user u
where u.user_id = pUserId
and ur.user_name = u.user_name
and role_name = pRole;
select nvl(attribute8, '')
into vSchedule
from ak_region_items
where region_code = pRegionCode
and attribute2 = pViewBy;
select nvl(attribute3, '')
into vSchedule
from ak_regions
where region_code = pRegionCode;
select application_id
from fnd_responsibility
where responsibility_id=pRespId;
select count(1)
into vUserExists
from bis_schedule_preferences
where schedule_id = vDupScheduleId
and user_id = pUserId
and nvl(plug_id, 0) = nvl(pPlugId, 0);
select function_id,web_html_call
into vPageFunctionId,lWebHtmlCall
from fnd_form_functions
where function_name = 'BIS_BU_SCHEDULE_PAGE';
select function_id,web_html_call
into vPageFunctionId,lWebHtmlCall
from fnd_form_functions
where function_name = 'BIS_AU_SCHEDULE_PAGE';
select function_id, web_html_call
into vPageFunctionId, lWebHtmlCall
from fnd_form_functions
where function_name = 'BIS_SCHEDULE_PAGE';
select to_char(max(requested_start_date), 'Mon DD, YYYY HH:MI AM')
into vLastRun
from fnd_concurrent_requests
where phase_code = 'C'
start with request_id = (select s.concurrent_request_id from bis_scheduler s where schedule_id = vDupScheduleId)
connect by prior request_id = parent_request_id;
select to_char(requested_start_date, 'Mon DD, YYYY HH:MI AM')
into vNextRun
from fnd_concurrent_requests
where phase_code IN ('P', 'R')
start with request_id = (select s.concurrent_request_id from bis_scheduler s where schedule_id = vDupScheduleId)
connect by prior request_id = parent_request_id;
select max(schedule_id)
into vScheduleId
from bis_scheduler s, fnd_concurrent_requests cr, fnd_conc_release_classes rc
where s.function_name = pFunctionName
and s.parameter_string = pParameters
and s.concurrent_request_id = cr.request_id
and cr.release_class_id = rc.release_class_id
and s.plug_id = pPlugId
and (rc.date2 is null or rc.date2 > sysdate)
and 0 < (select count(*)
from fnd_concurrent_requests
where phase_code = 'P'
start with request_id = cr.request_id
connect by prior request_id = parent_request_id);
select max(schedule_id)
into vScheduleId
from bis_scheduler s, fnd_concurrent_requests cr, fnd_conc_release_classes rc
where s.function_name = pFunctionName
and s.parameter_string = pParameters
and s.concurrent_request_id = cr.request_id
and cr.release_class_id = rc.release_class_id
and (rc.date2 is null or rc.date2 > sysdate)
and 0 < (select count(*)
from fnd_concurrent_requests
where phase_code = 'P'
start with request_id = cr.request_id
connect by prior request_id = parent_request_id);
select max(schedule_id)
into vScheduleId
from bis_scheduler s, fnd_concurrent_requests cr, fnd_conc_release_classes rc
where s.function_name = pFunctionName
-- mdamle 09/21/01 - Fixed Bug#1999262 - Added nvl
and nvl(s.parameter_string, ' ') = nvl(pParameters, ' ')
and s.concurrent_request_id = cr.request_id
and cr.release_class_id = rc.release_class_id
and (rc.date2 is null or rc.date2 > sysdate)
and 0 < (select count(*)
from fnd_concurrent_requests
where phase_code IN ('P', 'R')
start with request_id = cr.request_id
connect by prior request_id = parent_request_id);
select application_id
from fnd_responsibility
where responsibility_id=pRespId;
select count(*)
into vValidSchedule
from fnd_conc_release_classes rc
where rc.release_class_name = pSchedule
and (rc.date2 is null or rc.date2 > sysdate);
select function_id into vPageFunctionId
from fnd_form_functions
where function_name = 'BIS_INFORMATION_PAGE';
select file_id
into vFileId
from bis_schedule_preferences
where schedule_id = vScheduleId
and nvl(title, ' ') = nvl(vReportName, ' ')
and request_type = pRequestType
and nvl(graph_type, ' ') = nvl(pGraphType, ' ');
select application_id
into vApplicationId
from fnd_responsibility
where responsibility_id = pResponsibilityId;
-- Update the Schedule
if vRequestId > 0 then
update_schedule( vScheduleId
,vRequestId
,vReturnStatus
,vMsgData
,vMsgCount
,vParameters);
select function_id into vPageFunctionId
from fnd_form_functions
where function_name = 'BIS_CONFIRMATION_PAGE';
select session_value
from bis_user_attributes
where session_id = cpSessionId
and user_id = cpUserId
and function_name = cpFunctionName
and schedule_id is null
order by attribute_name;
select distinct file_id
from bis_schedule_preferences
where schedule_id = cpScheduleId
and user_id = vUserId
and nvl(plug_id, 0) = nvl(cpPlugID, 0);
select application_id
from fnd_responsibility
where responsibility_id=pRespId;
select user_name
into vUserName
from fnd_user
where user_id = vUserId;
select count(1)
into vUserExists
from WF_LOCAL_USER_ROLES
where user_name = vUserName
and role_name = vRoleName;
-- If no more subscribers to this file, then delete this role as well
select count(1)
into vUserExists
from WF_LOCAL_USER_ROLES
where role_name = vRoleName;
delete wf_local_roles
where name = gvRoleName||c1.file_id;
select distinct title
into vReportName
from bis_schedule_preferences
where schedule_id = pScheduleId
and file_id = c1.file_id;
delete_schedule_preferences(pScheduleId, vUserId, pPlugId);
select count(*) into vCount
from bis_schedule_preferences
where schedule_id = pScheduleId;
select function_name
into vFunctionName
from bis_scheduler
where schedule_id = pScheduleId;
delete fnd_lobs where file_id = vGraphFileId;
deleteReportGraphsLobs(vUserId,pScheduleId,vFunctionName);
delete_schedule(pScheduleId);
select function_id into vPageFunctionId
from fnd_form_functions
where function_name = 'BIS_CONFIRMATION_PAGE';
,pMode IN VARCHAR2 default 'UPDATE'
,pPlugId IN VARCHAR2 default NULL
,pParmPrint IN VARCHAR2 default NULL
,pSubscribedSchedule IN VARCHAR2 default NULL
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
,pGraphType IN VARCHAR2 default NULL
) IS
BEGIN
if pMode = 'SUBSCRIBE' then
subscribeToReport
(pRegionCode
,pFunctionName
,pResponsibilityId
,pApplicationId
,pSessionId
,pUserId
,pSchedule
,pRequestType
,pReportTitle
,pPlugId
-- mdamle 09/04/01 - Scheduling Enhancements - Phase II - Multiple Preferences per schedule
,pGraphType
) ;
procedure updateIncrementDate(p_concurrent_Request_id IN NUMBER) is
begin
update fnd_concurrent_requests
set increment_dates = 'Y'
where request_id = p_concurrent_request_id;
end updateIncrementDate;
procedure delete_schedule(
pScheduleId IN NUMBER) is
vRequestId number;
select concurrent_request_id
into vRequestId
from bis_scheduler
where schedule_id = pScheduleId;
-- Step 2 - Delete from BIS_USER_ATTRIBUTES
delete bis_user_attributes
where schedule_id = pScheduleId;
-- Step 3 - Delete from bis_schedule_preferences
delete_schedule_preferences(pScheduleId);
-- Step 4 - Delete from bis_scheduler
delete bis_scheduler
where schedule_id = pScheduleId;
end delete_schedule;
procedure delete_portlet(
pPlugId IN NUMBER
,pUserId IN NUMBER
-- jprabhud 09/24/02 - Enh 2470068 Storing of Graphs to FND_LOBS -- added xGraphFileId
,xGraphFileId OUT NOCOPY VARCHAR2) is
vCount number;
select distinct schedule_id, request_type
into vScheduleId, vRequestType
from bis_schedule_preferences
where user_id = pUserId
and plug_id = pPlugId;
select function_name
into vFunctionName
from bis_scheduler
where schedule_id = vScheduleId;
delete_schedule_preferences(vScheduleId, pUserId, pPlugId);
select count(*) into vCount
from bis_schedule_preferences
where schedule_id = vScheduleId;
delete_schedule(vScheduleId);
end delete_portlet;
procedure delete_old_portlet(
pPlugId IN NUMBER
,pUserId IN NUMBER
,pKeepLatest IN BOOLEAN default false) is
cursor cOldPortletSchedules (cpUserId varchar2, cpPlugId number) is
select schedule_id
from bis_scheduler
where user_id = cpUserId
and plug_id = cpPlugId
order by schedule_id desc;
delete_old_schedule(c1.schedule_id);
end delete_old_portlet;
procedure delete_old_schedule(
pScheduleId IN NUMBER) is
vRequestId number;
select concurrent_request_id, file_id
into vRequestId, vFileId
from bis_scheduler
where schedule_id = pScheduleId;
-- Step 2 - Delete all schedule files from FND_LOBS
delete fnd_lobs
where file_id = vFileId;
-- Step 3 - Delete from BIS_USER_ATTRIBUTES
delete bis_user_attributes
where schedule_id = pScheduleId;
-- Step 4 - Delete Role
delete wf_local_roles
where name = gvRoleName||pScheduleId;
-- Step 6 - Delete from bis_schedule_preferences
delete_schedule_preferences(pScheduleId);
-- Step 7 - Delete from bis_scheduler
delete bis_scheduler
where schedule_id = pScheduleId;
end delete_old_schedule;
procedure delete_Notification_Data is
cursor cNotificationSchedules is
select schedule_id
from bis_scheduler s, fnd_concurrent_requests cr
where s.concurrent_request_id = cr.request_id
and 0 = (select count(*)
from fnd_concurrent_requests
where phase_code IN ('P', 'R')
start with request_id = cr.request_id
connect by prior request_id = parent_request_id)
and 0 = (select count(*) from bis_schedule_preferences sp
where sp.schedule_id = s.schedule_id
and plug_id is not null);
select count(*)
into vCount
from wf_notifications w, bis_schedule_preferences sp
where sp.schedule_id = c1.schedule_id
and w.recipient_role = gvRoleName||sp.file_id
and w.status = 'CLOSED';
delete_schedule(c1.schedule_id);
-- Check to see if any of notifications are now closed, and delete the file if they are.
delete fnd_lobs
where file_id in(
select substr(recipient_role, Length(gvRoleName)+1)
from wf_notifications w
where w.recipient_role like gvRoleName || '%'
and status = 'CLOSED');
end delete_Notification_Data;
-- Before delete existing plug id, get the external source id
-- and then update the new record with this source id
--jprabhud 09/24/02 - Enh 2470068 Storing of Graphs to FND_LOBS -- added vRequestType
begin
select external_source_id, request_type
into vExternalSourceId, vRequestType
from bis_schedule_preferences
where user_id = p_user_id
and plug_id = p_plug_id;
delete_portlet(p_plug_id, p_user_id, vGraphFileId);
insert into bis_schedule_preferences
(schedule_id
,user_id
,plug_id
,request_type
,title
,graph_type
,file_id
,creation_Date
,last_update_date
,created_By
,last_updated_by
,last_update_login
,external_source_id
)
values
(p_schedule_id
,p_user_id
,p_plug_id
,p_request_type
,p_title
-- mdamle 09/07/01 - Add Graph Number poplist
,decode(p_request_type, 'G', p_graph_type, null)
,p_file_id
,sysdate
,sysdate
,0
,0
,0
,vExternalSourceId
);
-- mdamle 10/25/01 - Update Title in ICX_PORTLET_CUSTOMIZATIONS
-- In Web Portlets, the title has to be updated in ICX_PORTLET_CUSTOMIZATIONS
-- since changing the title at runtime is not possible
--serao - 02/25/02- added so that the title is not updated for rl portlet
if (p_plug_id is not null and p_title is not null )then
updateTitleInPortal(p_schedule_id, p_plug_id, p_title);
PROCEDURE delete_schedule_preferences
( pScheduleId IN number
,pUserId IN number default NULL
,pPlugId IN number default NULL
) IS
cursor cUserFiles (cpScheduleId number, cpUserId number, cpPlugId number) is
select distinct file_id
from bis_schedule_preferences
where schedule_id = cpScheduleId
and user_id = cpUserId
and nvl(plug_id, 0) = nvl(cpPlugID, 0);
select count(*)
into vCount
from bis_schedule_preferences sp, wf_notifications w
where file_id = c1.file_id
and w.recipient_role = gvRoleName||sp.file_id
and w.status = 'CLOSED';
-- Step 1 - Delete file from FND_LOBS for this preference
delete fnd_lobs
where file_id = c1.file_id;
-- Step 2 - Delete Role
delete wf_local_roles
where name = gvRoleName||c1.file_id;
-- Step 3 - Delete the user preference
delete bis_schedule_preferences
where schedule_id = pScheduleId
and user_id = pUserId
and nvl(plug_id, 0) = nvl(pPlugID, 0);
-- Step 1 - Delete all schedule files from FND_LOBS
delete fnd_lobs
where file_id IN (select file_id from bis_schedule_preferences where schedule_id = pScheduleId);
-- Step 2 - Delete Role
delete wf_local_roles
where name IN (select gvRoleName||file_id from bis_schedule_preferences where schedule_id = pScheduleId);
-- Step 3 - Delete all preferences for this schedule
delete bis_schedule_preferences
where schedule_id = pScheduleId;
END delete_schedule_preferences;
select request_id, status_code, phase_code
into vPendingRequestId, vStatusCode, vPhaseCode
from fnd_concurrent_requests
where phase_code <> 'C'
start with request_id = pRequestId
connect by prior request_id = parent_request_id;
update fnd_concurrent_requests
set status_code = vStatusCode,
phase_code = vPhaseCode,
completion_text = vCompletionText
where request_id = vPendingRequestId;
select application_id
from fnd_responsibility
where responsibility_id=pRespId;
select function_id into vPageFunctionId
from fnd_form_functions
where function_name = 'BIS_INFORMATION_PAGE';
procedure updateTitleInPortal( p_schedule_id IN NUMBER,
p_plug_id IN NUMBER,
p_title IN VARCHAR2) is
vSQL varchar2(1000);
vSQL := 'select count(*) from icx_portlet_customizations where plug_id = :1';
select s.function_name, type
into vFunctionName, vType
from bis_scheduler s, fnd_form_functions f
where schedule_id = p_schedule_id
and s.function_name = f.function_name;
vSQL := 'update icx_portlet_customizations set title = :1 where plug_id = :2';
end updateTitleInPortal;
update bis_schedule_preferences
set request_type = p_request_type,
graph_type = decode(p_request_type, 'G', p_graph_type, null),
title = p_title
where user_id = p_user_id
and plug_id = p_plug_id;
updateTitleInPortal(p_schedule_id, p_plug_id, p_title);
procedure updateExternalSource( p_schedule_id in varchar2,
p_file_id in varchar2,
p_external_source_id in varchar2) is
begin
update bis_schedule_preferences
set external_source_id = p_external_source_id
where schedule_id = p_schedule_id
and nvl(p_file_id, 0) = nvl(p_file_id, 0);
end updateExternalSource;
SELECT external_source_id INTO o_external_source_id
FROM bis_schedule_preferences
WHERE schedule_id = p_schedule_id
AND nvl(file_id, 0) = nvl(p_file_id, 0);
update fnd_lobs
SET expiration_date = SYSDATE
WHERE file_id = o_external_source_id;
procedure deleteReportGraphsLobs(p_user_id in varchar2
,p_schedule_id in varchar2
,p_function_name in varchar2)
IS
BEGIN
delete fnd_lobs where file_id in
(select session_value
from bis_user_attributes
where user_id = p_user_id
and schedule_id = p_schedule_id
and function_name = p_function_name
and attribute_name in
('GRAPH_FILE_ID_1','GRAPH_FILE_ID_2','GRAPH_FILE_ID_3','GRAPH_FILE_ID_4','GRAPH_FILE_ID_5','GRAPH_FILE_ID_6')
);
END deleteReportGraphsLobs;