使用API 复制安全性规则

来源:互联网 发布:电子淘宝网 编辑:程序博客网 时间:2024/06/04 22:29


--本例子展示了<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;


0 0