[Home] [Help]
The following lines contain the word 'select', 'insert', 'update' or 'delete':
select src_table
into stable
from FND_IREP_ALL_INTERFACES
where class_id = key_id;
-- find file name and update history table
select source_file_name, source_file_product, source_file_version
into filename, fileproduct, fileversion
from fnd_irep_classes
where class_id = key_id;
update fnd_irep_deferred_load_files
set load_status = 'N'
where file_name = ildtfilename
and fileproduct = file_product
and fileversion = file_version;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Error: History table does not have this entry.');
Delete from FND_IREP_CLASS_DATASOURCES
where CLASS_ID = key_id;
Delete from FND_IREP_CLASS_PARENT_ASSIGNS
where class_name in
(select class_name
from fnd_irep_classes
where class_id = key_id);
Delete from FND_LOOKUP_ASSIGNMENTS
where obj_name = 'FND_IREP_CLASSES'
and INSTANCE_PK1_VALUE = to_char(key_id);
Delete from FND_CHILD_ANNOTATIONS
where parent_id = key_id
and parent_flag = 'C';
Delete from FND_IREP_USES_TABLES
where CLASS_ID = key_id;
Delete from FND_IREP_USES_MAPS
where CLASS_ID = key_id;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Class Sub-Entities Removed');
Delete from FND_LOOKUP_ASSIGNMENTS
where obj_name = 'FND_IREP_FUNCTION_FLAVORS'
and INSTANCE_PK1_VALUE in
(select function_id
from FND_FORM_FUNCTIONS
where irep_class_id = key_id);
Delete from FND_CHILD_ANNOTATIONS
where parent_flag = 'F'
and parent_id in
(select function_id
from FND_FORM_FUNCTIONS
where irep_class_id = key_id);
Delete from FND_PARAMETERS
where function_id in
(select function_id
from FND_FORM_FUNCTIONS
where irep_class_id = key_id);
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Function Sub-Entities Removed');
select class_id
into assoc_key_id
from FND_IREP_ALL_INTERFACES
where assoc_class_id = key_id;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Derived Entry : '|| assoc_key_id);
Delete from FND_IREP_FUNCTION_FLAVORS
where FUNCTION_ID in
(select function_id
from FND_FORM_FUNCTIONS
where irep_class_id = assoc_key_id);
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Derived Function Flavors Removed');
Delete from FND_FORM_FUNCTIONS_TL
where function_id in
(select function_id
from fnd_form_functions
where irep_class_id = assoc_key_id);
Delete from FND_FORM_FUNCTIONS
where irep_class_id = assoc_key_id;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Derived Functions Removed');
Delete from FND_IREP_CLASSES_TL
where class_id = assoc_key_id;
Delete from FND_IREP_CLASSES
where class_id = assoc_key_id;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Derived Classes Removed');
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Derived Entries Not Present.');
Delete from FND_IREP_FUNCTION_FLAVORS
where FUNCTION_ID in
(select function_id
from FND_FORM_FUNCTIONS
where irep_class_id = key_id);
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Function Flavors Removed');
Delete from FND_FORM_FUNCTIONS_TL
where function_id in
(select function_id
from fnd_form_functions
where irep_class_id = key_id);
Delete from FND_FORM_FUNCTIONS
where irep_class_id = key_id;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Functions Removed');
Delete from FND_IREP_CLASSES_TL
where class_id = key_id;
Delete from FND_IREP_CLASSES
where class_id = key_id;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep','Classes Removed. ' || 'Deletion completed for all entries corresponding to Class Id : '|| key_id );
Delete from FND_OBJECT_KEY_SETS
where object_id = key_id;
Delete from FND_LOOKUP_ASSIGNMENTS
where obj_name = 'FND_OBJECTS'
and INSTANCE_PK1_VALUE = to_char(key_id);
Delete from FND_CHILD_ANNOTATIONS
where parent_id = key_id
and parent_flag = 'O';
Delete from FND_OBJECT_TYPE_MEMBERS
where object_id = key_id;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Object Sub-Entities Removed');
Delete from FND_OBJECTS_TL
where object_id = key_id;
Delete from FND_OBJECTS
where object_id = key_id;
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', 'Objects Removed . '|| 'Deletion completed for all entries corresponding to object Id : '|| key_id);
FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'DeleteFromIrep', SQLERRM);
end delete_irep_entry ;
end DELETE_FROM_IREP;