/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2016 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_flexfield_list_v
AS 
SELECT distinct id_flex_structure_name flexfield_name, application_id,'KFF' flexfield_type
FROM FND_ID_FLEX_STRUCTURES_VL
UNION
SELECT distincT descriptive_flexfield_name flexfield_name, application_id,'DFF' flexfield_type
FROM FND_DESCR_FLEX_CONTEXTS_VL
WHERE  descriptive_flexfield_name NOT LIKE '$SRS$%';
  
BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'xxas_flexfield_list_v'
   ,p_description            => 'Applaud Flexfield List View');
END;
/
COMMIT;
EXIT;
