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

CREATE OR REPLACE VIEW xxas_tcm_pend_clk_approvers_v
AS
SELECT xtpc.pending_clock_id
  ,      xtpc.assignment_id
  ,      xtpc.person_id
  ,      xtpc.start_date_time
  ,      xtpc.element_type_id
  ,      xtpc.pending_details
  ,      xtpc.created_by
  ,      xtpc.creation_date
  ,      xtpc.last_update_date
  ,      xtpc.last_updated_by
  ,      xtpc.last_update_login
  ,      xtpc.status_code
  ,      xtpc.missed_in_flag
  ,      xtpc.missed_out_flag
  ,      xtpc.reason_for_miss
  ,      xtpc.others_reason_detail
  ,      xtpc.auto_saved_start_time
  ,      xtpc.auto_saved_end_time
  ,      xtpc.current_state_code
  ,      xtpc.current_state
  ,      xtpc.current_ins_upd_del
  ,      xtpc.internal_data_id
  ,      xtpc.data_id
  ,      xtpc.data_type
  ,      xtpc.comments
  ,      xcdaa.transaction_id    current_transaction_id
  ,      xcdaa.approver_role     current_approver_role
  FROM   xxas_tcm_pend_entry_state_v     xtpc
  ,      xxas_com_data_ame_approvers_v  xcdaa
  WHERE  xtpc.internal_data_id = xcdaa.internal_data_id(+);
  
BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_TCM_PEND_CLK_APPROVERS_V'
   ,p_description            => 'Applaud tcm pending log entry approvers view');
END;
/

COMMIT;
EXIT;