The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_update1 DATE;
l_update2 DATE;
(l_token = 'LAST_UPDATED_BY') or
(l_token = 'OWNER') or
(l_token = 'LAST_UPDATE_DATE') or
(l_token = 'LAST_UPDATE_LOGIN') then
l_column := l_token;
elsif (l_column = 'LAST_UPDATED_BY') then
l_custom_rec.last_updated_by := to_number(l_token);
l_custom_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_custom_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_custom_rec.last_update_login := to_number(l_token);
(l_token = 'LAST_UPDATED_BY') or
(l_token = 'OWNER') or
(l_token = 'LAST_UPDATE_DATE') or
(l_token = 'LAST_UPDATE_LOGIN') then
l_column := l_token;
elsif (l_column = 'LAST_UPDATED_BY') then
l_cust_region_rec.last_updated_by := to_number(l_token);
l_cust_region_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_cust_region_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_cust_region_rec.last_update_login := to_number(l_token);
(l_token = 'LAST_UPDATED_BY') or
(l_token = 'OWNER') or
(l_token = 'LAST_UPDATE_DATE') or
(l_token = 'LAST_UPDATE_LOGIN') then
l_column := l_token;
elsif (l_column = 'LAST_UPDATED_BY') then
l_cust_reg_item_rec.last_updated_by := to_number(l_token);
l_cust_reg_item_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_cust_reg_item_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_cust_reg_item_rec.last_update_login := to_number(l_token);
(l_token = 'LAST_UPDATED_BY') or
(l_token = 'OWNER') or
(l_token = 'LAST_UPDATE_DATE') or
(l_token = 'LAST_UPDATE_LOGIN') then
l_column := l_token;
elsif (l_column = 'LAST_UPDATED_BY') then
l_criteria_rec.last_updated_by := to_number(l_token);
l_criteria_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_criteria_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_criteria_rec.last_update_login := to_number(l_token);
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_CUSTOM_PVT.UPDATE_CUSTOM (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => l_custom_tbl(l_index).customization_appl_id,
p_custom_code => l_custom_tbl(l_index).customization_code,
p_region_application_id => l_custom_tbl(l_index).region_appl_id,
p_region_code => l_custom_tbl(l_index).region_code,
p_verticalization_id => l_custom_tbl(l_index).verticalization_id,
p_localization_code => l_custom_tbl(l_index).localization_code,
p_org_id => l_custom_tbl(l_index).org_id,
p_site_id => l_custom_tbl(l_index).site_id,
p_responsibility_id => l_custom_tbl(l_index).responsibility_id,
p_web_user_id => l_custom_tbl(l_index).web_user_id,
p_default_customization_flag => l_custom_tbl(l_index).default_customization_flag,
p_customization_level_id => l_custom_tbl(l_index).customization_level_id,
p_developer_mode => l_custom_tbl(l_index).developer_mode,
p_reference_path => l_custom_tbl(l_index).reference_path,
p_function_name => l_custom_tbl(l_index).function_name,
p_start_date_Active => l_custom_tbl(l_index).start_date_Active,
p_end_date_active => l_custom_tbl(l_index).end_date_active,
p_name => l_custom_tbl(l_index).name,
p_description => l_custom_Tbl(l_index).description,
p_created_by => l_custom_tbl(l_index).created_by,
p_creation_date => l_custom_tbl(l_index).creation_date,
p_last_updated_by => l_custom_tbl(l_index).last_updated_by,
p_last_update_date => l_custom_tbl(l_index).last_update_date,
p_last_update_login => l_custom_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
elsif (AK_UPLOAD_GRP.G_NO_CUSTOM_UPDATE) then
-- do not update customized data
l_error_key_info := 'CUSTOMIZATION CAPPLID='||to_char(l_custom_tbl(l_index).customization_appl_id)||
' CCODE='||l_custom_tbl(l_index).customization_code||' RAPPLID='||
to_char(l_custom_tbl(l_index).region_appl_id)||' RCODE='||
l_custom_tbl(l_index).region_code;
select ac.last_updated_by, act.last_updated_by,
ac.last_update_date, act.last_update_date
into l_user_id1, l_user_id2, l_update1, l_update2
from ak_customizations ac, ak_customizations_tl act
where ac.customization_application_id = l_custom_tbl(l_index).customization_appl_id
and ac.customization_code = l_custom_tbl(l_index).customization_code
and ac.region_application_id = l_custom_tbl(l_index).region_appl_id
and ac.region_code = l_custom_tbl(l_index).region_code
and ac.customization_application_id = act.customization_application_id
and ac.customization_code = act.customization_code
and ac.region_application_id = act.region_application_id
and ac.region_code = act.region_code
and act.language = userenv('LANG');
if (AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_custom_tbl(l_index).created_by,
p_creation_date => l_custom_tbl(l_index).creation_date,
p_last_updated_by => l_custom_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_custom_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_custom_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE') and
AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_custom_tbl(l_index).created_by,
p_creation_date => l_custom_tbl(l_index).creation_date,
p_last_updated_by => l_custom_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id2,
p_last_update_date => l_custom_tbl(l_index).last_update_date,
p_db_last_update_date => l_update2,
p_last_update_login => l_custom_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE')) then
AK_CUSTOM_PVT.UPDATE_CUSTOM (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => l_custom_tbl(l_index).customization_appl_id,
p_custom_code => l_custom_tbl(l_index).customization_code,
p_region_application_id => l_custom_tbl(l_index).region_appl_id,
p_region_code => l_custom_tbl(l_index).region_code,
p_verticalization_id => l_custom_tbl(l_index).verticalization_id,
p_localization_code => l_custom_tbl(l_index).localization_code,
p_org_id => l_custom_tbl(l_index).org_id,
p_site_id => l_custom_tbl(l_index).site_id,
p_responsibility_id => l_custom_tbl(l_index).responsibility_id,
p_web_user_id => l_custom_tbl(l_index).web_user_id,
p_default_customization_flag => l_custom_tbl(l_index).default_customization_flag,
p_customization_level_id => l_custom_tbl(l_index).customization_level_id,
p_developer_mode => l_custom_tbl(l_index).developer_mode,
p_reference_path => l_custom_tbl(l_index).reference_path,
p_function_name => l_custom_tbl(l_index).function_name,
p_start_date_active => l_custom_tbl(l_index).start_date_Active,
p_end_date_active => l_custom_tbl(l_index).end_date_active,
p_name => l_custom_tbl(l_index).name,
p_description => l_custom_tbl(l_index).description,
p_created_by => l_custom_tbl(l_index).created_by,
p_creation_date => l_custom_tbl(l_index).creation_date,
p_last_updated_by => l_custom_tbl(l_index).last_updated_by,
p_last_update_date => l_custom_tbl(l_index).last_update_date,
p_last_update_login => l_custom_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
end if; -- /* if G_UPDATE_MODE G_NC_UPDATE_MODE*/
p_last_updated_by => l_custom_tbl(l_index).last_updated_by,
p_last_update_date => l_custom_tbl(l_index).last_update_date,
p_last_update_login => l_custom_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_CUSTOM_PVT.UPDATE_CUST_REGION (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => l_cust_region_tbl(l_index).customization_appl_id,
p_custom_code => l_cust_region_tbl(l_index).customization_code,
p_region_application_id => l_cust_region_tbl(l_index).region_appl_id,
p_region_code => l_cust_region_tbl(l_index).region_code,
p_property_name => l_cust_region_tbl(l_index).property_name,
p_property_varchar2_value => l_cust_region_tbl(l_index).property_varchar2_value,
p_property_number_value => l_cust_region_tbl(l_index).property_number_value,
p_criteria_join_condition => l_cust_region_tbl(l_index).criteria_join_condition,
p_property_varchar2_value_tl => l_cust_region_tbl(l_index).property_varchar2_value_tl,
p_created_by => l_cust_region_tbl(l_index).created_by,
p_creation_date => l_cust_region_tbl(l_index).creation_date,
p_last_updated_by => l_cust_region_tbl(l_index).last_updated_by,
p_last_update_date => l_cust_region_tbl(l_index).last_update_date,
p_last_update_login => l_cust_region_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
elsif (AK_UPLOAD_GRP.G_NO_CUSTOM_UPDATE) then
-- do not update customized data
l_error_key_info := 'CUST REG CAPPLID='||to_char(l_cust_region_tbl(l_index).customization_appl_id)||
' CCODE='||l_cust_region_tbl(l_index).customization_code||' RAPPLID='||
to_char(l_cust_region_tbl(l_index).region_appl_id)||' RCODE='||
l_cust_region_tbl(l_index).region_code||' PNAME='||
l_cust_region_tbl(l_index).property_name;
select ac.last_updated_by, act.last_updated_by,
ac.last_update_date, act.last_update_date
into l_user_id1, l_user_id2, l_update1, l_update2
from ak_custom_regions ac, ak_custom_regions_tl act
where ac.customization_application_id = l_cust_region_tbl(l_index).customization_appl_id
and ac.customization_code = l_cust_region_tbl(l_index).customization_code
and ac.region_application_id = l_cust_region_tbl(l_index).region_appl_id
and ac.region_code = l_cust_region_tbl(l_index).region_code
and ac.property_name = l_cust_region_tbl(l_index).property_name
and ac.customization_application_id = act.customization_application_id
and ac.customization_code = act.customization_code
and ac.region_application_id = act.region_application_id
and ac.region_code = act.region_code
and ac.property_name = act.property_name
and act.language = userenv('LANG');
if (AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_cust_region_tbl(l_index).created_by,
p_creation_date => l_cust_region_tbl(l_index).creation_date,
p_last_updated_by => l_cust_region_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_cust_region_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_cust_region_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE') and
AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_cust_region_tbl(l_index).created_by,
p_creation_date => l_cust_region_tbl(l_index).creation_date,
p_last_updated_by => l_cust_region_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id2,
p_last_update_date => l_cust_region_tbl(l_index).last_update_date,
p_db_last_update_date => l_update2,
p_last_update_login => l_cust_region_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE')) then
AK_CUSTOM_PVT.UPDATE_CUST_REGION (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => l_cust_region_tbl(l_index).customization_appl_id,
p_custom_code => l_cust_region_tbl(l_index).customization_code,
p_region_application_id => l_cust_region_tbl(l_index).region_appl_id,
p_region_code => l_cust_region_tbl(l_index).region_code,
p_property_name => l_cust_region_tbl(l_index).property_name,
p_property_varchar2_value => l_cust_region_tbl(l_index).property_varchar2_value,
p_property_number_value => l_cust_region_tbl(l_index).property_number_value,
p_criteria_join_condition => l_cust_region_tbl(l_index).criteria_join_condition,
p_property_varchar2_value_tl => l_cust_region_tbl(l_index).property_varchar2_value_tl,
p_created_by => l_cust_region_tbl(l_index).created_by,
p_creation_date => l_cust_region_tbl(l_index).creation_date,
p_last_updated_by => l_cust_region_tbl(l_index).last_updated_by,
p_last_update_date => l_cust_region_tbl(l_index).last_update_date,
p_last_update_login => l_cust_region_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
end if; -- /* if G_UPDATE_MODE G_NC_UPDATE_MODE*/
p_last_updated_by => l_cust_region_tbl(l_index).last_updated_by,
p_last_update_date => l_cust_region_tbl(l_index).last_update_date,
p_last_update_login => l_cust_region_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_CUSTOM_PVT.UPDATE_CUST_REG_ITEM (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => l_cust_reg_item_tbl(l_index).customization_appl_id,
p_custom_code => l_cust_reg_item_tbl(l_index).customization_code,
p_region_application_id => l_cust_reg_item_tbl(l_index).region_appl_id,
p_region_code => l_cust_reg_item_tbl(l_index).region_code,
p_attribute_appl_id => l_cust_reg_item_tbl(l_index).attr_appl_id,
p_attribute_code => l_cust_reg_item_tbl(l_index).attr_code,
p_property_name => l_cust_reg_item_tbl(l_index).property_name,
p_property_varchar2_value => l_cust_reg_item_tbl(l_index).property_varchar2_value,
p_property_number_value => l_cust_reg_item_tbl(l_index).property_number_value,
p_property_date_value => l_cust_reg_item_tbl(l_index).property_date_value,
p_property_varchar2_value_tl => l_cust_reg_item_tbl(l_index).property_varchar2_value_tl,
p_created_by => l_cust_reg_item_tbl(l_index).created_by,
p_creation_date => l_cust_reg_item_tbl(l_index).creation_date,
p_last_updated_by => l_cust_reg_item_tbl(l_index).last_updated_by,
p_last_update_date => l_cust_reg_item_tbl(l_index).last_update_date,
p_last_update_login => l_cust_reg_item_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
elsif (AK_UPLOAD_GRP.G_NO_CUSTOM_UPDATE) then
l_error_key_info := 'CUST REG ITEM CAPPLID='||to_char(l_cust_reg_item_tbl(l_index).customization_appl_id)||
' CCODE='||l_cust_reg_item_tbl(l_index).customization_code||' RAPPLID='||
to_char(l_cust_reg_item_tbl(l_index).region_appl_id)||' RCODE='||
l_cust_reg_item_tbl(l_index).region_code||' AAPPLID='||
to_char(l_cust_reg_item_tbl(l_index).attr_appl_id)||' ACODE='||
l_cust_reg_item_tbl(l_index).attr_code||' PNAME='||
l_cust_reg_item_tbl(l_index).property_name;
select ac.last_updated_by, act.last_updated_by,
ac.last_update_date, act.last_update_date
into l_user_id1, l_user_id2, l_update1, l_update2
from ak_custom_region_items ac, ak_custom_region_items_tl act
where ac.customization_application_id = l_cust_reg_item_tbl(l_index).customization_appl_id
and ac.customization_code = l_cust_reg_item_tbl(l_index).customization_code
and ac.region_application_id = l_cust_reg_item_tbl(l_index).region_appl_id
and ac.region_code = l_cust_reg_item_tbl(l_index).region_code
and ac.property_name = l_cust_reg_item_tbl(l_index).property_name
and ac.attribute_application_id = l_cust_reg_item_tbl(l_index).attr_appl_id
and ac.attribute_code = l_cust_reg_item_tbl(l_index).attr_code
and ac.customization_application_id = act.customization_application_id
and ac.customization_code = act.customization_code
and ac.region_application_id = act.region_application_id
and ac.region_code = act.region_code
and ac.property_name = act.property_name
and ac.attribute_application_id = act.attribute_application_id
and ac.attribute_code = act.attribute_code
and act.language = userenv('LANG');
if (AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_cust_reg_item_tbl(l_index).created_by,
p_creation_date => l_cust_reg_item_tbl(l_index).creation_date,
p_last_updated_by => l_cust_reg_item_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_cust_reg_item_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_cust_reg_item_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE') and
AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_cust_reg_item_tbl(l_index).created_by,
p_creation_date => l_cust_reg_item_tbl(l_index).creation_date,
p_last_updated_by => l_cust_reg_item_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id2,
p_last_update_date => l_cust_reg_item_tbl(l_index).last_update_date,
p_db_last_update_date => l_update2,
p_last_update_login => l_cust_reg_item_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE')) then
AK_CUSTOM_PVT.UPDATE_CUST_REG_ITEM (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => l_cust_reg_item_tbl(l_index).customization_appl_id,
p_custom_code => l_cust_reg_item_tbl(l_index).customization_code,
p_region_application_id => l_cust_reg_item_tbl(l_index).region_appl_id,
p_region_code => l_cust_reg_item_tbl(l_index).region_code,
p_attribute_appl_id => l_cust_reg_item_tbl(l_index).attr_appl_id,
p_attribute_code => l_cust_reg_item_tbl(l_index).attr_code,
p_property_name => l_cust_reg_item_tbl(l_index).property_name,
p_property_varchar2_value => l_cust_reg_item_tbl(l_index).property_varchar2_value,
p_property_number_value => l_cust_reg_item_tbl(l_index).property_number_value,
p_property_date_value => l_cust_reg_item_tbl(l_index).property_date_value,
p_property_varchar2_value_tl => l_cust_reg_item_tbl(l_index).property_varchar2_value_tl,
p_created_by => l_cust_reg_item_tbl(l_index).created_by,
p_creation_date => l_cust_reg_item_tbl(l_index).creation_date,
p_last_updated_by => l_cust_reg_item_tbl(l_index).last_updated_by,
p_last_update_date => l_cust_reg_item_tbl(l_index).last_update_date,
p_last_update_login => l_cust_reg_item_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
end if; -- /* if G_UPDATE_MODE G_NC_UPDATE_MODE*/
p_last_updated_by => l_cust_reg_item_tbl(l_index).last_updated_by,
p_last_update_date => l_cust_reg_item_tbl(l_index).last_update_date,
p_last_update_login => l_cust_reg_item_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_CUSTOM_PVT.UPDATE_CRITERIA (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => l_criteria_tbl(l_index).customization_application_id,
p_custom_code => l_criteria_tbl(l_index).customization_code,
p_region_application_id => l_criteria_tbl(l_index).region_application_id,
p_region_code => l_criteria_tbl(l_index).region_code,
p_attribute_appl_id => l_criteria_tbl(l_index).attribute_application_id,
p_attribute_code => l_criteria_tbl(l_index).attribute_code,
p_sequence_number => l_criteria_tbl(l_index).sequence_number,
p_operation => l_criteria_tbl(l_index).operation,
p_value_varchar2 => l_criteria_tbl(l_index).value_varchar2,
p_value_number => l_criteria_tbl(l_index).value_number,
p_value_date => l_criteria_tbl(l_index).value_date,
p_start_date_active => l_criteria_tbl(l_index).start_date_active,
p_end_date_active => l_criteria_tbl(l_index).end_date_active,
p_created_by => l_criteria_tbl(l_index).created_by,
p_creation_date => l_criteria_tbl(l_index).creation_date,
p_last_updated_by => l_criteria_tbl(l_index).last_updated_by,
p_last_update_date => l_criteria_tbl(l_index).last_update_date,
p_last_update_login => l_criteria_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
elsif (AK_UPLOAD_GRP.G_NO_CUSTOM_UPDATE) then
l_error_key_info := 'CRITERIA CAPPLID='||to_char(l_criteria_tbl(l_index).customization_application_id)||
' CCODE='||l_criteria_tbl(l_index).customization_code||' RAPPLID='||
to_char(l_criteria_tbl(l_index).region_application_id)||' RCODE='||
l_criteria_tbl(l_index).region_code||' AAPPLID='||
to_char(l_criteria_tbl(l_index).attribute_application_id)||' ACODE='||
l_criteria_tbl(l_index).attribute_code;
select last_updated_by, last_update_date into
l_user_id1, l_update1
from ak_criteria ac
where ac.customization_application_id = l_criteria_tbl(l_index).customization_application_id
and ac.customization_code = l_criteria_tbl(l_index).customization_code
and ac.region_application_id = l_criteria_tbl(l_index).region_application_id
and ac.region_code = l_criteria_tbl(l_index).region_code
and ac.sequence_number = l_criteria_tbl(l_index).sequence_number
and ac.attribute_application_id = l_criteria_tbl(l_index).attribute_application_id
and ac.attribute_code = l_criteria_tbl(l_index).attribute_code;
if AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_criteria_tbl(l_index).created_by,
p_creation_date => l_criteria_tbl(l_index).creation_date,
p_last_updated_by => l_criteria_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_criteria_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_criteria_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE') then
AK_CUSTOM_PVT.UPDATE_CRITERIA (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => l_criteria_tbl(l_index).customization_application_id,
p_custom_code => l_criteria_tbl(l_index).customization_code,
p_region_application_id => l_criteria_tbl(l_index).region_application_id,
p_region_code => l_criteria_tbl(l_index).region_code,
p_attribute_appl_id => l_criteria_tbl(l_index).attribute_application_id,
p_attribute_code => l_criteria_tbl(l_index).attribute_code,
p_sequence_number => l_criteria_tbl(l_index).sequence_number,
p_operation => l_criteria_tbl(l_index).operation,
p_value_varchar2 => l_criteria_tbl(l_index).value_varchar2,
p_value_number => l_criteria_tbl(l_index).value_number,
p_value_date => l_criteria_tbl(l_index).value_date,
p_start_date_active => l_criteria_tbl(l_index).start_date_active,
p_end_date_active => l_criteria_tbl(l_index).end_date_active,
p_created_by => l_criteria_tbl(l_index).created_by,
p_creation_date => l_criteria_tbl(l_index).creation_date,
p_last_updated_by => l_criteria_tbl(l_index).last_updated_by,
p_last_update_date => l_criteria_tbl(l_index).last_update_date,
p_last_update_login => l_criteria_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
end if; -- /* if G_UPDATE_MODE G_NC_UPDATE_MODE*/
p_last_updated_by => l_criteria_tbl(l_index).last_updated_by,
p_last_update_date => l_criteria_tbl(l_index).last_update_date,
p_last_update_login => l_criteria_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
l_update1 DATE;
l_update2 DATE;
AK_CUSTOM_PVT.UPDATE_CUSTOM (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => G_CUSTOM_REDO_TBL(l_index).customization_appl_id,
p_custom_code => G_CUSTOM_REDO_TBL(l_index).customization_code,
p_region_application_id => G_CUSTOM_REDO_TBL(l_index).region_appl_id,
p_region_code => G_CUSTOM_REDO_TBL(l_index).region_code,
p_verticalization_id => G_CUSTOM_REDO_TBL(l_index).verticalization_id,
p_localization_code => G_CUSTOM_REDO_TBL(l_index).localization_code,
p_org_id => G_CUSTOM_REDO_TBL(l_index).org_id,
p_site_id => G_CUSTOM_REDO_TBL(l_index).site_id,
p_responsibility_id => G_CUSTOM_REDO_TBL(l_index).responsibility_id,
p_web_user_id => G_CUSTOM_REDO_TBL(l_index).web_user_id,
p_default_customization_flag => G_CUSTOM_REDO_TBL(l_index).default_customization_flag,
p_customization_level_id => G_CUSTOM_REDO_TBL(l_index).customization_level_id,
p_developer_mode => G_CUSTOM_REDO_TBL(l_index).developer_mode,
p_reference_path => G_CUSTOM_REDO_TBL(l_index).reference_path,
p_function_name => G_CUSTOM_REDO_TBL(l_index).function_name,
p_start_date_active => G_CUSTOM_REDO_TBL(l_index).start_date_active,
p_end_date_active => G_CUSTOM_REDO_TBL(l_index).end_date_active,
p_name => G_CUSTOM_REDO_TBL(l_index).name,
p_description => G_CUSTOM_REDO_TBL(l_index).description,
p_created_by => G_CUSTOM_REDO_TBL(l_index).created_by,
p_creation_date => G_CUSTOM_REDO_TBL(l_index).creation_date,
p_last_updated_by => G_CUSTOM_REDO_TBL(l_index).last_updated_by,
p_last_update_date => G_CUSTOM_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CUSTOM_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
p_last_updated_by => G_CUSTOM_REDO_TBL(l_index).lasT_updated_by,
p_last_update_date => G_CUSTOM_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CUSTOM_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
G_CUSTOM_REDO_TBL.DELETE;
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_CUSTOM_PVT.UPDATE_CUST_REGION (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => G_CUST_REGION_REDO_TBL(l_index).customization_appl_id,
p_custom_code => G_CUST_REGION_REDO_TBL(l_index).customization_code,
p_region_application_id => G_CUST_REGION_REDO_TBL(l_index).region_appl_id,
p_region_code => G_CUST_REGION_REDO_TBL(l_index).region_code,
p_property_name => G_CUST_REGION_REDO_TBL(l_index).property_name,
p_property_varchar2_value => G_CUST_REGION_REDO_TBL(l_index).property_varchar2_value,
p_property_number_value => G_CUST_REGION_REDO_TBL(l_index).property_number_value,
p_criteria_join_condition => G_CUST_REGION_REDO_TBL(l_index).criteria_join_condition,
p_property_varchar2_value_tl => G_CUST_REGION_REDO_TBL(l_index).property_varchar2_value_tl,
p_created_by => G_CUST_REGION_REDO_TBL(l_index).created_by,
p_creation_date => G_CUST_REGION_REDO_TBL(l_index).creation_date,
p_last_updated_by => G_CUST_REGION_REDO_TBL(l_index).last_updated_by,
p_last_update_date => G_CUST_REGION_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CUST_REGION_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
elsif (AK_UPLOAD_GRP.G_NO_CUSTOM_UPDATE) then
-- do not update customized data
select ac.last_updated_by, act.last_updated_by,
ac.last_update_date, act.last_update_date
into l_user_id1, l_user_id2, l_update1, l_update2
from ak_custom_regions ac, ak_custom_regions_tl act
where ac.customization_application_id = G_CUST_REGION_REDO_TBL(l_index).customization_appl_id
and ac.customization_code = G_CUST_REGION_REDO_TBL(l_index).customization_code
and ac.region_application_id = G_CUST_REGION_REDO_TBL(l_index).region_appl_id
and ac.region_code = G_CUST_REGION_REDO_TBL(l_index).region_code
and ac.property_name = G_CUST_REGION_REDO_TBL(l_index).property_name
and ac.customization_application_id = act.customization_application_id
and ac.customization_code = act.customization_code
and ac.region_application_id = act.region_application_id
and ac.region_code = act.region_code
and act.language = userenv('LANG');
if (AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => G_CUST_REGION_REDO_TBL(l_index).created_by,
p_creation_date => G_CUST_REGION_REDO_TBL(l_index).creation_date,
p_last_updated_by => G_CUST_REGION_REDO_TBL(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => G_CUST_REGION_REDO_TBL(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => G_CUST_REGION_REDO_TBL(l_index).last_update_login,
p_create_or_update => 'UPDATE') and
AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => G_CUST_REGION_REDO_TBL(l_index).created_by,
p_creation_date => G_CUST_REGION_REDO_TBL(l_index).creation_date,
p_last_updated_by => G_CUST_REGION_REDO_TBL(l_index).last_updated_by,
p_db_last_updated_by => l_user_id2,
p_last_update_date => G_CUST_REGION_REDO_TBL(l_index).last_update_date,
p_db_last_update_date => l_update2,
p_last_update_login => G_CUST_REGION_REDO_TBL(l_index).last_update_login,
p_create_or_update => 'UPDATE')) then
AK_CUSTOM_PVT.UPDATE_CUST_REGION (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => G_CUST_REGION_REDO_TBL(l_index).customization_appl_id,
p_custom_code => G_CUST_REGION_REDO_TBL(l_index).customization_code,
p_region_application_id => G_CUST_REGION_REDO_TBL(l_index).region_appl_id,
p_region_code => G_CUST_REGION_REDO_TBL(l_index).region_code,
p_property_name => G_CUST_REGION_REDO_TBL(l_index).property_name,
p_property_varchar2_value => G_CUST_REGION_REDO_TBL(l_index).property_varchar2_value,
p_property_number_value => G_CUST_REGION_REDO_TBL(l_index).property_number_value,
p_criteria_join_condition => G_CUST_REGION_REDO_TBL(l_index).criteria_join_condition,
p_property_varchar2_value_tl => G_CUST_REGION_REDO_TBL(l_index).property_varchar2_value_tl,
p_created_by => G_CUST_REGION_REDO_TBL(l_index).created_by,
p_creation_date => G_CUST_REGION_REDO_TBL(l_index).creation_date,
p_last_updated_by => G_CUST_REGION_REDO_TBL(l_index).last_updated_by,
p_last_update_date => G_CUST_REGION_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CUST_REGION_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
end if; -- /* if G_UPDATE_MODE G_NC_UPDATE_MODE*/
p_last_updated_by => G_CUST_REGION_REDO_TBL(l_index).last_updated_by,
p_last_update_date => G_CUST_REGION_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CUST_REGION_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
G_CUST_REGION_REDO_TBL.DELETE;
AK_CUSTOM_PVT.UPDATE_CUST_REG_ITEM (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => G_CUST_REG_ITEM_REDO_TBL(l_index).customization_appl_id,
p_custom_code => G_CUST_REG_ITEM_REDO_TBL(l_index).customization_code,
p_region_application_id => G_CUST_REG_ITEM_REDO_TBL(l_index).region_appl_id,
p_region_code => G_CUST_REG_ITEM_REDO_TBL(l_index).region_code,
p_attribute_appl_id => G_CUST_REG_ITEM_REDO_TBL(l_index).attr_appl_id,
p_attribute_code => G_CUST_REG_ITEM_REDO_TBL(l_index).attr_code,
p_property_name => G_CUST_REG_ITEM_REDO_TBL(l_index).property_name,
p_property_varchar2_value => G_CUST_REG_ITEM_REDO_TBL(l_index).property_varchar2_value,
p_property_number_value => G_CUST_REG_ITEM_REDO_TBL(l_index).property_number_value,
p_property_date_value => G_CUST_REG_ITEM_REDO_TBL(l_index).property_date_value,
p_property_varchar2_value_tl => G_CUST_REG_ITEM_REDO_TBL(l_index).property_varchar2_value_tl,
p_created_by => G_CUST_REG_ITEM_REDO_TBL(l_index).created_by,
p_creation_date => G_CUST_REG_ITEM_REDO_TBL(l_index).creation_date,
p_last_updated_by => G_CUST_REG_ITEM_REDO_TBL(l_index).last_updated_by,
p_last_update_date => G_CUST_REG_ITEM_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CUST_REG_ITEM_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
p_last_updated_by => G_CUST_REG_ITEM_REDO_TBL(l_index).last_updateD_by,
p_last_update_date => G_CUST_REG_ITEM_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CUST_REG_ITEM_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
G_CUST_REG_ITEM_REDO_TBL.DELETE;
AK_CUSTOM_PVT.UPDATE_CRITERIA (
p_validation_level => p_validation_level,
p_api_version_number => 1.0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_custom_appl_id => G_CRITERIA_REDO_TBL(l_index).customization_application_id,
p_custom_code => G_CRITERIA_REDO_TBL(l_index).customization_code,
p_region_application_id => G_CRITERIA_REDO_TBL(l_index).region_application_id,
p_region_code => G_CRITERIA_REDO_TBL(l_index).region_code,
p_attribute_appl_id => G_CRITERIA_REDO_TBL(l_index).attribute_application_id,
p_attribute_code => G_CRITERIA_REDO_TBL(l_index).attribute_code,
p_sequence_number => G_CRITERIA_REDO_TBL(l_index).sequence_number,
p_operation => G_CRITERIA_REDO_TBL(l_index).operation,
p_value_varchar2 => G_CRITERIA_REDO_TBL(l_index).value_varchar2,
p_value_number => G_CRITERIA_REDO_TBL(l_index).value_number,
p_value_date => G_CRITERIA_REDO_TBL(l_index).value_date,
p_start_date_active => G_CRITERIA_REDO_TBL(l_index).start_date_active,
p_end_date_active => G_CRITERIA_REDO_TBL(l_index).end_date_active,
p_created_by => G_CRITERIA_REDO_TBL(l_index).created_by,
p_creation_date => G_CRITERIA_REDO_TBL(l_index).creation_date,
p_last_updated_by => G_CRITERIA_REDO_TBL(l_index).last_updated_by,
p_last_update_date => G_CRITERIA_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CRITERIA_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
p_last_updated_by => G_CRITERIA_REDO_TBL(l_index).last_updated_by,
p_last_update_date => G_CRITERIA_REDO_TBL(l_index).last_update_date,
p_last_update_login => G_CRITERIA_REDO_TBL(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
G_CRITERIA_REDO_TBL.DELETE;
G_CUSTOM_REDO_TBL.DELETE;
G_CUST_REGION_REDO_TBL.DELETE;
G_CUST_REG_ITEM_REDO_TBL.DELETE;
G_CRITERIA_REDO_TBL.DELETE;
G_CUSTOM_REDO_TBL.DELETE;
G_CUST_REGION_REDO_TBL.DELETE;
G_CUST_REG_ITEM_REDO_TBL.DELETE;
G_CRITERIA_REDO_TBL.DELETE;