The following lines contain the word 'select', 'insert', 'update' or 'delete':
select configuration_code,
config_information_id,
config_sequence,
config_information_category,
per_ri_config_utilities.return_config_entity_name(enterprise_name),
enterprise_name, -- for other processing
enterprise_short_name,
enterprise_headquarter_country,
enterprise_primary_industry,
enterprise_location_id
from per_ri_config_enterprise_v
where configuration_code = cp_configuration_code;
l_country_selected varchar2(50);
l_selected_country_code varchar2(10);
l_selected_country_name varchar2(50);
select enterprise_id into l_enterprise_id from per_ent_security_groups
where business_group_id = fnd_profile.value('PER_BUSINESS_GROUP_ID');
select legislation_code into l_selected_country_code from
per_business_groups where business_group_id =
fnd_profile.value('PER_BUSINESS_GROUP_ID');
select name into l_selected_country_name from per_business_groups
where business_group_id = fnd_profile.value('PER_BUSINESS_GROUP_ID');
hr_utility.set_location(l_selected_country_code, 94000);
IF l_business_group_country_code = l_selected_country_code AND
l_multi_tenancy AND l_system_model = 'B' AND l_sec_group_id <> '0'
AND l_enterprise_id IS NOT NULL
THEN
hr_utility.set_location('BG Matches', 91000);
l_business_group_name := l_selected_country_name;
hrdpp_create_organization.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 30
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_name => l_enterprise_name
,p_location_code => l_ent_location_code
,p_internal_external_flag => 'INT'
,p_org_user_key => l_enterprise_name || SYSDATE);
hrdpp_update_organization.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 40
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_language_code => hr_api.userenv_lang
,p_organization_name => l_enterprise_name
,p_location_code => l_ent_location_code);
hrdpp_create_org_classificatio.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 50
,p_effective_date => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_org_classif_code => 'HR_LEGAL'
,p_organization_name => l_enterprise_name
,p_language_code => hr_api.userenv_lang);
hrdpp_create_organization_stru.insert_batch_lines
(p_batch_id => p_batch_header_id
--,p_data_pump_business_grp_name => l_business_group_name
,p_data_pump_business_grp_name => null
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 60
,p_effective_date => g_config_effective_date
,p_name => substr(l_enterprise_name,1,30)-- name of the hierarchy same
,p_primary_structure_flag => 'N'
,p_position_control_structure_f => 'N'
,p_org_structure_user_key => p_configuration_code || ' ' || l_enterprise_name
|| ' Structure');
hrdpp_create_org_structure_ver.insert_batch_lines
(p_batch_id => p_batch_header_id
--,p_data_pump_business_grp_name => l_business_group_name
,p_data_pump_business_grp_name => null
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 70
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_version_number => 1
,p_topnode_pos_ctrl_enabled_fla => 'N'
,p_org_str_version_user_key => p_configuration_code || ' ' || l_enterprise_name
|| ' Version'
,p_org_structure_user_key => p_configuration_code || ' ' || l_enterprise_name
|| ' Structure');
select configuration_code,
config_information_id,
config_sequence,
config_information_category,
per_ri_config_utilities.return_config_entity_name(operating_company_name),
operating_company_name,
operating_company_short_name,
operating_company_hq_country,
operating_company_location_id
from per_ri_config_oper_comp_v
where configuration_code = cp_configuration_code;
l_selected_country_code varchar2(10);
l_selected_country_name varchar2(50);
select enterprise_id into l_enterprise_id from per_ent_security_groups
where business_group_id = fnd_profile.value('PER_BUSINESS_GROUP_ID');
select legislation_code into l_selected_country_code from
per_business_groups where business_group_id =
fnd_profile.value('PER_BUSINESS_GROUP_ID');
select name into l_selected_country_name from per_business_groups
where business_group_id = fnd_profile.value('PER_BUSINESS_GROUP_ID');
hr_utility.set_location(l_selected_country_code, 94000);
IF l_business_group_country_code = l_selected_country_code AND
l_multi_tenancy AND l_system_model = 'B' AND l_sec_group_id <> '0'
AND l_enterprise_id IS NOT NULL
THEN
hr_utility.set_location('BG Matches', 91000);
l_business_group_name := l_selected_country_name;
hrdpp_create_organization.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 30
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_language_code => hr_api.userenv_lang
,p_name => l_operating_company_name
,p_internal_external_flag => 'INT'
,p_location_code => l_oc_location_code
,p_org_user_key => l_operating_company_name || SYSDATE);
hrdpp_update_organization.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 40
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_language_code => hr_api.userenv_lang
,p_organization_name => l_operating_company_name
,p_location_code => l_oc_location_code);
hrdpp_create_hierarchy_element.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 80
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_data_pump_business_grp_name => null
--,p_data_pump_business_grp_name => l_business_group_name
,p_view_all_orgs => 'Y'
,p_end_of_time => null
,p_hr_installed => null
,p_pa_installed => null
,p_pos_control_enabled_flag => null
,p_warning_raised => null
,p_parent_organization_name => l_enterprise_name
,p_child_organization_name => l_operating_company_name
,p_language_code => hr_api.userenv_lang
,p_org_str_version_user_key => p_configuration_code || ' ' || l_enterprise_name
|| ' Version'
-- ,p_security_profile_name => l_business_group_name);
hrdpp_create_org_classificatio.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 50
,p_effective_date => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_org_classif_code => 'HR_OPC'
,p_organization_name => l_operating_company_name
,p_language_code => hr_api.userenv_lang);
select configuration_code,
config_information_id,
config_sequence,
config_information_category,
per_ri_config_utilities.return_config_entity_name(legal_entity_name),
legal_entity_name,
legal_entity_short_name,
legal_entity_country,
legal_entity_parent_oper_comp,
legal_entity_location_id
from per_ri_config_legal_entity_v
where configuration_code = cp_configuration_code;
l_selected_country_code varchar2(10);
l_selected_country_name varchar2(50);
select enterprise_id into l_enterprise_id from per_ent_security_groups
where business_group_id = fnd_profile.value('PER_BUSINESS_GROUP_ID');
select legislation_code into l_selected_country_code from
per_business_groups where business_group_id =
fnd_profile.value('PER_BUSINESS_GROUP_ID');
select name into l_selected_country_name from per_business_groups
where business_group_id = fnd_profile.value('PER_BUSINESS_GROUP_ID');
hr_utility.set_location(l_selected_country_code, 94000);
IF l_business_group_country_code = l_selected_country_code AND
l_multi_tenancy AND l_system_model = 'B' AND l_sec_group_id <> '0'
AND l_enterprise_id IS NOT NULL
THEN
hr_utility.set_location('BG Matches', 91000);
l_business_group_name := l_selected_country_name;
hrdpp_create_organization.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 30
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_name => l_legal_entity_name
,p_location_code => l_le_location_code
,p_internal_external_flag => 'INT'
,p_org_user_key => l_legal_entity_name || SYSDATE);
hrdpp_update_organization.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 40
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_language_code => hr_api.userenv_lang
,p_organization_name => l_legal_entity_name
,p_location_code => l_le_location_code);
hrdpp_create_org_classificatio.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 50
,p_effective_date => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_org_classif_code => 'CC'
,p_organization_name => l_legal_entity_name
,p_language_code => hr_api.userenv_lang);
hrdpp_create_org_classificatio.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 50
,p_effective_date => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_org_classif_code => 'HR_LEGAL_EMPLOYER'
,p_organization_name => l_legal_entity_name
,p_language_code => hr_api.userenv_lang);
hrdpp_create_org_classificatio.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 50
,p_effective_date => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_org_classif_code => 'FR_SOCIETE'
,p_organization_name => l_legal_entity_name
,p_language_code => hr_api.userenv_lang);
hrdpp_create_org_classificatio.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 50
,p_effective_date => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_org_classif_code => 'IN_COMPANY'
,p_organization_name => l_legal_entity_name
,p_language_code => hr_api.userenv_lang);
hrdpp_create_org_classificatio.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 50
,p_effective_date => g_config_effective_date
,p_data_pump_business_grp_name => l_business_group_name
,p_org_classif_code => 'HR_LEGAL'
,p_organization_name => l_legal_entity_name
,p_language_code => hr_api.userenv_lang);
hrdpp_create_hierarchy_element.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 90
,p_effective_date => g_config_effective_date
,p_date_from => g_config_effective_date
,p_data_pump_business_grp_name => null
--,p_data_pump_business_grp_name => l_business_group_name
,p_view_all_orgs => 'Y'
,p_end_of_time => null
,p_hr_installed => null
,p_pa_installed => null
,p_pos_control_enabled_flag => null
,p_warning_raised => null
,p_parent_organization_name => per_ri_config_utilities.return_config_entity_name
(l_le_parent_oper_comp)
,p_child_organization_name => l_legal_entity_name
,p_language_code => hr_api.userenv_lang
,p_org_str_version_user_key => p_configuration_code || ' ' || l_enterprise_name
|| ' Version'
--,p_security_profile_name => l_business_group_name);
select configuration_code,
configuration_context,
location_id,
location_code,
description,
style,
address_line_1,
address_line_2,
address_line_3,
town_or_city,
country,
postal_code,
region_1,
region_2,
region_3,
telephone_number_1,
telephone_number_2,
telephone_number_3,
loc_information13,
loc_information14,
loc_information15,
loc_information16,
loc_information17,
loc_information18,
loc_information19,
loc_information20,
object_version_number
from per_ri_config_locations
where configuration_code = cp_configuration_code;
SELECT territory_code
FROM fnd_territories_vl
WHERE territory_short_name = cp_country_name;
hrdpp_create_location.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_effective_date => g_config_effective_date
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 10
,p_location_code => l_location_code
,p_description => l_description
,p_address_line_1 => l_address_line_1
,p_address_line_2 => l_address_line_2
,p_address_line_3 => l_address_line_3
,p_bill_to_site_flag => 'Y'
,p_country => l_country
,p_in_organization_flag => 'Y'
,p_postal_code => l_postal_code
,p_receiving_site_flag => 'Y'
,p_region_1 => l_region_1
,p_region_2 => l_region_2
,p_region_3 => l_region_3
,p_ship_to_site_flag => 'Y'
,p_style => l_style
,p_telephone_number_1 => l_telephone_number_1
,p_telephone_number_2 => l_telephone_number_2
,p_telephone_number_3 => l_telephone_number_3
,p_town_or_city => l_town_or_city
,p_loc_information13 => l_loc_information13
,p_loc_information14 => l_loc_information14
,p_loc_information15 => l_loc_information15
,p_loc_information16 => l_loc_information16
,p_loc_information17 => l_loc_information17
,p_loc_information18 => l_loc_information18
,p_loc_information19 => l_loc_information19
,p_loc_information20 => l_loc_information20
,p_location_user_key => l_location_code
,p_ship_to_location_code => l_location_code);
select distinct configuration_code,
per_ri_config_utilities.business_group_decision(configuration_code,country_code)
from per_ri_config_country_v
where configuration_code = cp_configuration_code;
select config_information3 country_code
from per_ri_config_information
where configuration_code = cp_configuration_code
and config_information_category = 'CONFIG ENTERPRISE';
l_country_selected PER_BUSINESS_GROUPS.LEGISLATION_CODE%TYPe;
select legislation_code into l_country_selected from per_business_groups
where business_group_id = fnd_profile.value('PER_BUSINESS_GROUP_ID');
select security_group_name into l_security_group_name
from fnd_security_groups_tl
where security_group_id = fnd_global.security_group_id
and language = userenv('LANG');
select enterprise_id into l_enterprise_id from per_ent_security_groups
where business_group_id = fnd_profile.value('PER_BUSINESS_GROUP_ID');
hr_utility.set_location('The Legislation Code is '|| l_country_selected, 43);
hr_utility.set_location('The name selected is '|| l_bg_country_name, 44) ;
IF l_bg_country_name = l_country_selected AND
l_multi_tenancy AND l_system_model = 'B' AND l_sec_group_id <> '0'
AND l_enterprise_id IS NOT NULL
THEN
hr_utility.set_location('The BG has to be skipped', 90000);
hrdpp_create_business_group.insert_batch_lines
(p_batch_id => p_batch_header_id
,p_link_value => per_ri_config_main.g_global_dp_link_value
,p_user_sequence => 20
,p_effective_date => g_config_effective_date
,p_language_code => hr_api.userenv_lang
,p_date_from => g_config_effective_date
,p_name => l_business_group_name
,p_type => null
,p_internal_external_flag => 'INT'
,p_short_name => l_business_group_name
,p_emp_gen_method => 'A'
,p_app_gen_method => 'A'
,p_cwk_gen_method => 'A'
,p_legislation_code => l_legislation_code
,p_currency_code => l_currency_code
,p_fiscal_year_start => null
,p_min_work_age => null
,p_max_work_age => null
,p_location_code => null
,p_org_user_key => l_business_group_name || sysdate
,p_grade_flex_stru_code => l_grade_flex_stru_code
,p_group_flex_stru_code => per_ri_config_main.g_global_pea_structure_name
,p_job_flex_stru_code => l_job_flex_stru_code
,p_cost_flex_stru_code => per_ri_config_main.g_global_cst_structure_name
,p_position_flex_stru_code => l_position_flex_stru_code
,p_security_group_name => l_security_group_name
,p_competence_flex_stru_code => per_ri_config_main.g_global_cmp_structure_name);
if per_ri_config_utilities.check_selected_product
(p_configuration_code => p_configuration_code
,p_product_name => 'PER') then
l_per_post_install := per_ri_config_utilities.legislation_support
(p_legislation_code => l_legislation_code
,p_application_short_name => 'PER');
if per_ri_config_utilities.check_selected_product
(p_configuration_code => p_configuration_code
,p_product_name => 'PAY') then
l_per_post_install := per_ri_config_utilities.legislation_support
(p_legislation_code => l_legislation_code
,p_application_short_name => 'PAY');