The following lines contain the word 'select', 'insert', 'update' or 'delete':
hr_utility.trace('PA-PAY> '||p_attributes(l_index).ATTRIBUTE_CATEGORY||'is deleted.');
p_attributes.delete(l_index);
Set the block and attribute update process flags
Based on the data sent and in the db
*/
hxc_block_attribute_update.set_process_flags
(p_blocks => p_blocks
,p_attributes => p_attributes
);
Removed any deleted attributes
*/
hxc_timecard_attribute_utils.remove_deleted_attributes
(p_attributes => p_attributes);
l_timecard_blocks.delete;
l_day_blocks.delete;
l_detail_blocks.delete;
hxc_timecard_validation.recipients_update_validation
(p_blocks => p_blocks
,p_attributes => p_attributes
,p_messages => p_messages
,p_props => p_timecard_props
,p_deposit_mode => hxc_timecard.c_save
,p_resubmit => p_resubmit
);
hr_utility.trace('SVG: Rollingback to savepoint TC_SAVE_SAVEPOINT for any Projects related updates');
l_resubmit := c_delete;
p_messages.delete;
hxc_block_attribute_update.denormalize_time
(p_blocks => l_blocks
,p_mode => 'ADD'
);
p_messages.delete;
Set the block and attribute update process flags
Based on the data sent and in the db
*/
hxc_block_attribute_update.set_process_flags
(p_blocks => l_blocks
,p_attributes => l_attributes
);
Removed any effectively deleted attributes
*/
if p_cla_save = 'NO' then ------------- CLA change
hxc_timecard_attribute_utils.remove_deleted_attributes
(p_attributes => l_attributes);
hxc_block_attribute_update.denormalize_time
(p_blocks => l_blocks
,p_mode => 'REMOVE'
);
p_messages.delete;
hr_utility.trace('SVG: Rollingback to savepoint TC_SUB_SAVEPOINT for any Projects related updates');
hxc_block_attribute_update.replace_ids
(p_blocks => g_deposit_blocks
,p_attributes => g_deposit_attributes
, p_duplicate_template => FALSE
);
hxc_timecard_summary_pkg.update_summary_row
(p_timecard_id => p_timecard_id
,p_approval_item_type => p_item_type
,p_approval_process_name => p_approval_prc
,p_approval_item_key => l_item_key
);
delete_null_entries(p_timecard_id => p_timecard_id
,p_timecard_ovn => p_timecard_ovn);
g_deposit_blocks.delete;
g_deposit_attributes.delete;
g_audit_messages.delete;
g_deposit_blocks.delete;
g_deposit_attributes.delete;
g_audit_messages.delete;
select locker_type_id
from hxc_locker_types
where locker_type = p_locker_type
and process_type = p_process_type;
transaction reference has been updated, but the user has clicked
the back button. No code should be updated in the validate phase
in OTL
*/
if(p_validate=hxc_timecard.c_yes) then
rollback;
SELECT rowidtochar(loc.rowid)
INTO d_lock_rowid
FROM hxc_locks loc
WHERE loc.resource_id = l_resource_id
AND TRUNC(loc.start_time) = TRUNC(l_timecard_start_time)
AND TRUNC(loc.stop_time) = TRUNC(l_timecard_stop_time);
SELECT 1
INTO d_exists
FROM hxc_locks loc
WHERE loc.resource_id = l_resource_id
AND TRUNC(loc.start_time) = TRUNC(l_timecard_start_time)
AND TRUNC(loc.stop_time) = TRUNC(l_timecard_stop_time)
AND lock_date >= SYSDATE - (1/(48))
AND loc.rowid <> p_lock_rowid
AND loc.locker_type_id = l_locker_type_requestor_id
AND ROWNUM < 2 ;
hr_utility.trace('ABS> call hxc_retrieve_absences.insert_absence_summary_row');
hxc_retrieve_absences.insert_absence_summary_row;
,p_load_mode in varchar2 default c_nondelete
) return hxc_block_table_type is
cursor c_blocks
(p_tc_id in hxc_time_building_blocks.time_building_block_id%type
) is
select tbb.time_building_block_id
,tbb.object_version_number
from hxc_time_building_blocks tbb
where tbb.date_to = hr_general.end_of_time
start with (tbb.time_building_block_id = p_tc_id)
connect by prior tbb.time_building_block_id = tbb.parent_building_block_id
and prior tbb.object_version_number = tbb.parent_building_block_ovn;
if(p_load_mode = c_delete) then
--
-- Date effectively end date the block
--
l_blocks(l_block_count).date_to := fnd_date.date_to_canonical(sysdate);
select ta.time_attribute_id
,ta.attribute_category
,ta.attribute1
,ta.attribute2
,ta.attribute3
,ta.attribute4
,ta.attribute5
,ta.attribute6
,ta.attribute7
,ta.attribute8
,ta.attribute9
,ta.attribute10
,ta.attribute11
,ta.attribute12
,ta.attribute13
,ta.attribute14
,ta.attribute15
,ta.attribute16
,ta.attribute17
,ta.attribute18
,ta.attribute19
,ta.attribute20
,ta.attribute21
,ta.attribute22
,ta.attribute23
,ta.attribute24
,ta.attribute25
,ta.attribute26
,ta.attribute27
,ta.attribute28
,ta.attribute29
,ta.attribute30
,ta.bld_blk_info_type_id
,ta.object_version_number
,bbit.bld_blk_info_type
from hxc_time_attribute_usages tau, hxc_time_attributes ta, hxc_bld_blk_info_types bbit
where tau.time_building_block_id = p_building_block_id
and tau.time_building_block_ovn = p_building_block_ovn
and ta.time_attribute_id = tau.time_attribute_id
and ta.bld_blk_info_type_id = bbit.bld_blk_info_type_id;
Procedure delete_timecard
(p_mode in varchar2
,p_template in varchar2
,p_timecard_id in hxc_time_building_blocks.time_building_block_id%type
,p_timecard_ok in out nocopy varchar2
) is
cursor c_timecard_ovn
(p_timecard_id in hxc_time_building_blocks.time_building_block_id%type) is
select tbb.object_version_number, tbb.resource_id, tbb.start_time, tbb.stop_time
from hxc_time_building_blocks tbb
where tbb.time_building_block_id = p_timecard_id
and tbb.date_to = hr_general.end_of_time;
select distinct fad.pk1_value,fad.pk2_value ,fad.pk3_value
from hxc_timecard_summary hts,
fnd_attached_documents fad
where fad.entity_name = 'HXC_TIMECARD_SUMMARY'
and hts.timecard_id = p_timecard_id
and hts.resource_id = fad.pk1_value
and regexp_replace(fnd_date.date_to_canonical(trunc(hts.start_time)),' .*') = fad.pk2_value
and regexp_replace(fnd_date.date_to_canonical(trunc(hts.stop_time)),' .*') = fad.pk3_value
;
l_delete_allowed varchar2(5) := 'FALSE';
l_blocks := load_blocks(p_timecard_id, l_timecard_ovn, c_delete);
l_messages.delete;
hxc_block_attribute_update.set_process_flags
(p_blocks => l_blocks
,p_attributes => l_attributes
);
,p_resubmit => c_delete
,p_can_deposit => l_dummy
);
hxc_deposit_checks.can_delete_template
(l_blocks(l_timecard_index).time_building_block_id
,l_messages
);
Removed following call. This is done inside delete_timecard on the
summary api.
hxc_find_notify_aprs_pkg.cancel_previous_notifications(p_timecard_id);
hxc_template_summary_api.DELETE_TEMPLATE(l_blocks(l_timecard_index).time_building_block_id);
hr_utility.trace('Start of delete attachments');
hr_utility.trace('call to delete attachments...fnd_attached_documents2_pkg.delete_attachments');
fnd_attached_documents2_pkg.delete_attachments
( X_entity_name => 'HXC_TIMECARD_SUMMARY'
, X_pk1_value => l_pk1_value
, X_pk2_value => l_pk2_value
, X_pk3_value => l_pk3_value
, X_delete_document_flag => 'Y');
hr_utility.trace('End of delete attachments');
hxc_timecard_summary_api.delete_timecard
(p_blocks => l_blocks
,p_timecard_id => p_timecard_id
);
hr_utility.trace('ABS:Initiated Online Retrieval from HXC_TIMECARD.DELETE_TIMECARD');
'DELETED',
l_messages);
End delete_timecard;
Procedure delete_null_entries
(p_timecard_id in hxc_time_building_blocks.time_building_block_id%type
,p_timecard_ovn in hxc_time_building_blocks.object_version_number%type
)is
cursor c_null_blocks
(p_timecard_id in hxc_time_building_blocks.time_building_block_id%type
) is
SELECT det.time_building_block_id ,
det.object_version_number
FROM hxc_time_building_blocks DET,
HXC_TIME_BUILDING_BLOCKS DAY
WHERE day.parent_building_block_id = p_timecard_id
AND det.parent_building_block_ovn = day.object_version_number
AND det.parent_building_block_id = day.time_building_block_id
AND det.scope = 'DETAIL'
AND det.measure IS NULL
AND det.start_time IS NULL
AND det.stop_time IS NULL;
DELETE
FROM hxc_time_building_blocks
WHERE time_building_block_id = bb_id_tab(i)
AND object_version_number = bb_ovn_tab(i);
End delete_null_entries;