The following lines contain the word 'select', 'insert', 'update' or 'delete':
g_last_updated_by number := 1;
function isEntDataModified(p_creationDateIn in date, p_lastUpdateDateIn in date) return varchar2 is
begin
if p_creationDateIn = p_lastUpdateDateIn then
return ame_util.booleanFalse;
select application_id
from ame_calling_apps
where transaction_type_id = c_txn_type_id
and sysdate between start_date and nvl(end_Date,sysdate);
select count(*)
from ame_calling_apps
where transaction_type_id = c_txn_type_id
-- and isSeedUser(last_updated_by) = ame_util.booleanFalse;
and isEntDataModified(creation_date,last_update_date) = ame_util.booleanTrue;
select ent.object_version_number
from ame_calling_Apps ent
where ent.application_id = g_ent_appl_id
and (ent.fnd_application_id <> g_fnd_application_id
or ent.application_name <> l_seed_apl_name)
and sysdate between ent.start_date and nvl(ent.end_Date,sysdate)
-- and isSeedUser(ent.last_updated_by) = ame_util.booleanTrue
and isEntDataModified(ent.creation_date,ent.last_update_date) = ame_util.booleanFalse;
ame_trans_type_api. update_ame_transaction_type
(p_application_name => l_appl_name
,p_application_id => l_application_id
,p_object_version_number => l_ovn
,p_start_date => l_start_date
,p_end_date => l_end_Date
);
update ame_calling_apps_tl
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and language = userenv('LANG');
Fnd_file.put_line(FND_FILE.LOG,'Updated the existing transaction type');
Fnd_file.put_line(FND_FILE.LOG,'The existing transaction type has been deleted');
update ame_calling_apps
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_calling_apps_tl
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id;
update ame_item_class_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and item_class_id =
(select item_class_id
from ame_item_classes
where name = ame_util.headerItemClassName
and sysdate between start_date and nvl(end_date,sysdate))
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_attribute_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and sysdate between start_date and nvl(end_Date,sysdate);
procedure updateConfigVars is
l_count number;
select count(*)
from ame_config_vars
where application_id = g_ent_appl_id
and variable_name = c_var_name
and sysdate between start_date and nvl(end_Date,sysdate);
select ent.object_version_number
,ent.variable_value
,ent.creation_date
,ent.last_update_date
from ame_config_vars ent
where ent.application_id = g_ent_appl_id
and ent.variable_name = c_var_name
and ent.variable_value <> c_var_value
and sysdate between ent.start_Date and nvl(ent.end_Date,sysdate)
and isEntDataModified(ent.creation_date,ent.last_update_date) = ame_util.booleanFalse;
l_proc_name := 'updateConfigVars';
ame_config_var_api.update_ame_config_variable
(p_application_id => g_ent_appl_id
,p_variable_name => l_config_varname
,p_variable_value => g_seed_config_usg(i).variable_value
,p_object_version_number => l_ovn
,p_start_date => l_start_date
,p_end_date => l_end_Date
);
update ame_config_vars
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and variable_name = g_seed_config_usg(i).variable_name
and sysdate between start_date and nvl(end_Date,sysdate);
if isSeedUser(g_seed_config_usg(i).last_updated_by) = ame_util.booleanTrue then
l_ovn := upd_rec.object_version_number;
logMessage(l_proc_name,'The Config Var is updated');
ame_config_var_api.update_ame_config_variable
(p_application_id => g_ent_appl_id
,p_variable_name => g_seed_config_usg(i).variable_name
,p_variable_value => g_seed_config_usg(i).variable_value
,p_object_version_number => l_ovn
,p_start_date => l_start_date
,p_end_date => l_end_Date
);
update ame_config_vars
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and variable_name = g_seed_config_usg(i).variable_name
and sysdate between start_date and nvl(end_Date,sysdate);
Fnd_file.put_line(FND_FILE.LOG,'Error updateConfigVars:'||sqlerrm);
end updateConfigVars;
procedure updateItemClassUsage is
l_item_class_id number;
select count(*)
from ame_item_class_usages
where item_class_id = c_item_class_id
and application_id = g_ent_appl_id
and sysdate between start_date and nvl(end_date,sysdate);
select ent.object_version_number
,seed.item_id_query
,seed.item_class_order_number
,seed.item_class_par_mode
,seed.item_class_sublist_mode
from ame_item_class_usages ent
,ame_item_class_usages seed
where ent.item_class_id = c_item_class_id
and seed.item_class_id = c_item_class_id
and seed.application_id = g_seed_appl_id
and ent.application_id = g_ent_appl_id
and (ent.item_id_query <> seed.item_id_query or
ent.item_class_order_number <> seed.item_class_order_number or
ent.item_class_par_mode <> seed.item_class_par_mode or
ent.item_class_sublist_mode <> seed.item_class_sublist_mode)
and sysdate between ent.start_date and nvl(ent.end_Date,sysdate)
and sysdate between seed.start_date and nvl(seed.end_date,sysdate)
and isEntDataModified(ent.creation_date,ent.last_update_date) = ame_util.booleanFalse;
l_proc_name := 'updateItemClassUsage';
if isSeedUser(g_seed_ic_usg(i).last_updated_by) = ame_util.booleanTrue then
l_ovn := upd_rec.object_version_number;
ame_item_class_api.update_ame_item_class_usage
(p_application_id => g_ent_appl_id
,p_item_class_id => l_item_class_id
,p_item_id_query => g_seed_ic_usg(i).item_id_query
,p_item_class_order_number => g_seed_ic_usg(i).item_class_order_number
,p_item_class_par_mode => g_seed_ic_usg(i).item_class_par_mode
,p_item_class_sublist_mode => g_seed_ic_usg(i).item_class_sublist_mode
,p_object_version_number => l_ovn
,p_start_date => l_start_date
,p_end_date => l_end_date
);
update ame_item_class_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and item_class_id = l_item_class_id
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_item_class_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and item_class_id = l_item_class_id
and sysdate between start_date and nvl(end_Date,sysdate);
Fnd_file.put_line(FND_FILE.LOG,'Error in updateItemClassUsage:'||sqlerrm);
end updateItemClassUsage;
procedure updateMandAtrUsages is
l_attribute_name varchar2(50);
select *
from ame_attribute_usages
where attribute_id = c_attr_id
and (is_static <> c_is_static or nvl(query_string,'PRASAD') <> nvl(c_query_string,'PRASAD') or
nvl(value_set_id,-1) <> NVL(c_value_set_id,-1))
and application_id = g_ent_appl_id
and sysdate between start_date and nvl(end_Date,sysdate)
and isEntDataModified(creation_date,last_update_date) = ame_util.booleanFalse;
l_proc_name := 'updateMandAtrUsages';
ame_attribute_api.update_ame_attribute_usage
(p_attribute_id => g_seed_mand_attr_usg(i).attribute_id
,p_application_id => g_ent_appl_id
,p_is_static => g_seed_mand_attr_usg(i).is_static
,p_query_string => g_seed_mand_attr_usg(i).query_string
,p_value_set_id => g_seed_mand_attr_usg(i).value_set_id
,p_object_version_number => l_ovn
,p_start_date => l_start_Date
,p_end_date => l_end_Date
);
update ame_attribute_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and attribute_id = g_seed_mand_attr_usg(i).attribute_id
and sysdate between start_date and nvl(end_Date,sysdate);
Fnd_file.put_line(FND_FILE.LOG,'Error in updateMandAtrUsages:'||sqlerrm);
end updateMandAtrUsages;
select count(*)
from ame_attribute_usages
where application_id = g_ent_appl_id
and attribute_id = c_atr_id
and sysdate between start_date and nvl(end_Date,sysdate);
select ent.object_version_number
from ame_attribute_usages ent
where ent.attribute_id = c_atr_id
and ent.application_id = g_ent_appl_id
and (ent.is_static <> c_is_static or nvl(ent.query_string,'PRASAD') <> nvl(c_query_string,'PRASAD'))
and sysdate between ent.start_date and nvl(ent.end_Date,sysdate)
and isEntDataModified(ent.creation_date,ent.last_update_date) = ame_util.booleanFalse;
updateMandAtrUsages;
if isSeedUser(g_seed_attr_usg(i).last_updated_by) = ame_util.booleanTrue then
logMessage(l_proc_name,'Updating the attribute usage for : ' || l_attribute_id);
ame_attribute_api.update_ame_attribute_usage
(p_attribute_id => l_attribute_id
,p_application_id => g_ent_appl_id
,p_is_static => g_seed_attr_usg(i).is_static
,p_query_string => g_seed_attr_usg(i).query_string
,p_value_set_id => g_seed_attr_usg(i).value_set_id
,p_object_version_number => l_ovn
,p_start_date => l_start_date
,p_end_date => l_end_Date
);
update ame_attribute_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and attribute_id = l_attribute_id
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_attribute_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and attribute_id = l_attribute_id
and sysdate between start_date and nvl(end_Date,sysdate);
procedure updateActionTypeConfig is
l_proc_name varchar2(100);
select count(*)
from ame_action_Type_config
where sysdate between start_date and nvl(end_Date,sysdate)
and application_id = g_ent_appl_id
and action_type_id = c_action_type_id;
select ent.object_version_number
from ame_action_type_config ent
where ent.application_id = g_ent_appl_id
and c_act_type_id = ent.action_type_id
and (nvl(ent.voting_regime,'AA') <> nvl(c_voting_regime,'AA')
or nvl(ent.chain_ordering_mode,'AA') <> nvl(c_chain_ordering_mode,'AA')
or nvl(ent.order_number,-1) <> nvl(c_order_number,-1))
and sysdate between ent.start_Date and nvl(ent.end_Date,sysdate)
and isEntDataModified(ent.creation_date,ent.last_update_date) = ame_util.booleanFalse ;
l_proc_name := 'updateActionTypeConfig';
if isSeedUser(g_seed_act_config(i).last_updated_by) = ame_util.booleanTrue then
Fnd_file.put_line(FND_FILE.LOG,'Updating the action type configuration for:'||l_action_type_id);
ame_action_api.update_ame_action_type_conf
(p_action_type_id => l_action_type_id,
p_application_id => g_ent_appl_id,
p_voting_regime => g_seed_act_config(i).voting_regime,
p_chain_ordering_mode => g_seed_act_config(i).chain_ordering_mode,
p_order_number => g_seed_act_config(i).order_number,
p_object_version_number => l_ovn,
p_start_date => l_start_date,
p_end_date => l_end_Date
);
update ame_action_type_config
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and action_type_id = l_action_type_id
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_action_type_config
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and action_type_id = l_action_type_id
and sysdate between start_date and nvl(end_Date,sysdate);
Fnd_file.put_line(FND_FILE.LOG,'Error in updateActionTypeConfig:'||sqlerrm);
end updateActionTypeConfig;
select count(*)
from ame_approval_group_config
where application_id = g_ent_appl_id
and approval_Group_id = c_ent_grp_id
and sysdate between start_date and nvl(end_Date,sysdate);
select ent.object_version_number
from ame_approval_group_config ent
where ent.application_id = g_ent_appl_id
and ent.approval_Group_id = c_ent_grp_id
and (c_voting_regime <> ent.voting_regime
or c_order_number <> ent.order_number)
and sysdate between ent.start_date and nvl(ent.end_Date,sysdate)
and isEntDataModified(ent.creation_date,ent.last_update_date) = ame_util.booleanFalse;
if isSeedUser(g_seed_group_data(i).config_last_updated_by) = ame_util.booleanTrue then
l_ovn := upd_Rec.object_version_number;
ame_approver_group_api.update_approver_group_config
(
p_approval_group_id => p_ent_grp_id
,p_application_id => g_ent_appl_id
,p_voting_regime => g_seed_group_data(i).voting_regime
,p_order_number => g_seed_group_data(i).order_number
,p_object_version_number => l_ovn
,p_start_date => l_start_date
,p_end_date => l_end_date
);
update ame_approval_group_config
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and approval_group_id = p_ent_grp_id
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_approval_group_config
set created_by = getSeedUser
,last_updated_by = getSeedUser
where application_id = g_ent_appl_id
and approval_group_id = p_ent_grp_id
and sysdate between start_date and nvl(end_Date,sysdate);
select approval_Group_id
from ame_approval_Groups
where name = c_name_in
and sysdate between start_date and nvl(end_Date,sysdate);
cursor getGrpUpdate(c_current_grp_id in number,c_query_string in varchar2) is
select ent.object_version_number
from ame_approval_groups ent
where ent.approval_group_id = c_current_grp_id
and c_query_string <> ent.query_string
and sysdate between ent.start_date and nvl(ent.end_Date,sysdate)
and isEntDataModified(ent.creation_date,ent.last_update_date) = ame_util.booleanFalse;
update ame_approval_groups
set created_by = getSeedUser
,last_updated_by = getSeedUser
where approval_group_id = l_current_grp_id
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_approval_groups_tl
set created_by = getSeedUser
,last_updated_by = getSeedUser
where approval_group_id = l_current_grp_id;
for upd_rec in getGrpUpdate(c_current_grp_id => l_current_grp_id
,c_query_string => g_seed_group_data(groupIndex).query_string) loop
if isSeedUser(g_seed_group_data(groupIndex).group_last_updated_by) = ame_util.booleanTrue then
l_ovn := upd_rec.object_version_number;
ame_approver_group_api.update_ame_approver_group
(p_approval_group_id => l_current_grp_id
,p_is_static => g_seed_group_data(groupIndex).is_static
,p_query_string => g_seed_group_data(groupIndex).query_string
,p_object_version_number => l_ovn
,p_start_date => l_start_date
,p_end_date => l_end_date
);
update ame_approval_groups
set created_by = getSeedUser
,last_updated_by = getSeedUser
where approval_group_id = l_current_grp_id
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_approval_groups_tl
set created_by = getSeedUser
,last_updated_by = getSeedUser
where approval_group_id = l_current_grp_id
and language = userenv('LANG');
procedure updateGroupsConfig is
l_name varchar2(100);
select agp.approval_group_id
,agp.name
from ame_approval_group_config agc
,ame_approval_Groups agp
where agc.application_id = g_seed_appl_id
and agc.approval_Group_id = agp.approval_group_id
and sysdate between agp.start_date and nvl(agp.end_Date,sysdate)
and sysdate between agc.start_date and nvl(agc.end_Date,sysdate);
l_proc_name := 'updateGroupsConfig';
Fnd_file.put_line(FND_FILE.LOG,'Error in updateGroupsConfig:'||sqlerrm);
end updateGroupsConfig;
select parameter
,ac.action_type_id
from ame_actions ac
, ame_action_types act
where ac.action_type_id = act.action_type_id
and ac.action_id = c_action_id
and sysdate between ac.start_date and nvl(ac.end_Date,sysdate)
and sysdate between act.start_date and nvl(act.end_Date,sysdate)
and act.name in
(ame_util.preApprovalTypeName,
ame_util.groupChainApprovalTypeName,
ame_util.postApprovalTypeName );
select action_id
from ame_actions
where parameter =
(select to_char(approval_Group_id)
from ame_approval_Groups
where name = c_name
and sysdate between start_Date and nvl(end_Date,sysdate))
and action_type_id = c_action_type_id
and sysdate between start_date and nvl(end_Date,sysdate);
select 'Y'
from ame_action_types act
,ame_actions ac
,ame_action_type_usages actu
where ac.action_id = c_action_id
and actu.rule_type = c_rule_type
and act.action_type_id = ac.action_Type_id
and actu.action_type_id = act.action_type_id
and sysdate between ac.start_date and nvl(ac.end_Date,sysdate)
and sysdate between actu.start_date and nvl(actu.end_Date,sysdate)
and sysdate between act.start_date and nvl(act.end_Date,sysdate);
l_cond_list.delete;
l_ation_list.delete;
update ame_rules
set created_by = getSeedUser
,last_updated_by = getSeedUser
where rule_id = l_current_rule_id;
update ame_rules_tl
set created_by = getSeedUser
,last_updated_by = getSeedUser
where rule_id = l_current_rule_id;
update ame_rules
set start_date = sysdate
where rule_id = l_current_rule_id
and rule_strt_date_chd = 'Y';
update ame_rule_usages
set start_date = sysdate
where rule_id = l_current_rule_id
and item_id = g_ent_appl_id
and rule_strt_date_chd = 'Y';
update ame_action_usages
set start_date = sysdate
where rule_id = l_current_rule_id
and rule_strt_date_chd = 'Y';
update ame_condition_usages
set start_date = sysdate
where rule_id = l_current_rule_id
and rule_strt_date_chd = 'Y';
update ame_rule_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where rule_id = l_current_rule_id
and sysdate between start_date and nvl(end_Date,sysdate);
update ame_action_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where rule_id = l_current_rule_id
and action_id = l_action_id;
update ame_condition_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where rule_id = l_current_rule_id
and condition_id = l_conditionid;
update ame_condition_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where rule_id = l_current_rule_id
and condition_id = l_cond_list(i)
and sysdate between start_date and nvl(end_date,sysdate);
update ame_action_usages
set created_by = getSeedUser
,last_updated_by = getSeedUser
where rule_id = l_current_rule_id
and action_id = l_action_id
and sysdate between start_date and nvl(end_date,sysdate);
select count(*)
from ame_rules ar
,ame_rule_usages aru
where ar.rule_id = aru.rule_id
and ar.description = c_rule_name
and aru.item_id = g_ent_appl_id
and ((sysdate between ar.start_date
and nvl(ar.end_date + 1/86400,sysdate)) or
(sysdate < ar.start_date and
ar.start_date < nvl(ar.end_date, ar.start_date + 1/86400)))
and ((sysdate between aru.start_date
and nvl(aru.end_date + 1/86400,sysdate)) or
(sysdate < aru.start_date and
aru.start_date < nvl(aru.end_date, aru.start_date + 1/86400)));
select count(*)
from ame_rules ar
,ame_rule_usages aru
where ar.rule_id = aru.rule_id
and ar.description = c_rule_name
and aru.item_id = g_ent_appl_id
and (sysdate > aru.end_Date or sysdate > ar.end_Date);
procedure updateRuleUsg is
l_rule_name varchar2(500);
select ar.rule_id
,ar.description
from ame_rules ar
,ame_rule_usages aru
where ar.rule_id = aru.rule_id
and aru.item_id = g_seed_appl_id
and ((sysdate between ar.start_date
and nvl(ar.end_date + 1/86400,sysdate)) or
(sysdate < ar.start_date and
ar.start_date < nvl(ar.end_date, ar.start_date + 1/86400)))
and ((sysdate between aru.start_date
and nvl(aru.end_date + 1/86400,sysdate)) or
(sysdate < aru.start_date and
aru.start_date < nvl(aru.end_date, aru.start_date + 1/86400)));
select count(*)
from ame_rule_usages aru, ame_rules ar
where ar.description = c_rule_name
and aru.rule_id = ar.rule_id
and aru.item_id = g_ent_appl_id
and ((sysdate between ar.start_date
and nvl(ar.end_date + 1/86400,sysdate)) or
(sysdate < ar.start_date and
ar.start_date < nvl(ar.end_date, ar.start_date + 1/86400)))
and ((sysdate between aru.start_date
and nvl(aru.end_date + 1/86400,sysdate)) or
(sysdate < aru.start_date and
aru.start_date < nvl(aru.end_date, aru.start_date + 1/86400)));
l_proc_name := 'updateRuleUsg';
Fnd_file.put_line(FND_FILE.LOG,'Error in updateRuleUsg:'||sqlerrm);
end updateRuleUsg;
select variable_value,object_version_number
from ame_config_vars
where variable_name = ame_util.allowAllApproverTypesConfigVar
and application_id = c_appl_id
and sysdate between start_date and nvl(end_date,sysdate);
select *
from ame_calling_apps
where transaction_type_id = g_seed_txntype
and fnd_application_id = g_fnd_application_id
and sysdate between start_date and nvl(end_Date,sysdate);
ame_config_var_api.update_ame_config_variable
(p_application_id => g_seed_appl_id
,p_variable_name => ame_util.allowAllApproverTypesConfigVar
,p_variable_value => 'yes'
,p_object_version_number => l_ovn
,p_start_date => l_start_date
,p_end_date => l_end_Date
);
update ame_config_vars
set last_updated_by = getSeedUser
where application_id = g_seed_appl_id
and variable_name = ame_util.allowAllApproverTypesConfigVar
and sysdate between start_date and nvl(end_date,sysdate);
Fnd_file.put_line(FND_FILE.LOG,'Updated the SSHR default configuration variable to yes');
select *
from ame_Config_vars seed
where application_id = g_seed_appl_id
and sysdate between start_Date and nvl(end_Date,sysdate);
select seed.*
from ame_attribute_usages seed
,ame_attributes atr
where seed.attribute_id = atr.attribute_id
and exists
(select null
from ame_mandatory_attributes
where attribute_id = atr.attribute_id
and action_type_id = -1
and sysdate between start_date and nvl(end_Date,sysdate))
and seed.application_id = g_seed_appl_id
and sysdate between seed.start_Date and nvl(seed.end_Date,sysdate)
and sysdate between atr.start_date and nvl(atr.end_Date,sysdate)
and isSeedUser(seed.last_updated_by) = ame_util.booleanTrue;
select atu.*
from ame_attributes atr
,ame_attribute_usages atu
where atr.attribute_id = atu.attribute_id
and atu.application_id = g_seed_appl_id
and sysdate between atr.start_Date and nvl(atr.end_Date,sysdate)
and sysdate between atu.start_date and nvl(atu.end_Date,sysdate)
and not exists
(select null
from ame_mandatory_attributes
where attribute_id = atr.attribute_id
and action_type_id = -1
and sysdate between start_Date and nvl(end_Date,sysdate));
select *
from ame_action_type_config
where sysdate between start_date and nvl(end_Date,sysdate)
and application_id = g_seed_appl_id;
select voting_regime
,order_number
,name
,groups.approval_group_id
,query_string
,is_static
,description
,groups.last_updated_by group_last_updated_by
,config.last_updated_by config_last_updated_by
,groups.creation_date group_creation_date
,config.creation_date config_creation_date
from ame_approval_Groups groups
,ame_approval_group_config config
where application_id = g_seed_appl_id
and groups.approval_group_id = config.approval_group_id
and sysdate between groups.start_date and nvl(groups.end_Date,sysdate)
and sysdate between config.start_date and nvl(config.end_Date,sysdate);
select *
from ame_item_class_usages
where application_id = g_seed_appl_id
and sysdate between start_date and nvl(end_Date,sysdate);
select ar.rule_id
,ar.description
,ar.rule_type
,ar.start_date
,ar.end_date
,aru.start_date usage_start_date
,aru.end_date usage_end_date
,aru.approver_category
,aru.priority
,ar.item_class_id
from ame_rules ar
,ame_rule_usages aru
where aru.item_id = g_seed_appl_id
and ar.rule_id = aru.rule_id
and ((sysdate between ar.start_date
and nvl(ar.end_date + 1/86400,sysdate)) or
(sysdate < ar.start_date and
ar.start_date < nvl(ar.end_date, ar.start_date + 1/86400)))
and ((sysdate between aru.start_date
and nvl(aru.end_date + 1/86400,sysdate)) or
(sysdate < aru.start_date and
aru.start_date < nvl(aru.end_date, aru.start_date + 1/86400)))
order by aru.rule_id;
select acu.*
from ame_rules ar
,ame_rule_usages aru
,ame_action_usages acu
where aru.item_id = g_seed_appl_id
and acu.rule_id = ar.rule_id
and ar.rule_id = aru.rule_id
and ((sysdate between ar.start_date
and nvl(ar.end_date + 1/86400,sysdate)) or
(sysdate < ar.start_date and
ar.start_date < nvl(ar.end_date, ar.start_date + 1/86400)))
and ((sysdate between aru.start_date
and nvl(aru.end_date + 1/86400,sysdate)) or
(sysdate < aru.start_date and
aru.start_date < nvl(aru.end_date, aru.start_date + 1/86400)))
and ((sysdate between acu.start_date and nvl(acu.end_Date+1/86400,sysdate)) or
(sysdate < acu.start_date and acu.start_date < nvl(acu.end_Date,acu.start_date+1/86400)))
order by acu.rule_id;
select acu.*
from ame_rules ar
,ame_rule_usages aru
,ame_condition_usages acu
where aru.item_id = g_seed_appl_id
and acu.rule_id = ar.rule_id
and ar.rule_id = aru.rule_id
and ((sysdate between ar.start_date
and nvl(ar.end_date + 1/86400,sysdate)) or
(sysdate < ar.start_date and
ar.start_date < nvl(ar.end_date, ar.start_date + 1/86400)))
and ((sysdate between aru.start_date
and nvl(aru.end_date + 1/86400,sysdate)) or
(sysdate < aru.start_date and
aru.start_date < nvl(aru.end_date, aru.start_date + 1/86400)))
and ((sysdate between acu.start_date and nvl(acu.end_Date+1/86400,sysdate)) or
(sysdate < acu.start_date and acu.start_date < nvl(acu.end_Date,acu.start_date+1/86400)))
order by acu.rule_id;
updateConfigVars;
updateItemClassUsage;
updateActionTypeConfig;
updateGroupsConfig;
updateRuleUsg;
select transaction_type_id
,fnd_application_id
from ame_calling_apps
where application_id = c_applIdIn
and sysdate between start_date and nvl(end_date,sysdate);
select enterprise_name
,'C::'||enterprise_label
from per_enterprises_vl
where enterprise_id = c_enterpriseId;
Fnd_file.put_line(FND_FILE.LOG,'Seed Transaction type selected:'||g_seed_txntype);
'SELECT LABEL_TO_CHAR(HR_ENTERPRISE) ENT_LABEL ' ||
' FROM ame_conditions ' ||
' WHERE condition_id = :1 ' ||
' AND (sysdate + 1/64000) between start_date and nvl(end_date,sysdate)';
'SELECT sa_session.row_label(''HR_ENTERPRISE_POLICY'') ' ||
' FROM dual ';
'SELECT sa_session.row_label(''HR_ENTERPRISE_POLICY'') ' ||
' FROM dual ';