/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2017 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

CREATE OR REPLACE VIEW xxas_absence_event_v 
AS
SELECT paaf.*
      ,null transaction_id
      ,null transaction_step_id
      ,null start_time
      ,null end_time
FROM   per_all_assignments_f   paaf
WHERE  trunc(sysdate) BETWEEN paaf.effective_start_date
                      AND     paaf.effective_end_date
AND    paaf.primary_flag = 'Y'
AND    (paaf.assignment_type    = 'E'
        OR paaf.assignment_type = 'C');

BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_ABSENCE_EVENT_V'
   ,p_description            => 'Applaud Absence Events View');
END;
/

COMMIT;
EXIT;

