The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure UPDATE_OBJECT (
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
p_api_version_number IN NUMBER,
p_init_msg_tbl IN BOOLEAN := FALSE,
p_msg_count OUT NOCOPY NUMBER,
p_msg_data OUT NOCOPY VARCHAR2,
p_return_status OUT NOCOPY VARCHAR2,
p_database_object_name IN VARCHAR2,
p_name IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_description IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_application_id IN NUMBER := FND_API.G_MISS_NUM,
p_primary_key_name IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_defaulting_api_pkg IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_defaulting_api_proc IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_validation_api_pkg IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_validation_api_proc IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute_category IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute1 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute2 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute3 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute4 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute5 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute6 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute7 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute8 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute9 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute10 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute11 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute12 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute13 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute14 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute15 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_created_by IN NUMBER := FND_API.G_MISS_NUM,
p_creation_date IN DATE := FND_API.G_MISS_DATE,
p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
p_last_update_date IN DATE := FND_API.G_MISS_DATE,
p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
p_pass IN NUMBER,
p_copy_redo_flag IN OUT NOCOPY BOOLEAN
) is
cursor l_get_row_csr (lang_parm varchar2) is
select *
from AK_OBJECTS
where DATABASE_OBJECT_NAME = p_database_object_name
for update of APPLICATION_ID;
select *
from AK_OBJECTS_TL
where DATABASE_OBJECT_NAME = p_database_object_name
and LANGUAGE = lang_parm
for update of NAME;
l_api_name CONSTANT varchar2(30) := 'Update_Object';
l_last_update_date date;
l_last_update_login number;
l_last_updated_by number;
savepoint start_update_object;
select userenv('LANG') into l_lang
from dual;
p_caller => AK_ON_OBJECTS_PVT.G_UPDATE,
p_pass => p_pass
) then
if (p_pass = 1) then
p_copy_redo_flag := TRUE;
if (p_last_updated_by <> FND_API.G_MISS_NUM) then
l_last_updated_by := p_last_updated_by;
if (p_last_update_date <> FND_API.G_MISS_DATE) then
l_last_update_date := p_last_update_date;
if (p_last_update_login <> FND_API.G_MISS_NUM) then
l_last_update_login := p_last_update_login;
if AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_created_by,
p_creation_date => l_creation_date,
p_last_updated_by => l_last_updated_by,
p_db_last_updated_by => l_objects_rec.last_updated_by,
p_last_update_date => l_last_update_date,
p_db_last_update_date => l_objects_rec.last_update_date,
p_last_update_login => l_last_update_login,
p_create_or_update => 'UPDATE') then
update AK_OBJECTS set
APPLICATION_ID = l_objects_rec.application_id,
PRIMARY_KEY_NAME = l_objects_rec.primary_key_name,
DEFAULTING_API_PKG = l_objects_rec.defaulting_api_pkg,
DEFAULTING_API_PROC = l_objects_rec.defaulting_api_proc,
VALIDATION_API_PKG = l_objects_rec.validation_api_pkg,
VALIDATION_API_PROC = l_objects_rec.validation_api_proc,
ATTRIBUTE_CATEGORY = l_objects_rec.attribute_category,
ATTRIBUTE1 = l_objects_rec.attribute1,
ATTRIBUTE2 = l_objects_rec.attribute2,
ATTRIBUTE3 = l_objects_rec.attribute3,
ATTRIBUTE4 = l_objects_rec.attribute4,
ATTRIBUTE5 = l_objects_rec.attribute5,
ATTRIBUTE6 = l_objects_rec.attribute6,
ATTRIBUTE7 = l_objects_rec.attribute7,
ATTRIBUTE8 = l_objects_rec.attribute8,
ATTRIBUTE9 = l_objects_rec.attribute9,
ATTRIBUTE10 = l_objects_rec.attribute10,
ATTRIBUTE11 = l_objects_rec.attribute11,
ATTRIBUTE12 = l_objects_rec.attribute12,
ATTRIBUTE13 = l_objects_rec.attribute13,
ATTRIBUTE14 = l_objects_rec.attribute14,
ATTRIBUTE15 = l_objects_rec.attribute15,
LAST_UPDATE_DATE = l_last_update_date,
LAST_UPDATED_BY = l_last_updated_by,
LAST_UPDATE_LOGIN = l_last_update_login
where DATABASE_OBJECT_NAME = p_database_object_name;
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_UPDATE_FAILED');
update AK_OBJECTS_TL set
NAME = l_objects_tl_rec.name,
DESCRIPTION = l_objects_tl_rec.description,
LAST_UPDATE_DATE = l_last_update_date,
LAST_UPDATED_BY = l_last_updated_by,
LAST_UPDATE_LOGIN = l_last_update_login,
SOURCE_LANG = l_lang
where DATABASE_OBJECT_NAME = p_database_object_name
and l_lang in (LANGUAGE, SOURCE_LANG);
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_UPDATE_FAILED');
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_UPDATED');
rollback to start_update_object;
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_NOT_UPDATED');
rollback to start_update_object;
rollback to start_update_object;
end UPDATE_OBJECT;
procedure UPDATE_ATTRIBUTE (
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
p_api_version_number IN NUMBER,
p_init_msg_tbl IN BOOLEAN := FALSE,
p_msg_count OUT NOCOPY NUMBER,
p_msg_data OUT NOCOPY VARCHAR2,
p_return_status OUT NOCOPY VARCHAR2,
p_database_object_name IN VARCHAR2,
p_attribute_application_id IN NUMBER,
p_attribute_code IN VARCHAR2,
p_column_name IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute_label_length IN NUMBER := FND_API.G_MISS_NUM,
p_display_value_length IN NUMBER := FND_API.G_MISS_NUM,
p_bold IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_italic IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_vertical_alignment IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_horizontal_alignment IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_data_source_type IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_data_storage_type IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_table_name IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_base_table_column_name IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_required_flag IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_default_value_varchar2 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_default_value_number IN NUMBER := FND_API.G_MISS_NUM,
p_default_value_date IN DATE := FND_API.G_MISS_DATE,
p_lov_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
p_lov_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_lov_foreign_key_name IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_lov_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
p_lov_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_defaulting_api_pkg IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_defaulting_api_proc IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_validation_api_pkg IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_validation_api_proc IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute_category IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute1 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute2 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute3 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute4 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute5 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute6 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute7 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute8 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute9 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute10 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute11 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute12 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute13 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute14 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute15 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute_label_long IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute_label_short IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_created_by IN NUMBER := FND_API.G_MISS_NUM,
p_creation_date IN DATE := FND_API.G_MISS_DATE,
p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
p_last_update_date IN DATE := FND_API.G_MISS_DATE,
p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
p_pass IN NUMBER,
p_copy_redo_flag IN OUT NOCOPY BOOLEAN
) is
cursor l_get_row_csr is
select *
from AK_OBJECT_ATTRIBUTES
where DATABASE_OBJECT_NAME = p_database_object_name
and ATTRIBUTE_APPLICATION_ID = p_attribute_application_id
and ATTRIBUTE_CODE = p_attribute_code
for update of ATTRIBUTE_APPLICATION_ID;
select *
from AK_OBJECT_ATTRIBUTES_TL
where DATABASE_OBJECT_NAME = p_database_object_name
and ATTRIBUTE_APPLICATION_ID = p_attribute_application_id
and ATTRIBUTE_CODE = p_attribute_code
and LANGUAGE = lang_parm
for update of ATTRIBUTE_APPLICATION_ID;
l_api_name CONSTANT varchar2(30) := 'Update_Attribute';
l_last_update_date date;
l_last_update_login number;
l_last_updated_by number;
savepoint start_update_attribute;
select userenv('LANG') into l_lang
from dual;
p_caller => AK_ON_OBJECTS_PVT.G_UPDATE,
p_pass => p_pass
) then
-- Do not raise an error if it's the first pass
if (p_pass = 1) then
p_copy_redo_flag := TRUE;
if (p_last_updated_by <> FND_API.G_MISS_NUM) then
l_last_updated_by := p_last_updated_by;
if (p_last_update_date <> FND_API.G_MISS_DATE) then
l_last_update_date := p_last_update_date;
if (p_last_update_login <> FND_API.G_MISS_NUM) then
l_last_update_login := p_last_update_login;
if AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_created_by,
p_creation_date => l_creation_date,
p_last_updated_by => l_last_updated_by,
p_db_last_updated_by => l_attributes_rec.last_updated_by,
p_last_update_date => l_last_update_date,
p_db_last_update_date => l_attributes_rec.last_update_date,
p_last_update_login => l_last_update_login,
p_create_or_update => 'UPDATE') then
update AK_OBJECT_ATTRIBUTES set
COLUMN_NAME = l_attributes_rec.column_name,
ATTRIBUTE_LABEL_LENGTH = l_attributes_rec.attribute_label_length,
DISPLAY_VALUE_LENGTH = l_attributes_rec.display_value_length,
BOLD = l_attributes_rec.bold,
ITALIC = l_attributes_rec.italic,
VERTICAL_ALIGNMENT = l_attributes_rec.vertical_alignment,
HORIZONTAL_ALIGNMENT = l_attributes_rec.horizontal_alignment,
DATA_SOURCE_TYPE = l_attributes_rec.data_source_type,
DATA_STORAGE_TYPE = l_attributes_rec.data_storage_type,
TABLE_NAME = l_attributes_rec.table_name,
BASE_TABLE_COLUMN_NAME = l_attributes_rec.base_table_column_name,
REQUIRED_FLAG = l_attributes_rec.required_flag,
DEFAULT_VALUE_VARCHAR2 = l_attributes_rec.default_value_varchar2,
DEFAULT_VALUE_NUMBER = l_attributes_rec.default_value_number,
DEFAULT_VALUE_DATE = l_attributes_rec.default_value_date,
LOV_REGION_APPLICATION_ID = l_attributes_rec.lov_region_application_id,
LOV_REGION_CODE = l_attributes_rec.lov_region_code,
LOV_FOREIGN_KEY_NAME = l_attributes_rec.lov_foreign_key_name,
LOV_ATTRIBUTE_APPLICATION_ID =
l_attributes_rec.lov_attribute_application_id,
LOV_ATTRIBUTE_CODE = l_attributes_rec.lov_attribute_code,
DEFAULTING_API_PKG = l_attributes_rec.defaulting_api_pkg,
DEFAULTING_API_PROC = l_attributes_rec.defaulting_api_proc,
VALIDATION_API_PKG = l_attributes_rec.validation_api_pkg,
VALIDATION_API_PROC = l_attributes_rec.validation_api_proc,
ATTRIBUTE_CATEGORY = l_attributes_rec.attribute_category,
ATTRIBUTE1 = l_attributes_rec.attribute1,
ATTRIBUTE2 = l_attributes_rec.attribute2,
ATTRIBUTE3 = l_attributes_rec.attribute3,
ATTRIBUTE4 = l_attributes_rec.attribute4,
ATTRIBUTE5 = l_attributes_rec.attribute5,
ATTRIBUTE6 = l_attributes_rec.attribute6,
ATTRIBUTE7 = l_attributes_rec.attribute7,
ATTRIBUTE8 = l_attributes_rec.attribute8,
ATTRIBUTE9 = l_attributes_rec.attribute9,
ATTRIBUTE10 = l_attributes_rec.attribute10,
ATTRIBUTE11 = l_attributes_rec.attribute11,
ATTRIBUTE12 = l_attributes_rec.attribute12,
ATTRIBUTE13 = l_attributes_rec.attribute13,
ATTRIBUTE14 = l_attributes_rec.attribute14,
ATTRIBUTE15 = l_attributes_rec.attribute15,
LAST_UPDATE_DATE = l_last_update_date,
LAST_UPDATED_BY = l_last_updated_by,
LAST_UPDATE_LOGIN = l_last_update_login
where database_object_name = p_database_object_name
and attribute_application_id = p_attribute_application_id
and attribute_code = p_attribute_code;
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_ATTR_UPDATE_FAILED');
update AK_OBJECT_ATTRIBUTES_TL set
ATTRIBUTE_LABEL_LONG = l_attributes_tl_rec.attribute_label_long,
ATTRIBUTE_LABEL_SHORT = l_attributes_tl_rec.attribute_label_short,
LAST_UPDATED_BY = l_last_updated_by,
LAST_UPDATE_DATE = l_last_update_date,
LAST_UPDATE_LOGIN = l_last_update_login,
SOURCE_LANG = l_lang
where database_object_name = p_database_object_name
and attribute_application_id = p_attribute_application_id
and attribute_code = p_attribute_code
and l_lang in (LANGUAGE, SOURCE_LANG);
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_ATTR_UPDATE_FAILED');
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_ATTR_UPDATED');
rollback to start_update_attribute;
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_ATTR_NOT_UPDATED');
rollback to start_update_attribute;
rollback to start_update_attribute;
end UPDATE_ATTRIBUTE;
procedure UPDATE_ATTRIBUTE_NAVIGATION (
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
p_api_version_number IN NUMBER,
p_init_msg_tbl IN BOOLEAN := FALSE,
p_msg_count OUT NOCOPY NUMBER,
p_msg_data OUT NOCOPY VARCHAR2,
p_return_status OUT NOCOPY VARCHAR2,
p_database_object_name IN VARCHAR2,
p_attribute_application_id IN NUMBER,
p_attribute_code IN VARCHAR2,
p_value_varchar2 IN VARCHAR2,
p_value_date IN DATE,
p_value_number IN NUMBER,
p_to_region_appl_id IN NUMBER := FND_API.G_MISS_NUM,
p_to_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute_category IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute1 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute2 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute3 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute4 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute5 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute6 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute7 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute8 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute9 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute10 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute11 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute12 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute13 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute14 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_attribute15 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_created_by IN NUMBER := FND_API.G_MISS_NUM,
p_creation_date IN DATE := FND_API.G_MISS_DATE,
p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
p_last_update_date IN DATE := FND_API.G_MISS_DATE,
p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
p_pass IN NUMBER,
p_copy_redo_flag IN OUT NOCOPY BOOLEAN
) is
cursor l_get_row_1_csr is
select *
from AK_OBJECT_ATTRIBUTE_NAVIGATION
where DATABASE_OBJECT_NAME = p_database_object_name
and ATTRIBUTE_APPLICATION_ID = p_attribute_application_id
and ATTRIBUTE_CODE = p_attribute_code
and VALUE_VARCHAR2 = p_value_varchar2
and VALUE_DATE is null
and VALUE_NUMBER is null
for update of to_region_appl_id;
select *
from AK_OBJECT_ATTRIBUTE_NAVIGATION
where DATABASE_OBJECT_NAME = p_database_object_name
and ATTRIBUTE_APPLICATION_ID = p_attribute_application_id
and ATTRIBUTE_CODE = p_attribute_code
and VALUE_VARCHAR2 is null
and VALUE_DATE = p_value_date
and VALUE_NUMBER is null
for update of to_region_appl_id;
select *
from AK_OBJECT_ATTRIBUTE_NAVIGATION
where DATABASE_OBJECT_NAME = p_database_object_name
and ATTRIBUTE_APPLICATION_ID = p_attribute_application_id
and ATTRIBUTE_CODE = p_attribute_code
and VALUE_VARCHAR2 is null
and VALUE_DATE is null
and VALUE_NUMBER = p_value_number
for update of to_region_appl_id;
l_api_name CONSTANT varchar2(30):= 'Update_Attribute_Navigation';
l_last_update_date date;
l_last_update_login number;
l_last_updated_by number;
savepoint start_update_navigation;
p_caller => AK_ON_OBJECTS_PVT.G_UPDATE,
p_pass => p_pass
) then
-- dbms_output.put_line(l_api_name || ' validation failed');
if (p_last_updated_by <> FND_API.G_MISS_NUM) then
l_last_updated_by := p_last_updated_by;
if (p_last_update_date <> FND_API.G_MISS_DATE) then
l_last_update_date := p_last_update_date;
if (p_last_update_login <> FND_API.G_MISS_NUM) then
l_last_update_login := p_last_update_login;
if AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_created_by,
p_creation_date => l_creation_date,
p_last_updated_by => l_last_updated_by,
p_db_last_updated_by => l_navigation_rec.last_updated_by,
p_last_update_date => l_last_update_date,
p_db_last_update_date => l_navigation_rec.last_update_date,
p_last_update_login => l_last_update_login,
p_create_or_update => 'UPDATE') then
if (p_value_varchar2 is not null) then
update AK_OBJECT_ATTRIBUTE_NAVIGATION set
TO_REGION_APPL_ID = l_navigation_rec.to_region_appl_id,
TO_REGION_CODE = l_navigation_rec.to_region_code,
ATTRIBUTE_CATEGORY = l_navigation_rec.attribute_category,
ATTRIBUTE1 = l_navigation_rec.attribute1,
ATTRIBUTE2 = l_navigation_rec.attribute2,
ATTRIBUTE3 = l_navigation_rec.attribute3,
ATTRIBUTE4 = l_navigation_rec.attribute4,
ATTRIBUTE5 = l_navigation_rec.attribute5,
ATTRIBUTE6 = l_navigation_rec.attribute6,
ATTRIBUTE7 = l_navigation_rec.attribute7,
ATTRIBUTE8 = l_navigation_rec.attribute8,
ATTRIBUTE9 = l_navigation_rec.attribute9,
ATTRIBUTE10 = l_navigation_rec.attribute10,
ATTRIBUTE11 = l_navigation_rec.attribute11,
ATTRIBUTE12 = l_navigation_rec.attribute12,
ATTRIBUTE13 = l_navigation_rec.attribute13,
ATTRIBUTE14 = l_navigation_rec.attribute14,
ATTRIBUTE15 = l_navigation_rec.attribute15,
LAST_UPDATE_DATE = l_last_update_date,
LAST_UPDATED_BY = l_last_updated_by,
LAST_UPDATE_LOGIN = l_last_update_login
where database_object_name = p_database_object_name
and attribute_application_id = p_attribute_application_id
and attribute_code = p_attribute_code
and value_varchar2 = p_value_varchar2
and value_date is null
and value_number is null;
update AK_OBJECT_ATTRIBUTE_NAVIGATION set
TO_REGION_APPL_ID = l_navigation_rec.to_region_appl_id,
TO_REGION_CODE = l_navigation_rec.to_region_code,
LAST_UPDATE_DATE = l_last_update_date,
LAST_UPDATED_BY = l_last_updated_by,
LAST_UPDATE_LOGIN = l_last_update_login
where database_object_name = p_database_object_name
and attribute_application_id = p_attribute_application_id
and attribute_code = p_attribute_code
and value_varchar2 is null
and value_date = p_value_date
and value_number is null;
update AK_OBJECT_ATTRIBUTE_NAVIGATION set
TO_REGION_APPL_ID = l_navigation_rec.to_region_appl_id,
TO_REGION_CODE = l_navigation_rec.to_region_code,
LAST_UPDATE_DATE = l_last_update_date,
LAST_UPDATED_BY = l_last_updated_by,
LAST_UPDATE_LOGIN = l_last_update_login
where database_object_name = p_database_object_name
and attribute_application_id = p_attribute_application_id
and attribute_code = p_attribute_code
and value_varchar2 is null
and value_date is null
and value_number = p_value_number;
FND_MESSAGE.SET_NAME('AK','AK_NAV_UPDATE_FAILED');
FND_MESSAGE.SET_NAME('AK','AK_NAV_UPDATED');
rollback to start_update_navigation;
FND_MESSAGE.SET_NAME('AK','AK_NAV_NOT_UPDATED');
rollback to start_update_navigation;
rollback to start_update_navigation;
end UPDATE_ATTRIBUTE_NAVIGATION;
procedure UPDATE_ATTRIBUTE_VALUE (
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
p_api_version_number IN NUMBER,
p_init_msg_tbl IN BOOLEAN := FALSE,
p_msg_count OUT NOCOPY NUMBER,
p_msg_data OUT NOCOPY VARCHAR2,
p_return_status OUT NOCOPY VARCHAR2,
p_database_object_name IN VARCHAR2,
p_attribute_application_id IN NUMBER,
p_attribute_code IN VARCHAR2,
p_key_value1 IN VARCHAR2,
p_key_value2 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_key_value3 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_key_value4 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_key_value5 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_key_value6 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_key_value7 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_key_value8 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_key_value9 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_key_value10 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_value_varchar2 IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_value_date IN DATE := FND_API.G_MISS_DATE,
p_value_number IN NUMBER := FND_API.G_MISS_NUM,
p_created_by IN NUMBER := FND_API.G_MISS_NUM,
p_creation_date IN DATE := FND_API.G_MISS_DATE,
p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
p_last_update_date IN DATE := FND_API.G_MISS_DATE,
p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
p_loader_timestamp IN DATE := FND_API.G_MISS_DATE
) is
l_api_version_number CONSTANT number := 1.0;
l_api_name CONSTANT varchar2(30) := 'Update_Attribute_Value';
l_last_update_date date;
l_last_update_login number;
l_last_updated_by number;
savepoint start_update_value;
l_sql_stmt := 'select value_varchar2, value_date, value_number ' ||
'from ak_inst_attribute_values ' || l_where_clause;
p_caller => AK_ON_OBJECTS_PVT.G_UPDATE
) then
-- dbms_output.put_line(l_api_name || ' validation failed');
AK_UPLOAD_GRP.G_UPLOAD_DATE := p_last_update_date;
p_last_updated_by => l_last_updated_by,
p_last_update_date => l_last_update_date,
p_last_update_login => l_last_update_login);
l_last_updated_by := p_last_updated_by;
l_last_update_login := p_last_update_login;
l_sql_stmt := 'update AK_INST_ATTRIBUTE_VALUES set ' ||
'VALUE_VARCHAR2 = :value_varchar2, ' ||
'VALUE_DATE = :value_date, ' ||
'VALUE_NUMBER = :value_number, ' ||
'LAST_UPDATE_DATE = :last_update_date, ' ||
'LAST_UPDATED_BY = :last_updated_by, ' ||
'LAST_UPDATE_LOGIN = :last_update_login ' ||
l_where_clause;
dbms_sql.bind_variable(l_sql_csr, 'last_update_date', l_last_update_date);
dbms_sql.bind_variable(l_sql_csr, 'last_updated_by', l_last_updated_by);
dbms_sql.bind_variable(l_sql_csr, 'last_update_login', l_last_update_login);
FND_MESSAGE.SET_NAME('AK','AK_UPDATE_FAILED');
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_UPDATED');
rollback to start_update_value;
FND_MESSAGE.SET_NAME('AK','AK_OBJECT_NOT_UPDATED');
rollback to start_update_value;
rollback to start_update_value;
end UPDATE_ATTRIBUTE_VALUE;
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_object_rec.last_updated_by := to_number(l_token);
l_object_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_object_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_object_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_attribute_rec.last_updated_by := to_number(l_token);
l_attribute_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_attribute_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_attribute_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_navigation_rec.last_updated_by := to_number(l_token);
l_navigation_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_navigation_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_navigation_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_unique_key_rec.last_updated_by := to_number(l_token);
l_unique_key_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_unique_key_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_unique_key_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_unique_key_column_rec.last_updated_by := to_number(l_token);
l_unique_key_column_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_unique_key_column_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_unique_key_column_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_foreign_key_rec.last_updated_by := to_number(l_token);
l_foreign_key_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_foreign_key_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_foreign_key_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_foreign_key_column_rec.last_updated_by := to_number(l_token);
l_foreign_key_column_rec.last_updated_by := FND_LOAD_UTIL.OWNER_ID(l_token);
elsif (l_column = 'LAST_UPDATE_DATE') then
l_foreign_key_column_rec.last_update_date := to_date(l_token,
AK_ON_OBJECTS_PUB.G_DATE_FORMAT);
elsif (l_column = 'LAST_UPDATE_LOGIN') then
l_foreign_key_column_rec.last_update_login := to_number(l_token);
-- Update Object only if G_UPDATE_MODE is TRUE
--
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_OBJECT3_PVT.UPDATE_OBJECT (
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_database_object_name =>
l_object_tbl(l_index).database_object_name,
p_name => l_object_tbl(l_index).name,
p_description => l_object_tbl(l_index).description,
p_application_id => l_object_tbl(l_index).application_id,
p_primary_key_name => l_object_tbl(l_index).primary_key_name,
p_defaulting_api_pkg => l_object_tbl(l_index).defaulting_api_pkg,
p_defaulting_api_proc => l_object_tbl(l_index).defaulting_api_proc,
p_validation_api_pkg => l_object_tbl(l_index).validation_api_pkg,
p_validation_api_proc => l_object_tbl(l_index).validation_api_proc,
p_attribute_category => l_object_tbl(l_index).attribute_category,
p_attribute1 => l_object_tbl(l_index).attribute1,
p_attribute2 => l_object_tbl(l_index).attribute2,
p_attribute3 => l_object_tbl(l_index).attribute3,
p_attribute4 => l_object_tbl(l_index).attribute4,
p_attribute5 => l_object_tbl(l_index).attribute5,
p_attribute6 => l_object_tbl(l_index).attribute6,
p_attribute7 => l_object_tbl(l_index).attribute7,
p_attribute8 => l_object_tbl(l_index).attribute8,
p_attribute9 => l_object_tbl(l_index).attribute9,
p_attribute10 => l_object_tbl(l_index).attribute10,
p_attribute11 => l_object_tbl(l_index).attribute11,
p_attribute12 => l_object_tbl(l_index).attribute12,
p_attribute13 => l_object_tbl(l_index).attribute13,
p_attribute14 => l_object_tbl(l_index).attribute14,
p_attribute15 => l_object_tbl(l_index).attribute15,
p_created_by => l_object_tbl(l_index).created_by,
p_creation_date => l_object_tbl(l_index).creation_date,
p_last_updated_by => l_object_tbl(l_index).last_updated_by,
p_last_update_date => l_object_tbl(l_index).last_update_date,
p_last_update_login => l_object_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
select ao.last_updated_by, aot.last_updated_by,
ao.last_update_date, aot.last_update_date
into l_user_id1, l_user_id2, l_update1, l_update2
from ak_objects ao, ak_objects_tl aot
where ao.database_object_name = l_object_tbl(l_index).database_object_name
and ao.database_object_name = aot.database_object_name
and aot.language = userenv('LANG');
if (AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_object_tbl(l_index).created_by,
p_creation_date => l_object_tbl(l_index).creation_date,
p_last_updated_by => l_object_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_object_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_object_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_object_tbl(l_index).created_by,
p_creation_date => l_object_tbl(l_index).creation_date,
p_last_updated_by => l_object_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id2,
p_last_update_date => l_object_tbl(l_index).last_update_date,
p_db_last_update_date => l_update2,
p_last_update_login => l_object_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE')) then
AK_OBJECT3_PVT.UPDATE_OBJECT (
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_database_object_name =>
l_object_tbl(l_index).database_object_name,
p_name => l_object_tbl(l_index).name,
p_description => l_object_tbl(l_index).description,
p_application_id => l_object_tbl(l_index).application_id,
p_primary_key_name => l_object_tbl(l_index).primary_key_name,
p_defaulting_api_pkg => l_object_tbl(l_index).defaulting_api_pkg,
p_defaulting_api_proc => l_object_tbl(l_index).defaulting_api_proc,
p_validation_api_pkg => l_object_tbl(l_index).validation_api_pkg,
p_validation_api_proc => l_object_tbl(l_index).validation_api_proc,
p_attribute_category => l_object_tbl(l_index).attribute_category,
p_attribute1 => l_object_tbl(l_index).attribute1,
p_attribute2 => l_object_tbl(l_index).attribute2,
p_attribute3 => l_object_tbl(l_index).attribute3,
p_attribute4 => l_object_tbl(l_index).attribute4,
p_attribute5 => l_object_tbl(l_index).attribute5,
p_attribute6 => l_object_tbl(l_index).attribute6,
p_attribute7 => l_object_tbl(l_index).attribute7,
p_attribute8 => l_object_tbl(l_index).attribute8,
p_attribute9 => l_object_tbl(l_index).attribute9,
p_attribute10 => l_object_tbl(l_index).attribute10,
p_attribute11 => l_object_tbl(l_index).attribute11,
p_attribute12 => l_object_tbl(l_index).attribute12,
p_attribute13 => l_object_tbl(l_index).attribute13,
p_attribute14 => l_object_tbl(l_index).attribute14,
p_attribute15 => l_object_tbl(l_index).attribute15,
p_created_by => l_object_tbl(l_index).created_by,
p_creation_date => l_object_tbl(l_index).creation_date,
p_last_updated_by => l_object_tbl(l_index).last_updated_by,
p_last_update_date => l_object_tbl(l_index).last_update_date,
p_last_update_login => l_object_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_NO_CUSTOM_UPDATE */
p_last_updated_by => l_object_tbl(l_index).last_updated_by,
p_last_update_date => l_object_tbl(l_index).last_update_date,
p_last_update_login => l_object_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Update Object Attributes only if G_UPDATE_MODE is TRUE
--
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_OBJECT3_PVT.UPDATE_ATTRIBUTE (
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_database_object_name =>
l_attribute_tbl(l_index).database_object_name,
p_attribute_application_id =>
l_attribute_tbl(l_index).attribute_appl_id,
p_attribute_code => l_attribute_tbl(l_index).attribute_code,
p_column_name => l_attribute_tbl(l_index).column_name,
p_attribute_label_length =>
l_attribute_tbl(l_index).attribute_label_length,
p_display_value_length =>
l_attribute_tbl(l_index).display_value_length,
p_bold => l_attribute_tbl(l_index).bold,
p_italic => l_attribute_tbl(l_index).italic,
p_vertical_alignment =>
l_attribute_tbl(l_index).vertical_alignment,
p_horizontal_alignment =>
l_attribute_tbl(l_index).horizontal_alignment,
p_data_source_type => l_attribute_tbl(l_index).data_source_type,
p_data_storage_type => l_attribute_tbl(l_index).data_storage_type,
p_table_name => l_attribute_tbl(l_index).table_name,
p_base_table_column_name =>
l_attribute_tbl(l_index).base_table_column_name,
p_required_flag => l_attribute_tbl(l_index).required_flag,
p_default_value_varchar2 =>
l_attribute_tbl(l_index).default_value_varchar2,
p_default_value_number =>
l_attribute_tbl(l_index).default_value_number,
p_default_value_date =>
l_attribute_tbl(l_index).default_value_date,
p_lov_region_application_id =>
l_attribute_tbl(l_index).lov_region_application_id,
p_lov_region_code => l_attribute_tbl(l_index).lov_region_code,
p_lov_foreign_key_name =>
l_attribute_tbl(l_index).lov_foreign_key_name,
p_lov_attribute_application_id =>
l_attribute_tbl(l_index).lov_attribute_application_id,
p_lov_attribute_code =>
l_attribute_tbl(l_index).lov_attribute_code,
p_defaulting_api_pkg =>
l_attribute_tbl(l_index).defaulting_api_pkg,
p_defaulting_api_proc =>
l_attribute_tbl(l_index).defaulting_api_proc,
p_validation_api_pkg =>l_attribute_tbl(l_index).validation_api_pkg,
p_validation_api_proc =>
l_attribute_tbl(l_index).validation_api_proc,
p_attribute_category => l_attribute_tbl(l_index).attribute_category,
p_attribute1 => l_attribute_tbl(l_index).attribute1,
p_attribute2 => l_attribute_tbl(l_index).attribute2,
p_attribute3 => l_attribute_tbl(l_index).attribute3,
p_attribute4 => l_attribute_tbl(l_index).attribute4,
p_attribute5 => l_attribute_tbl(l_index).attribute5,
p_attribute6 => l_attribute_tbl(l_index).attribute6,
p_attribute7 => l_attribute_tbl(l_index).attribute7,
p_attribute8 => l_attribute_tbl(l_index).attribute8,
p_attribute9 => l_attribute_tbl(l_index).attribute9,
p_attribute10 => l_attribute_tbl(l_index).attribute10,
p_attribute11 => l_attribute_tbl(l_index).attribute11,
p_attribute12 => l_attribute_tbl(l_index).attribute12,
p_attribute13 => l_attribute_tbl(l_index).attribute13,
p_attribute14 => l_attribute_tbl(l_index).attribute14,
p_attribute15 => l_attribute_tbl(l_index).attribute15,
p_attribute_label_long =>
l_attribute_tbl(l_index).attribute_label_long,
p_attribute_label_short =>
l_attribute_tbl(l_index).attribute_label_short,
p_created_by => l_attribute_tbl(l_index).created_by,
p_creation_date => l_attribute_tbl(l_index).creation_date,
p_last_updated_by => l_attribute_tbl(l_index).last_updated_by,
p_last_update_date => l_attribute_tbl(l_index).last_update_date,
p_last_update_login => l_attribute_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
select aoa.last_updated_by, aoat.last_updated_by,
aoa.last_update_date, aoat.last_update_date
into l_user_id1, l_user_id2, l_update1, l_update2
from ak_object_attributes aoa, ak_object_attributes_tl aoat
where aoa.database_object_name = l_attribute_tbl(l_index).database_object_name
and aoa.attribute_code = l_attribute_tbl(l_index).attribute_code
and aoa.attribute_application_id = l_attribute_tbl(l_index).attribute_appl_id
and aoa.database_object_name = aoat.database_object_name
and aoa.attribute_code = aoat.attribute_code
and aoa.attribute_application_id = aoat.attribute_application_id
and aoat.language = userenv('LANG');
if (AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_attribute_tbl(l_index).created_by,
p_creation_date => l_attribute_tbl(l_index).creation_date,
p_last_updated_by => l_attribute_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_attribute_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_attribute_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_attribute_tbl(l_index).created_by,
p_creation_date => l_attribute_tbl(l_index).creation_date,
p_last_updated_by => l_attribute_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id2,
p_last_update_date => l_attribute_tbl(l_index).last_update_date,
p_db_last_update_date => l_update2,
p_last_update_login => l_attribute_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE')) then
AK_OBJECT3_PVT.UPDATE_ATTRIBUTE (
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_database_object_name =>
l_attribute_tbl(l_index).database_object_name,
p_attribute_application_id =>
l_attribute_tbl(l_index).attribute_appl_id,
p_attribute_code => l_attribute_tbl(l_index).attribute_code,
p_column_name => l_attribute_tbl(l_index).column_name,
p_attribute_label_length =>
l_attribute_tbl(l_index).attribute_label_length,
p_display_value_length =>
l_attribute_tbl(l_index).display_value_length,
p_bold => l_attribute_tbl(l_index).bold,
p_italic => l_attribute_tbl(l_index).italic,
p_vertical_alignment =>
l_attribute_tbl(l_index).vertical_alignment,
p_horizontal_alignment =>
l_attribute_tbl(l_index).horizontal_alignment,
p_data_source_type => l_attribute_tbl(l_index).data_source_type,
p_data_storage_type => l_attribute_tbl(l_index).data_storage_type,
p_table_name => l_attribute_tbl(l_index).table_name,
p_base_table_column_name =>
l_attribute_tbl(l_index).base_table_column_name,
p_required_flag => l_attribute_tbl(l_index).required_flag,
p_default_value_varchar2 =>
l_attribute_tbl(l_index).default_value_varchar2,
p_default_value_number =>
l_attribute_tbl(l_index).default_value_number,
p_default_value_date =>
l_attribute_tbl(l_index).default_value_date,
p_lov_region_application_id =>
l_attribute_tbl(l_index).lov_region_application_id,
p_lov_region_code => l_attribute_tbl(l_index).lov_region_code,
p_lov_foreign_key_name =>
l_attribute_tbl(l_index).lov_foreign_key_name,
p_lov_attribute_application_id =>
l_attribute_tbl(l_index).lov_attribute_application_id,
p_lov_attribute_code =>
l_attribute_tbl(l_index).lov_attribute_code,
p_defaulting_api_pkg =>
l_attribute_tbl(l_index).defaulting_api_pkg,
p_defaulting_api_proc =>
l_attribute_tbl(l_index).defaulting_api_proc,
p_validation_api_pkg =>l_attribute_tbl(l_index).validation_api_pkg,
p_validation_api_proc =>
l_attribute_tbl(l_index).validation_api_proc,
p_attribute_category => l_attribute_tbl(l_index).attribute_category,
p_attribute1 => l_attribute_tbl(l_index).attribute1,
p_attribute2 => l_attribute_tbl(l_index).attribute2,
p_attribute3 => l_attribute_tbl(l_index).attribute3,
p_attribute4 => l_attribute_tbl(l_index).attribute4,
p_attribute5 => l_attribute_tbl(l_index).attribute5,
p_attribute6 => l_attribute_tbl(l_index).attribute6,
p_attribute7 => l_attribute_tbl(l_index).attribute7,
p_attribute8 => l_attribute_tbl(l_index).attribute8,
p_attribute9 => l_attribute_tbl(l_index).attribute9,
p_attribute10 => l_attribute_tbl(l_index).attribute10,
p_attribute11 => l_attribute_tbl(l_index).attribute11,
p_attribute12 => l_attribute_tbl(l_index).attribute12,
p_attribute13 => l_attribute_tbl(l_index).attribute13,
p_attribute14 => l_attribute_tbl(l_index).attribute14,
p_attribute15 => l_attribute_tbl(l_index).attribute15,
p_attribute_label_long =>
l_attribute_tbl(l_index).attribute_label_long,
p_attribute_label_short =>
l_attribute_tbl(l_index).attribute_label_short,
p_created_by => l_attribute_tbl(l_index).created_by,
p_creation_date => l_attribute_tbl(l_index).creation_date,
p_last_updated_by => l_attribute_tbl(l_index).last_updated_by,
p_last_update_date => l_attribute_tbl(l_index).last_update_date,
p_last_update_login => l_attribute_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_NO_CUSTOM_UPDATE */
p_last_updated_by => l_attribute_tbl(l_index).last_updated_by,
p_last_update_date => l_attribute_tbl(l_index).last_update_date,
p_last_update_login => l_attribute_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Update Object Attribute Navigation only if G_UPDATE_MODE is TRUE
--
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_OBJECT3_PVT.UPDATE_ATTRIBUTE_NAVIGATION (
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_database_object_name =>
l_navigation_tbl(l_index).database_object_name,
p_attribute_application_id =>
l_navigation_tbl(l_index).attribute_appl_id,
p_attribute_code => l_navigation_tbl(l_index).attribute_code,
p_value_varchar2 => l_navigation_tbl(l_index).value_varchar2,
p_value_date => l_navigation_tbl(l_index).value_date,
p_value_number => l_navigation_tbl(l_index).value_number,
p_to_region_appl_id => l_navigation_tbl(l_index).to_region_appl_id,
p_to_region_code => l_navigation_tbl(l_index).to_region_code,
p_attribute_category => l_navigation_tbl(l_index).attribute_category,
p_attribute1 => l_navigation_tbl(l_index).attribute1,
p_attribute2 => l_navigation_tbl(l_index).attribute2,
p_attribute3 => l_navigation_tbl(l_index).attribute3,
p_attribute4 => l_navigation_tbl(l_index).attribute4,
p_attribute5 => l_navigation_tbl(l_index).attribute5,
p_attribute6 => l_navigation_tbl(l_index).attribute6,
p_attribute7 => l_navigation_tbl(l_index).attribute7,
p_attribute8 => l_navigation_tbl(l_index).attribute8,
p_attribute9 => l_navigation_tbl(l_index).attribute9,
p_attribute10 => l_navigation_tbl(l_index).attribute10,
p_attribute11 => l_navigation_tbl(l_index).attribute11,
p_attribute12 => l_navigation_tbl(l_index).attribute12,
p_attribute13 => l_navigation_tbl(l_index).attribute13,
p_attribute14 => l_navigation_tbl(l_index).attribute14,
p_attribute15 => l_navigation_tbl(l_index).attribute15,
p_created_by => l_navigation_tbl(l_index).created_by,
p_creation_date => l_navigation_tbl(l_index).creation_date,
p_last_updated_by => l_navigation_tbl(l_index).last_updated_by,
p_last_update_date => l_navigation_tbl(l_index).last_update_date,
p_last_update_login => l_navigation_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
select aoan.last_updated_by, aoan.last_update_date
into l_user_id1, l_update1
from ak_object_attribute_navigation aoan
where aoan.database_object_name = l_navigation_tbl(l_index).database_object_name
and aoan.attribute_code = l_navigation_tbl(l_index).attribute_code
and aoan.attribute_application_id = l_navigation_tbl(l_index).attribute_appl_id
and aoan.value_varchar2 = l_navigation_tbl(l_index).value_varchar2
and aoan.value_date = l_navigation_tbl(l_index).value_date
and aoan.value_number = l_navigation_tbl(l_index).value_number;
if AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_navigation_tbl(l_index).created_by,
p_creation_date => l_navigation_tbl(l_index).creation_date,
p_last_updated_by => l_navigation_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_navigation_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_navigation_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE') then
AK_OBJECT3_PVT.UPDATE_ATTRIBUTE_NAVIGATION (
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_database_object_name =>
l_navigation_tbl(l_index).database_object_name,
p_attribute_application_id =>
l_navigation_tbl(l_index).attribute_appl_id,
p_attribute_code => l_navigation_tbl(l_index).attribute_code,
p_value_varchar2 => l_navigation_tbl(l_index).value_varchar2,
p_value_date => l_navigation_tbl(l_index).value_date,
p_value_number => l_navigation_tbl(l_index).value_number,
p_to_region_appl_id => l_navigation_tbl(l_index).to_region_appl_id,
p_to_region_code => l_navigation_tbl(l_index).to_region_code,
p_attribute_category => l_navigation_tbl(l_index).attribute_category,
p_attribute1 => l_navigation_tbl(l_index).attribute1,
p_attribute2 => l_navigation_tbl(l_index).attribute2,
p_attribute3 => l_navigation_tbl(l_index).attribute3,
p_attribute4 => l_navigation_tbl(l_index).attribute4,
p_attribute5 => l_navigation_tbl(l_index).attribute5,
p_attribute6 => l_navigation_tbl(l_index).attribute6,
p_attribute7 => l_navigation_tbl(l_index).attribute7,
p_attribute8 => l_navigation_tbl(l_index).attribute8,
p_attribute9 => l_navigation_tbl(l_index).attribute9,
p_attribute10 => l_navigation_tbl(l_index).attribute10,
p_attribute11 => l_navigation_tbl(l_index).attribute11,
p_attribute12 => l_navigation_tbl(l_index).attribute12,
p_attribute13 => l_navigation_tbl(l_index).attribute13,
p_attribute14 => l_navigation_tbl(l_index).attribute14,
p_attribute15 => l_navigation_tbl(l_index).attribute15,
p_created_by => l_navigation_tbl(l_index).created_by,
p_creation_date => l_navigation_tbl(l_index).creation_date,
p_last_updated_by => l_navigation_tbl(l_index).last_updated_by,
p_last_update_date => l_navigation_tbl(l_index).last_update_date,
p_last_update_login => l_navigation_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_NO_CUSTOM_UPDATE */
p_last_updated_by => l_navigation_tbl(l_index).last_updated_by,
p_last_update_date => l_navigation_tbl(l_index).last_update_date,
p_last_update_login => l_navigation_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Update Update Attribute Values only if G_UPDATE_MODE is TRUE
--
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_OBJECT3_PVT.UPDATE_ATTRIBUTE_VALUE (
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_database_object_name =>
l_attribute_value_tbl(l_index).database_object_name,
p_attribute_application_id =>
l_attribute_value_tbl(l_index).attribute_appl_id,
p_attribute_code => l_attribute_value_tbl(l_index).attribute_code,
p_key_value1 => l_attribute_value_tbl(l_index).key_value1,
p_key_value2 => l_attribute_value_tbl(l_index).key_value2,
p_key_value3 => l_attribute_value_tbl(l_index).key_value3,
p_key_value4 => l_attribute_value_tbl(l_index).key_value4,
p_key_value5 => l_attribute_value_tbl(l_index).key_value5,
p_key_value6 => l_attribute_value_tbl(l_index).key_value6,
p_key_value7 => l_attribute_value_tbl(l_index).key_value7,
p_key_value8 => l_attribute_value_tbl(l_index).key_value8,
p_key_value9 => l_attribute_value_tbl(l_index).key_value9,
p_key_value10 => l_attribute_value_tbl(l_index).key_value10,
p_value_varchar2 => l_attribute_value_tbl(l_index).value_varchar2,
p_value_date => l_attribute_value_tbl(l_index).value_date,
p_value_number => l_attribute_value_tbl(l_index).value_number,
p_created_by => l_attribute_value_tbl(l_index).created_by,
p_creation_date => l_attribute_value_tbl(l_index).creation_date,
p_last_updated_by => l_attribute_value_tbl(l_index).last_updated_by,
p_last_update_date => l_attribute_value_tbl(l_index).last_update_date,
p_last_update_login => l_attribute_value_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp);
end if; -- /* if G_UPDATE_MODE */
p_last_updated_by => l_attribute_value_tbl(l_index).last_updated_by,
p_last_update_date => l_attribute_value_tbl(l_index).last_update_date,
p_last_update_login => l_attribute_value_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp);
-- Update Unique Keys only if G_UPDATE_MODE is TRUE
--
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_KEY_PVT.UPDATE_UNIQUE_KEY (
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_unique_key_name =>
l_unique_key_tbl(l_index).unique_key_name,
p_database_object_name =>
l_unique_key_tbl(l_index).database_object_name,
p_application_id => l_unique_key_tbl(l_index).application_id,
p_attribute_category => l_unique_key_tbl(l_index).attribute_category,
p_attribute1 => l_unique_key_tbl(l_index).attribute1,
p_attribute2 => l_unique_key_tbl(l_index).attribute2,
p_attribute3 => l_unique_key_tbl(l_index).attribute3,
p_attribute4 => l_unique_key_tbl(l_index).attribute4,
p_attribute5 => l_unique_key_tbl(l_index).attribute5,
p_attribute6 => l_unique_key_tbl(l_index).attribute6,
p_attribute7 => l_unique_key_tbl(l_index).attribute7,
p_attribute8 => l_unique_key_tbl(l_index).attribute8,
p_attribute9 => l_unique_key_tbl(l_index).attribute9,
p_attribute10 => l_unique_key_tbl(l_index).attribute10,
p_attribute11 => l_unique_key_tbl(l_index).attribute11,
p_attribute12 => l_unique_key_tbl(l_index).attribute12,
p_attribute13 => l_unique_key_tbl(l_index).attribute13,
p_attribute14 => l_unique_key_tbl(l_index).attribute14,
p_attribute15 => l_unique_key_tbl(l_index).attribute15,
p_created_by => l_unique_key_tbl(l_index).created_by,
p_creation_date => l_unique_key_tbl(l_index).creation_date,
p_last_updated_by => l_unique_key_tbl(l_index).last_updated_by,
p_last_update_date => l_unique_key_tbl(l_index).last_update_date,
p_last_update_login => l_unique_key_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Delete all children records in AK_UNIQUE_KEY_COLUMNS so
-- that obsolete columns would not exist after upload.
AK_KEY_PVT.DELETE_RELATED_UNIQUE_KEY_COL (
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_unique_key_name =>
l_unique_key_tbl(l_index).unique_key_name
);
elsif (AK_UPLOAD_GRP.G_NO_CUSTOM_UPDATE) then
select last_updated_by, last_update_date
into l_user_id1, l_update1
from ak_unique_keys
where database_object_name = l_unique_key_tbl(l_index).database_object_name
and unique_key_name = l_unique_key_tbl(l_index).unique_key_name;
if AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_unique_key_tbl(l_index).created_by,
p_creation_date => l_unique_key_tbl(l_index).creation_date,
p_last_updated_by => l_unique_key_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_unique_key_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_unique_key_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE') then
AK_KEY_PVT.UPDATE_UNIQUE_KEY (
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_unique_key_name =>
l_unique_key_tbl(l_index).unique_key_name,
p_database_object_name =>
l_unique_key_tbl(l_index).database_object_name,
p_application_id => l_unique_key_tbl(l_index).application_id,
p_attribute_category => l_unique_key_tbl(l_index).attribute_category,
p_attribute1 => l_unique_key_tbl(l_index).attribute1,
p_attribute2 => l_unique_key_tbl(l_index).attribute2,
p_attribute3 => l_unique_key_tbl(l_index).attribute3,
p_attribute4 => l_unique_key_tbl(l_index).attribute4,
p_attribute5 => l_unique_key_tbl(l_index).attribute5,
p_attribute6 => l_unique_key_tbl(l_index).attribute6,
p_attribute7 => l_unique_key_tbl(l_index).attribute7,
p_attribute8 => l_unique_key_tbl(l_index).attribute8,
p_attribute9 => l_unique_key_tbl(l_index).attribute9,
p_attribute10 => l_unique_key_tbl(l_index).attribute10,
p_attribute11 => l_unique_key_tbl(l_index).attribute11,
p_attribute12 => l_unique_key_tbl(l_index).attribute12,
p_attribute13 => l_unique_key_tbl(l_index).attribute13,
p_attribute14 => l_unique_key_tbl(l_index).attribute14,
p_attribute15 => l_unique_key_tbl(l_index).attribute15,
p_created_by => l_unique_key_tbl(l_index).created_by,
p_creation_date => l_unique_key_tbl(l_index).creation_date,
p_last_updated_by => l_unique_key_tbl(l_index).last_updated_by,
p_last_update_date => l_unique_key_tbl(l_index).last_update_date,
p_last_update_login => l_unique_key_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Delete all children records in AK_UNIQUE_KEY_COLUMNS so
-- that obsolete columns would not exist after upload.
AK_KEY_PVT.DELETE_RELATED_UNIQUE_KEY_COL (
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_unique_key_name =>
l_unique_key_tbl(l_index).unique_key_name
);
end if; -- /* if G_UPDATE_MODE G_NO_CUSTOM_UPDATE */
p_last_updated_by => l_unique_key_tbl(l_index).lasT_updated_by,
p_last_update_date => l_unique_key_tbl(l_index).last_update_date,
p_last_update_login => l_unique_key_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Update Unique Key Columns only if G_UPDATE_MODE is TRUE
--
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_KEY_PVT.UPDATE_UNIQUE_KEY_COLUMN (
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_unique_key_name =>
l_unique_key_column_tbl(l_index).unique_key_name,
p_attribute_application_id =>
l_unique_key_column_tbl(l_index).attribute_application_id,
p_attribute_code =>
l_unique_key_column_tbl(l_index).attribute_code,
p_unique_key_sequence =>
l_unique_key_column_tbl(l_index).unique_key_sequence,
p_attribute_category => l_unique_key_column_tbl(l_index).attribute_category,
p_attribute1 => l_unique_key_column_tbl(l_index).attribute1,
p_attribute2 => l_unique_key_column_tbl(l_index).attribute2,
p_attribute3 => l_unique_key_column_tbl(l_index).attribute3,
p_attribute4 => l_unique_key_column_tbl(l_index).attribute4,
p_attribute5 => l_unique_key_column_tbl(l_index).attribute5,
p_attribute6 => l_unique_key_column_tbl(l_index).attribute6,
p_attribute7 => l_unique_key_column_tbl(l_index).attribute7,
p_attribute8 => l_unique_key_column_tbl(l_index).attribute8,
p_attribute9 => l_unique_key_column_tbl(l_index).attribute9,
p_attribute10 => l_unique_key_column_tbl(l_index).attribute10,
p_attribute11 => l_unique_key_column_tbl(l_index).attribute11,
p_attribute12 => l_unique_key_column_tbl(l_index).attribute12,
p_attribute13 => l_unique_key_column_tbl(l_index).attribute13,
p_attribute14 => l_unique_key_column_tbl(l_index).attribute14,
p_attribute15 => l_unique_key_column_tbl(l_index).attribute15,
p_created_by => l_unique_key_column_tbl(l_index).created_by,
p_creation_date => l_unique_key_column_tbl(l_index).creation_date,
p_last_updated_by => l_unique_key_column_tbl(l_index).last_updated_by,
p_last_update_date => l_unique_key_column_tbl(l_index).last_update_date,
p_last_update_login => l_unique_key_column_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
select last_updated_by, last_update_date
into l_user_id1, l_update1
from ak_unique_key_columns
where unique_key_name = l_unique_key_column_tbl(l_index).unique_key_name
and attribute_code = l_unique_key_column_tbl(l_index).attribute_code
and attribute_application_id = l_unique_key_column_tbl(l_index).attribute_application_id;
if AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_unique_key_column_tbl(l_index).created_by,
p_creation_date => l_unique_key_column_tbl(l_index).creation_date,
p_last_updated_by => l_unique_key_column_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_unique_key_column_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_unique_key_column_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE') then
AK_KEY_PVT.UPDATE_UNIQUE_KEY_COLUMN (
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_unique_key_name =>
l_unique_key_column_tbl(l_index).unique_key_name,
p_attribute_application_id =>
l_unique_key_column_tbl(l_index).attribute_application_id,
p_attribute_code =>
l_unique_key_column_tbl(l_index).attribute_code,
p_unique_key_sequence =>
l_unique_key_column_tbl(l_index).unique_key_sequence,
p_attribute_category => l_unique_key_column_tbl(l_index).attribute_category,
p_attribute1 => l_unique_key_column_tbl(l_index).attribute1,
p_attribute2 => l_unique_key_column_tbl(l_index).attribute2,
p_attribute3 => l_unique_key_column_tbl(l_index).attribute3,
p_attribute4 => l_unique_key_column_tbl(l_index).attribute4,
p_attribute5 => l_unique_key_column_tbl(l_index).attribute5,
p_attribute6 => l_unique_key_column_tbl(l_index).attribute6,
p_attribute7 => l_unique_key_column_tbl(l_index).attribute7,
p_attribute8 => l_unique_key_column_tbl(l_index).attribute8,
p_attribute9 => l_unique_key_column_tbl(l_index).attribute9,
p_attribute10 => l_unique_key_column_tbl(l_index).attribute10,
p_attribute11 => l_unique_key_column_tbl(l_index).attribute11,
p_attribute12 => l_unique_key_column_tbl(l_index).attribute12,
p_attribute13 => l_unique_key_column_tbl(l_index).attribute13,
p_attribute14 => l_unique_key_column_tbl(l_index).attribute14,
p_attribute15 => l_unique_key_column_tbl(l_index).attribute15,
p_created_by => l_unique_key_column_tbl(l_index).created_by,
p_creation_date => l_unique_key_column_tbl(l_index).creation_date,
p_last_updated_by => l_unique_key_column_tbl(l_index).last_updated_by,
p_last_update_date => l_unique_key_column_tbl(l_index).last_update_date,
p_last_update_login => l_unique_key_column_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_NO_CUSTOM_UPDATE */
p_last_updated_by => l_unique_key_column_tbl(l_index).last_updated_by,
p_last_update_date => l_unique_key_column_tbl(l_index).last_update_date,
p_last_update_login => l_unique_key_column_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Update Foreign Keys only if G_UPDATE_MODE is TRUE
--
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_KEY_PVT.UPDATE_FOREIGN_KEY (
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_foreign_key_name =>
l_foreign_key_tbl(l_index).foreign_key_name,
p_database_object_name =>
l_foreign_key_tbl(l_index).database_object_name,
p_unique_key_name =>
l_foreign_key_tbl(l_index).unique_key_name,
p_application_id => l_foreign_key_tbl(l_index).application_id,
p_attribute_category => l_foreign_key_tbl(l_index).attribute_category,
p_attribute1 => l_foreign_key_tbl(l_index).attribute1,
p_attribute2 => l_foreign_key_tbl(l_index).attribute2,
p_attribute3 => l_foreign_key_tbl(l_index).attribute3,
p_attribute4 => l_foreign_key_tbl(l_index).attribute4,
p_attribute5 => l_foreign_key_tbl(l_index).attribute5,
p_attribute6 => l_foreign_key_tbl(l_index).attribute6,
p_attribute7 => l_foreign_key_tbl(l_index).attribute7,
p_attribute8 => l_foreign_key_tbl(l_index).attribute8,
p_attribute9 => l_foreign_key_tbl(l_index).attribute9,
p_attribute10 => l_foreign_key_tbl(l_index).attribute10,
p_attribute11 => l_foreign_key_tbl(l_index).attribute11,
p_attribute12 => l_foreign_key_tbl(l_index).attribute12,
p_attribute13 => l_foreign_key_tbl(l_index).attribute13,
p_attribute14 => l_foreign_key_tbl(l_index).attribute14,
p_attribute15 => l_foreign_key_tbl(l_index).attribute15,
p_from_to_name => l_foreign_key_tbl(l_index).from_to_name,
p_from_to_description =>
l_foreign_key_tbl(l_index).from_to_description,
p_to_from_name => l_foreign_key_tbl(l_index).to_from_name,
p_to_from_description =>
l_foreign_key_tbl(l_index).to_from_description,
p_created_by => l_foreign_key_tbl(l_index).created_by,
p_creation_date => l_foreign_key_tbl(l_index).creation_date,
p_last_updated_by => l_foreign_key_tbl(l_index).last_updated_by,
p_last_update_date => l_foreign_key_tbl(l_index).last_update_date,
p_last_update_login => l_foreign_key_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Delete all children records in AK_FOREIGN_KEY_COLUMNS so
-- that obsolete columns would not exist after upload.
AK_KEY_PVT.DELETE_RELATED_FOREIGN_KEY_COL (
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_foreign_key_name =>
l_foreign_key_tbl(l_index).foreign_key_name
);
-- update non-customized data only
elsif ( AK_UPLOAD_GRP.G_NO_CUSTOM_UPDATE ) then
select afk.last_updated_by, afkt.last_updated_by,
afk.last_update_date, afkt.last_update_date
into l_user_id1, l_user_id2, l_update1, l_update2
from ak_foreign_keys afk, ak_foreign_keys_tl afkt
where afk.foreign_key_name = l_foreign_key_tbl(l_index).foreign_key_name
and afk.foreign_key_name = afkt.foreign_key_name
and afkt.language = userenv('LANG');
if (AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_foreign_key_tbl(l_index).created_by,
p_creation_date => l_foreign_key_tbl(l_index).creation_date,
p_last_updated_by => l_foreign_key_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_foreign_key_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_foreign_key_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_foreign_key_tbl(l_index).created_by,
p_creation_date => l_foreign_key_tbl(l_index).creation_date,
p_last_updated_by => l_foreign_key_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id2,
p_last_update_date => l_foreign_key_tbl(l_index).last_update_date,
p_db_last_update_date => l_update2,
p_last_update_login => l_foreign_key_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE')) then
AK_KEY_PVT.UPDATE_FOREIGN_KEY (
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_foreign_key_name =>
l_foreign_key_tbl(l_index).foreign_key_name,
p_database_object_name =>
l_foreign_key_tbl(l_index).database_object_name,
p_unique_key_name =>
l_foreign_key_tbl(l_index).unique_key_name,
p_application_id => l_foreign_key_tbl(l_index).application_id,
p_attribute_category => l_foreign_key_tbl(l_index).attribute_category,
p_attribute1 => l_foreign_key_tbl(l_index).attribute1,
p_attribute2 => l_foreign_key_tbl(l_index).attribute2,
p_attribute3 => l_foreign_key_tbl(l_index).attribute3,
p_attribute4 => l_foreign_key_tbl(l_index).attribute4,
p_attribute5 => l_foreign_key_tbl(l_index).attribute5,
p_attribute6 => l_foreign_key_tbl(l_index).attribute6,
p_attribute7 => l_foreign_key_tbl(l_index).attribute7,
p_attribute8 => l_foreign_key_tbl(l_index).attribute8,
p_attribute9 => l_foreign_key_tbl(l_index).attribute9,
p_attribute10 => l_foreign_key_tbl(l_index).attribute10,
p_attribute11 => l_foreign_key_tbl(l_index).attribute11,
p_attribute12 => l_foreign_key_tbl(l_index).attribute12,
p_attribute13 => l_foreign_key_tbl(l_index).attribute13,
p_attribute14 => l_foreign_key_tbl(l_index).attribute14,
p_attribute15 => l_foreign_key_tbl(l_index).attribute15,
p_from_to_name => l_foreign_key_tbl(l_index).from_to_name,
p_from_to_description =>
l_foreign_key_tbl(l_index).from_to_description,
p_to_from_name => l_foreign_key_tbl(l_index).to_from_name,
p_to_from_description =>
l_foreign_key_tbl(l_index).to_from_description,
p_created_by => l_foreign_key_tbl(l_index).created_by,
p_creation_date => l_foreign_key_tbl(l_index).creation_date,
p_last_updated_by => l_foreign_key_tbl(l_index).lasT_updated_by,
p_last_update_date => l_foreign_key_tbl(l_index).last_update_date,
p_last_update_login => l_foreign_key_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Delete all children records in AK_FOREIGN_KEY_COLUMNS so
-- that obsolete columns would not exist after upload.
AK_KEY_PVT.DELETE_RELATED_FOREIGN_KEY_COL (
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_foreign_key_name =>
l_foreign_key_tbl(l_index).foreign_key_name
);
end if; -- /* G_UPDATE_MODE G_NO_CUSTOM_UPDATE */
p_last_updated_by => l_foreign_key_tbl(l_index).last_updated_by,
p_last_update_date => l_foreign_key_tbl(l_index).last_update_date,
p_last_update_login => l_foreign_key_tbl(l_index).lasT_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);
-- Update Foreign Key Columns only if G_UPDATE_MODE is TRUE
--
if (AK_UPLOAD_GRP.G_UPDATE_MODE) then
AK_KEY_PVT.UPDATE_FOREIGN_KEY_COLUMN (
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_foreign_key_name =>
l_foreign_key_column_tbl(l_index).foreign_key_name,
p_attribute_application_id =>
l_foreign_key_column_tbl(l_index).attribute_application_id,
p_attribute_code =>
l_foreign_key_column_tbl(l_index).attribute_code,
p_foreign_key_sequence =>
l_foreign_key_column_tbl(l_index).foreign_key_sequence,
p_attribute_category => l_foreign_key_column_tbl(l_index).attribute_category,
p_attribute1 => l_foreign_key_column_tbl(l_index).attribute1,
p_attribute2 => l_foreign_key_column_tbl(l_index).attribute2,
p_attribute3 => l_foreign_key_column_tbl(l_index).attribute3,
p_attribute4 => l_foreign_key_column_tbl(l_index).attribute4,
p_attribute5 => l_foreign_key_column_tbl(l_index).attribute5,
p_attribute6 => l_foreign_key_column_tbl(l_index).attribute6,
p_attribute7 => l_foreign_key_column_tbl(l_index).attribute7,
p_attribute8 => l_foreign_key_column_tbl(l_index).attribute8,
p_attribute9 => l_foreign_key_column_tbl(l_index).attribute9,
p_attribute10 => l_foreign_key_column_tbl(l_index).attribute10,
p_attribute11 => l_foreign_key_column_tbl(l_index).attribute11,
p_attribute12 => l_foreign_key_column_tbl(l_index).attribute12,
p_attribute13 => l_foreign_key_column_tbl(l_index).attribute13,
p_attribute14 => l_foreign_key_column_tbl(l_index).attribute14,
p_attribute15 => l_foreign_key_column_tbl(l_index).attribute15,
p_created_by => l_foreign_key_column_tbl(l_index).created_by,
p_creation_date => l_foreign_key_column_tbl(l_index).creation_date,
p_last_updated_by => l_foreign_key_column_tbl(l_index).last_updated_by,
p_last_update_date => l_foreign_key_column_tbl(l_index).last_update_date,
p_last_update_login => l_foreign_key_column_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
-- update non-customized data only
--
select last_updated_by, last_update_date
into l_user_id1, l_update1
from ak_foreign_key_columns
where foreign_key_name = l_foreign_key_column_tbl(l_index).foreign_key_name
and attribute_code = l_foreign_key_column_tbl(l_index).attribute_code
and attribute_application_id = l_foreign_key_column_tbl(l_index).attribute_application_id;
if AK_ON_OBJECTS_PVT.IS_UPDATEABLE(
p_loader_timestamp => p_loader_timestamp,
p_created_by => l_foreign_key_column_tbl(l_index).created_by,
p_creation_date => l_foreign_key_column_tbl(l_index).creation_date,
p_last_updated_by => l_foreign_key_column_tbl(l_index).last_updated_by,
p_db_last_updated_by => l_user_id1,
p_last_update_date => l_foreign_key_column_tbl(l_index).last_update_date,
p_db_last_update_date => l_update1,
p_last_update_login => l_foreign_key_column_tbl(l_index).last_update_login,
p_create_or_update => 'UPDATE') then
AK_KEY_PVT.UPDATE_FOREIGN_KEY_COLUMN (
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_foreign_key_name =>
l_foreign_key_column_tbl(l_index).foreign_key_name,
p_attribute_application_id =>
l_foreign_key_column_tbl(l_index).attribute_application_id,
p_attribute_code =>
l_foreign_key_column_tbl(l_index).attribute_code,
p_foreign_key_sequence =>
l_foreign_key_column_tbl(l_index).foreign_key_sequence,
p_attribute_category => l_foreign_key_column_tbl(l_index).attribute_category,
p_attribute1 => l_foreign_key_column_tbl(l_index).attribute1,
p_attribute2 => l_foreign_key_column_tbl(l_index).attribute2,
p_attribute3 => l_foreign_key_column_tbl(l_index).attribute3,
p_attribute4 => l_foreign_key_column_tbl(l_index).attribute4,
p_attribute5 => l_foreign_key_column_tbl(l_index).attribute5,
p_attribute6 => l_foreign_key_column_tbl(l_index).attribute6,
p_attribute7 => l_foreign_key_column_tbl(l_index).attribute7,
p_attribute8 => l_foreign_key_column_tbl(l_index).attribute8,
p_attribute9 => l_foreign_key_column_tbl(l_index).attribute9,
p_attribute10 => l_foreign_key_column_tbl(l_index).attribute10,
p_attribute11 => l_foreign_key_column_tbl(l_index).attribute11,
p_attribute12 => l_foreign_key_column_tbl(l_index).attribute12,
p_attribute13 => l_foreign_key_column_tbl(l_index).attribute13,
p_attribute14 => l_foreign_key_column_tbl(l_index).attribute14,
p_attribute15 => l_foreign_key_column_tbl(l_index).attribute15,
p_created_by => l_foreign_key_column_tbl(l_index).created_by,
p_creation_date => l_foreign_key_column_tbl(l_index).creation_date,
p_last_updated_by => l_foreign_key_column_tbl(l_index).last_updated_by,
p_last_update_date => l_foreign_key_column_tbl(l_index).last_update_date,
p_last_update_login => l_foreign_key_column_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_NO_CUSTOM_UPDATE */
p_last_updated_by => l_foreign_key_column_tbl(l_index).last_updated_by,
p_last_update_date => l_foreign_key_column_tbl(l_index).last_update_date,
p_last_update_login => l_foreign_key_column_tbl(l_index).last_update_login,
p_loader_timestamp => p_loader_timestamp,
p_pass => p_pass,
p_copy_redo_flag => l_copy_redo_flag
);