Tuesday, March 6, 2012

API To Delete timecard Detail(row wise) in OTL

DECLARE
-- Constant declarations
-- This is the appl_id for OTL, do not change
c_otl_appl_id CONSTANT NUMBER (3) := 809;
-- Variable declarations
-- declare the PL/SQL Table that will hold the complete timecard (all the BBs)
l_tbl_timecard_info hxc_self_service_time_deposit.timecard_info;

-- declare the PL/SQL Table that will hold all the attributes

l_tbl_attributes_info hxc_self_service_time_deposit.app_attributes_info;

-- declare the PL/SQL Table that will hold the messages returned by the API
l_tbl_messages hxc_self_service_time_deposit.message_table;
l_out_timecard_id hxc_time_building_blocks.time_building_block_id%TYPE;
l_out_timecard_ovn hxc_time_building_blocks.object_version_number%TYPE;
BEGIN
-- First initialize your session, this needs to be done for internal reasons so
-- the TimeStore knows who is trying to deposit the information. When you log
-- into SS, the same is done for you by the framework, here however we have to do
-- it manually.
FND_GLOBAL.APPS_INITIALIZE( user_id => 120345
,resp_id => 51102
,resp_appl_id => 809 );-- This is the appl_id for OTL, do not change
--xc_self_service_time_deposit.delete_timecard(37276080, sysdate, 'DELETE','OTL Deposit Process',null);
hxc_timestore_deposit.delete_detail_bb (
p_building_block_id =>37276080,
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info
);
hxc_timestore_deposit.execute_deposit_process (
p_validate=> FALSE,
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info,
p_messages=> l_tbl_messages,
p_mode=> 'SUBMIT',
p_deposit_process=> 'OTL Deposit Process',
p_timecard_id=> l_out_timecard_id,
p_timecard_ovn=> l_out_timecard_ovn
);
COMMIT;
END;

2 comments:

  1. thanks Kumar,

    did u manage to successfully call two delete_detail_bb one after the other? I mean, delete two consecutive timecard entries?


    ReplyDelete
  2. Oracle Apps R12 and Fusion Cloud Self Paced Training Videos by Industry Experts. Please check https://www.oracleappstechnical.com

    ReplyDelete