Tuesday, March 6, 2012

API To Delete whole time card for the week in OTL

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 => 37275996); --p_building_block_id  is the timecard id with scope 'Timecard' and endate should be ''12/31/4712

   COMMIT;
END;

1 comment: