我有一个名为 p_user_name 的参数传递给它的 psp(plsql 服务器页面),如下所示:
我在页面中创建了一个名为 p_user 的局部变量,如下所示:
<%@ plsql procedure="recon_portal" %>
<%@ plsql parameter="p_menu" type="varchar2" default="'home'" %>
<%@ plsql parameter="p_rpt_CI" type="varchar2" default="NULL" %>
<%@ plsql parameter="p_conv_CI" type="varchar2" default="NULL" %>
<%@ plsql parameter="p_rpt_CI_run" type="varchar2" default="NULL" %>
<%@ plsql parameter="p_conv_name" type="varchar2" default="NULL" %>
<%@ plsql parameter="file_path1" type="varchar2" default="NULL" %>
<%@ plsql parameter="file_path2" type="varchar2" default="NULL" %>
<%@ plsql parameter="file_path3" type="varchar2" default="NULL" %>
<%@ plsql parameter="file_path4" type="varchar2" default="NULL" %>
<%@ plsql parameter="file_path5" type="varchar2" default="NULL" %>
<%@ plsql parameter="file_path6" type="varchar2" default="NULL" %>
<%@ plsql parameter="conv" type="varchar2" default="NULL" %>
<%@ plsql parameter="p_pass_inst" type="varchar2" default="NULL" %>
<%@ plsql parameter="p_pass_dir" type="varchar2" default="NULL" %>
<%@ plsql parameter="p_user_name" type="varchar2" default="NULL" %>
<%!
lv_report_file_name ci_ref_list.report_file_name%TYPE;
lv_ci_desc_file_name ci_ref_list.ci_desc_file_name%TYPE;
file_path varchar(100);
file_path_master varchar(100);
file_path_linked varchar(100);
url_path varchar(100);
lv_conv varchar(100);
lv_ci_ref varchar(100);
lv_conv_name varchar(100);
lv_ci_run varchar(100);
lv_instance_name varchar(100);
lv_doc varchar(100);
lv_display_name varchar(200);
p_user varchar(100);
%>
在程序的某些部分,我从后端查询一个值并将其放入 p_user 中,如下所示:
<%
BEGIN
select 'Super User'
into p_user
from fnd_user fndusr
where fndusr.user_id = fnd_global.user_id
and exists
(SELECT 1
FROM fnd_lookup_values flv
WHERE flv.lookup_type = 'IKN_RAC_RECON_SUPER_USERS'
AND flv.lookup_code = fndusr.user_name);
EXCEPTION
WHEN OTHERS THEN
p_user := 'Basic User';
END;
%>
一些 html 文件包含在我的 psp 页面的末尾,如下所示:
<%ELSIF p_menu = 'conv' THEN %>
<%@ include file="recon_conversions.html" %>
<%ELSIF p_menu = 'rept' THEN %>
<%@ include file="recon_reports.html" %>
<%ELSE%>
<%@ include file="recon_docs.html" %>
<%END IF;%>
</body>
</html>
现在在这些 html 文件中,我需要使用参数 p_user 中的值。有没有办法在这些 html 文件中获取 p_user 的值?