--本例子展示了<span style="font-family: Arial, Helvetica, sans-serif;">fnd_flex_loader_apis包中三個procedure的使用規則,請理解後使用,勿粘貼直接運行。</span>
declare
l_application_short_name varchar2(50);
l_responsibility_key varchar2(30);
begin
--安全性規則
fnd_flex_loader_apis.up_value_security_rule(p_upload_phase => 'BEGIN',
p_upload_mode => null,
p_custom_mode => 'FORCE',
p_flex_value_set_name => 'TEST_COMPANY', --target name
p_flex_value_rule_name => '101_CO', --rule name
p_parent_flex_value_low => null,
p_owner => null, --fnd_global.user_id
p_last_update_date => sysdate,
p_parent_flex_value_high => null,
p_error_message => '僅允許使用101公司段', --error message
p_description => '101公司段安全性'); --description
--安全性規則要素
fnd_flex_loader_apis.up_vsec_line(p_upload_phase => 'BEGIN',
p_upload_mode => null,
p_custom_mode => 'FORCE',
p_flex_value_set_name => 'TEST_COMPANY', --target name,
p_flex_value_rule_name => '101_CO', --rule name
p_parent_flex_value_low => null,
p_include_exclude_indicator => 'I', --include exclude indicator
p_flex_value_low => '101', --flex_value_low
p_flex_value_high => '101', --flex_value_high
p_owner => null, --fnd_global.user_id
p_last_update_date => sysdate,
p_parent_flex_value_high => null);
--安全性規則分配
select fav.APPLICATION_SHORT_NAME
into l_application_short_name
from FND_APPLICATION_VL fav
where fav.APPLICATION_NAME = 'General Ledger';
--
select responsibility_key
into l_responsibility_key
from FND_RESPONSIBILITY_VL
where responsibility_name = '101_集團本部_總賬超級用戶';
--
fnd_flex_loader_apis.up_vsec_usage(p_upload_phase => 'BEGIN',
p_upload_mode => null,
p_custom_mode => 'FORCE',
p_flex_value_set_name => 'TEST_COMPANY', --target name,
p_flex_value_rule_name => '101_CO', --rule name
p_parent_flex_value_low => null,
p_application_short_name => l_application_short_name,
p_responsibility_key => l_responsibility_key,
p_owner => null,
p_last_update_date => sysdate,
p_parent_flex_value_high => null);
end;
使用API 複製安全性規則
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.