Search This Blog

Sunday, July 28, 2013

OTL API to delete whole time card for the week

DECLARE
   -- Constant declarations
   l_otl_appl_id CONSTANT NUMBER (3) := 809; --OTL application id
   l_resp_appl_id NUMBER (10) := 51102; --OTL Responsibility id
l_user_id VARCHAR2 (20) := 120345; -- id from fnd_user table
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 => l_user_id,
resp_id => l_resp_appl_id,
resp_appl_id => l_otl_appl_id); -- This is the appl_id for OTL, do not change

--
--Delte time card API calling
--
hxc_timestore_deposit.DELETE_TIMECARD (p_building_block_id => 3423423); --p_building_block_id is the timecard id with scope 'Timecard' and endate should be ''12/31/4712

COMMIT;
END;

No comments:

Post a Comment