The following lines contain the word 'select', 'insert', 'update' or 'delete':
,p_last_update_date IN VARCHAR2
,p_owner IN VARCHAR2
,p_custom_mode IN VARCHAR2) IS
CURSOR c_def IS
SELECT definition_code
,object_version_number
,defined_by_code
,last_updated_by
,last_update_date
FROM xla_tb_definitions_b
WHERE definition_code = p_definition_code;
SELECT 'Y'
FROM xla_tb_defn_details
WHERE definition_code = p_definition_code
AND code_combination_id = p_code_combination_id;
SELECT 'Y'
FROM xla_tb_defn_details
WHERE definition_code = p_definition_code
AND code_combination_id = p_segment_value_to;
l_last_updated_by NUMBER; -- owner in file
l_last_update_date DATE; -- last update date in file
l_db_last_updated_by NUMBER; -- owner in db
l_db_last_update_date DATE; -- last update date in db
l_last_updated_by := fnd_load_util.owner_id(p_owner);
l_last_update_date := NVL(TO_DATE(p_last_update_date, 'YYYY/MM/DD'), SYSDATE);
,l_db_last_updated_by
,l_db_last_update_date;
Insert_Row (
p_rowid => l_rowid
,p_definition_code => p_definition_code
,p_object_version_number => l_db_object_version_number
,p_code_combination_id => p_code_combination_id
,p_flexfield_segment_code => p_flexfield_segment_code
,p_segment_value_from => p_segment_value_from
,p_segment_value_to => p_segment_value_to
,p_creation_Date => l_last_update_date
,p_Created_By => l_last_updated_by
,p_Last_Update_Date => l_last_update_date
,p_Last_Updated_By => l_last_updated_by
,p_Last_Update_Login => 0);
Insert_Row (
p_rowid => l_rowid
,p_definition_code => p_definition_code
,p_object_version_number => l_db_object_version_number
,p_code_combination_id => p_code_combination_id
,p_flexfield_segment_code => p_flexfield_segment_code
,p_segment_value_from => p_segment_value_from
,p_segment_value_to => p_segment_value_to
,p_creation_Date => l_last_update_date
,p_Created_By => l_last_updated_by
,p_Last_Update_Date => l_last_update_date
,p_Last_Updated_By => l_last_updated_by
,p_Last_Update_Login => 0);
p_file_id => l_last_updated_by
,p_file_lud => l_last_update_date
,p_db_id => l_db_last_updated_by
,p_db_lud => l_db_last_update_date
,p_custom_mode => p_custom_mode))
THEN
BEGIN
Delete_Row
(p_definition_code => p_definition_code
,p_flexfield_segment_code => p_flexfield_segment_code
,p_segment_value_from => p_segment_value_from);
Insert_Row (
p_rowid => l_rowid
,p_definition_code => p_definition_code
,p_object_version_number => l_db_object_version_number
,p_code_combination_id => p_code_combination_id
,p_flexfield_segment_code => p_flexfield_segment_code
,p_segment_value_from => p_segment_value_from
,p_segment_value_to => p_segment_value_to
,p_creation_Date => l_last_update_date
,p_Created_By => l_last_updated_by
,p_last_update_date => l_last_update_date
,p_last_updated_by => l_last_updated_by
,p_last_update_login => 0);
PROCEDURE Insert_Row
(p_rowid IN OUT NOCOPY VARCHAR2
,p_definition_code IN VARCHAR2
,p_object_version_number IN NUMBER
,p_code_combination_id IN NUMBER
,p_flexfield_segment_code IN VARCHAR2
,p_segment_value_from IN VARCHAR2
,p_segment_value_to IN VARCHAR2
,p_creation_date IN DATE
,p_created_by IN NUMBER
,p_last_update_date IN DATE
,p_last_updated_by IN NUMBER
,p_last_update_login IN NUMBER) IS
CURSOR c_def IS
SELECT defined_by_code
FROM xla_tb_definitions_b
WHERE definition_code = p_definition_code;
INSERT INTO xla_tb_defn_details
(
definition_detail_id
,object_version_number
,definition_code
,flexfield_segment_code
,segment_value_from
,segment_value_to
,code_combination_id
,created_by
,creation_date
,last_updated_by
,last_update_date
,last_update_login
)
VALUES
(
xla_tb_defn_details_s.nextval
,1 -- Ignore p_object_version_number
,p_definition_code
,l_flexfield_segment_code
,l_segment_value_from
,l_segment_value_to
,l_code_combination_id
,p_created_by
,p_creation_date
,p_last_updated_by
,p_last_update_date
,p_last_update_login
)
RETURNING rowid INTO p_rowid;
,'LOCATION' , C_PACKAGE_NAME || '.' || 'insert_row'
,'ERROR' , sqlerrm);
END Insert_Row;
PROCEDURE Delete_Row
(p_definition_code IN VARCHAR2
,p_code_combination_id IN NUMBER) IS
BEGIN
DELETE FROM xla_tb_defn_details
WHERE definition_code = p_definition_code
AND code_combination_id = p_code_combination_id;
END Delete_Row;
PROCEDURE Delete_Row
(p_definition_code IN VARCHAR2
,p_flexfield_segment_code IN VARCHAR2
,p_segment_value_from IN VARCHAR2) IS
BEGIN
DELETE FROM xla_tb_defn_details
WHERE definition_code = p_definition_code
AND flexfield_segment_code = p_flexfield_segment_code
AND segment_value_from = p_segment_value_from;
END Delete_Row;