/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2014 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_VACANCY_REVIEW_V as 
SELECT  rslt.transaction_id
       ,rslt.transaction_ref_id vacancy_id
       ,rslt.transaction_id approvers
	   ,rslt.creator_person_id manager_id
	   ,rslt.creator_person_id recruiter_id
	   ,rslt.creator_person_id person_id
FROM    hr_api_transactions rslt
WHERE   rslt.transaction_ref_table = 'PER_ALL_VACANCIES'
AND     rslt.status NOT IN ('D', 'N', 'W', 'ACTIVE', 'AC');

BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_VACANCY_REVIEW_V'
   ,p_description            => 'Applaud Vacancy Review');
END;
/
COMMIT;
EXIT;