[Home] [Help]
The following lines contain the word 'select', 'insert', 'update' or 'delete':
select count(*) into l_count
from fnd_form_functions
where function_name = p_report_function_name;
-- Trying to update a non-report function.
FND_MESSAGE.SET_NAME('BIS','BIS_PD_UNIQUE_PGE_ERR');
select lower(application_short_name) into l_app_short_name
from fnd_application
where application_id = p_application_id;
-- --INSERT Form Function
if(p_report_xml_name is null) then
l_report_xml_name := p_report_function_name;
BIS_FORM_FUNCTIONS_PUB.INSERT_ROW (
p_FUNCTION_NAME => p_report_function_name,
p_WEB_HTML_CALL => C_WEB_HTML_CALL,
p_PARAMETERS => l_parameters,
p_TYPE => C_FUNCTION_TYPE,
p_USER_FUNCTION_NAME => p_title,
x_FUNCTION_ID => x_report_id,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data =>x_msg_data);
procedure Update_Report_Function(
p_report_function_name IN VARCHAR2
,p_application_id IN NUMBER
,p_title IN VARCHAR2
,p_report_xml_name IN VARCHAR2 := null
,p_new_report_function_name IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
) is
l_count NUMBER;
select BIS_COMMON_UTILS.getParameterValue(parameters, c_SOURCE_TYPE),
function_id,
parameters
into l_type, l_function_id, l_parameters
from fnd_form_functions
where function_name = p_report_function_name;
select lower(application_short_name) into l_app_short_name
from fnd_application
where application_id = p_application_id;
-- Update form function
if l_report_function_name <> p_report_function_name then
-- Check if new function already exists.
select count(*) into l_count
from fnd_form_functions
where function_name = l_report_function_name;
UPDATE fnd_form_functions
SET function_name = l_report_function_name
WHERE function_id = l_function_id;
BIS_FORM_FUNCTIONS_PUB.UPDATE_ROW (
p_FUNCTION_ID => l_function_id,
p_USER_FUNCTION_NAME => p_title,
p_PARAMETERS => l_parameters,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data =>x_msg_data);
end Update_Report_Function;