/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2012 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_per_person_analyses_v 
  AS
  SELECT ppa.person_analysis_id
  ,      ppa.business_group_id
  ,      ppa.analysis_criteria_id
  ,      ppa.person_id
  ,      ppa.date_from
  ,      ppa.date_to
  ,      ppa.id_flex_num
  ,      ppa.request_id
  ,      ppa.program_application_id
  ,      ppa.program_id
  ,      ppa.program_update_date
  ,      ppa.attribute_category
  ,      ppa.attribute1
  ,      ppa.attribute2
  ,      ppa.attribute3
  ,      ppa.attribute4
  ,      ppa.attribute5
  ,      ppa.attribute6
  ,      ppa.attribute7
  ,      ppa.attribute8
  ,      ppa.attribute9
  ,      ppa.attribute10
  ,      ppa.attribute11
  ,      ppa.attribute12
  ,      ppa.attribute13
  ,      ppa.attribute14
  ,      ppa.attribute15
  ,      ppa.attribute16
  ,      ppa.attribute17
  ,      ppa.attribute18
  ,      ppa.attribute19
  ,      ppa.attribute20
  ,      ppa.last_update_date
  ,      ppa.last_updated_by
  ,      ppa.last_update_login
  ,      ppa.created_by
  ,      ppa.creation_date
  ,      ppa.object_version_number
  ,      ppa.party_id
  ,      xxas_util_pkg.long_to_varchar2
           ('PER_PERSON_ANALYSES', 'COMMENTS', ppa.rowid) comments
  ,      fifs.id_flex_structure_code
  ,      pac.segment1
  ,      pac_d.segment1_value
  ,      pac_d.segment1_meaning
  ,      pac.segment2
  ,      pac_d.segment2_value
  ,      pac_d.segment2_meaning
  ,      pac.segment3
  ,      pac_d.segment3_value
  ,      pac_d.segment3_meaning
  ,      pac.segment4
  ,      pac_d.segment4_value
  ,      pac_d.segment4_meaning
  ,      pac.segment5
  ,      pac_d.segment5_value
  ,      pac_d.segment5_meaning
  ,      pac.segment6
  ,      pac_d.segment6_value
  ,      pac_d.segment6_meaning
  ,      pac.segment7
  ,      pac_d.segment7_value
  ,      pac_d.segment7_meaning
  ,      pac.segment8
  ,      pac_d.segment8_value
  ,      pac_d.segment8_meaning
  ,      pac.segment9
  ,      pac_d.segment9_value
  ,      pac_d.segment9_meaning
  ,      pac.segment10
  ,      pac_d.segment10_value
  ,      pac_d.segment10_meaning
  ,      pac.segment11
  ,      pac_d.segment11_value
  ,      pac_d.segment11_meaning
  ,      pac.segment12
  ,      pac_d.segment12_value
  ,      pac_d.segment12_meaning
  ,      pac.segment13
  ,      pac_d.segment13_value
  ,      pac_d.segment13_meaning
  ,      pac.segment14
  ,      pac_d.segment14_value
  ,      pac_d.segment14_meaning
  ,      pac.segment15
  ,      pac_d.segment15_value
  ,      pac_d.segment15_meaning
  ,      pac.segment16
  ,      pac_d.segment16_value
  ,      pac_d.segment16_meaning
  ,      pac.segment17
  ,      pac_d.segment17_value
  ,      pac_d.segment17_meaning
  ,      pac.segment18
  ,      pac_d.segment18_value
  ,      pac_d.segment18_meaning
  ,      pac.segment19
  ,      pac_d.segment19_value
  ,      pac_d.segment19_meaning
  ,      pac.segment20
  ,      pac_d.segment20_value
  ,      pac_d.segment20_meaning
  ,      pac.segment21
  ,      pac_d.segment21_value
  ,      pac_d.segment21_meaning
  ,      pac.segment22
  ,      pac_d.segment22_value
  ,      pac_d.segment22_meaning
  ,      pac.segment23
  ,      pac_d.segment23_value
  ,      pac_d.segment23_meaning
  ,      pac.segment24
  ,      pac_d.segment24_value
  ,      pac_d.segment24_meaning
  ,      pac.segment25
  ,      pac_d.segment25_value
  ,      pac_d.segment25_meaning
  ,      pac.segment26
  ,      pac_d.segment26_value
  ,      pac_d.segment26_meaning
  ,      pac.segment27
  ,      pac_d.segment27_value
  ,      pac_d.segment27_meaning
  ,      pac.segment28
  ,      pac_d.segment28_value
  ,      pac_d.segment28_meaning
  ,      pac.segment29
  ,      pac_d.segment29_value
  ,      pac_d.segment29_meaning
  ,      pac.segment30
  ,      pac_d.segment30_value
  ,      pac_d.segment30_meaning
  ,      pend.transaction_id
  ,      pend.transaction_step_id
  ,      pend.transaction_type
  ,      pend.hr_api_status_code
  ,      xxas_selfservice_workflow_pkg.transcode_status
           (pend.hr_api_status_code)             workflow_status_code
  ,      xxas_selfservice_workflow_pkg.decode_status
           (xxas_selfservice_workflow_pkg.transcode_status
             (pend.hr_api_status_code))          workflow_status_meaning
  ,      CASE WHEN pend.transaction_type  = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.date_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_DATE_FROM')
         END                                     date_from_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.date_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_DATE_TO')
         END                                     date_to_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.number_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ID_FLEX_NUM')
         END                                     id_flex_num_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE_CATEGORY')
         END                                     attribute_category_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE1')
         END                                     attribute1_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE2')
         END                                     attribute2_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE3')
         END                                     attribute3_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE4')
         END                                     attribute4_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE5')
         END                                     attribute5_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE6')
         END                                     attribute6_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE7')
         END                                     attribute7_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE8')
         END                                     attribute8_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE9')
         END                                     attribute9_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE10')
         END                                     attribute10_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE11')
         END                                     attribute11_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE12')
         END                                     attribute12_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE13')
         END                                     attribute13_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE14')
         END                                     attribute14_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE15')
         END                                     attribute15_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE16')
         END                                     attribute16_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE17')
         END                                     attribute17_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE18')
         END                                     attribute18_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE19')
         END                                     attribute19_p
  ,      CASE WHEN pend.transaction_type = 'UPDATE'
              THEN xxas_hr_api_transaction_pkg.varchar2_value
                     (pend.person_id
                     ,pend.api_name
                     ,pend.transaction_step_id
                     ,'P_ATTRIBUTE20')
         END                                     attribute20_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment1
         END                                     segment1_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment1_value
         END                                     segment1_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment1_meaning
         END                                     segment1_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment2
         END                                     segment2_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment2_value
         END                                     segment2_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment2_meaning
         END                                     segment2_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment3
         END                                     segment3_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment3_value
         END                                     segment3_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment3_meaning
         END                                     segment3_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment4
         END                                     segment4_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment4_value
         END                                     segment4_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment4_meaning
         END                                     segment4_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment5
         END                                     segment5_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment5_value
         END                                     segment5_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment5_meaning
         END                                     segment5_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment6
         END                                     segment6_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment6_value
         END                                     segment6_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment6_meaning
         END                                     segment6_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment7
         END                                     segment7_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment7_value
         END                                     segment7_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment7_meaning
         END                                     segment7_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment8
         END                                     segment8_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment8_value
         END                                     segment8_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment8_meaning
         END                                     segment8_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment9
         END                                     segment9_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment9_value
         END                                     segment9_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment9_meaning
         END                                     segment9_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment10
         END                                     segment10_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment10_value
         END                                     segment10_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment10_meaning
         END                                     segment10_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment11
         END                                     segment11_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment11_value
         END                                     segment11_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment11_meaning
         END                                     segment11_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment12
         END                                     segment12_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment12_value
         END                                     segment12_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment12_meaning
         END                                     segment12_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment13
         END                                     segment13_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment13_value
         END                                     segment13_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment13_meaning
         END                                     segment13_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment14
         END                                     segment14_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment14_value
         END                                     segment14_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment14_meaning
         END                                     segment14_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment15
         END                                     segment15_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment15_value
         END                                     segment15_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment15_meaning
         END                                     segment15_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment16
         END                                     segment16_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment16_value
         END                                     segment16_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment16_meaning
         END                                     segment16_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment17
         END                                     segment17_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment17_value
         END                                     segment17_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment17_meaning
         END                                     segment17_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment18
         END                                     segment18_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment18_value
         END                                     segment18_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment18_meaning
         END                                     segment18_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment19
         END                                     segment19_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment19_value
         END                                     segment19_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment19_meaning
         END                                     segment19_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment20
         END                                     segment20_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment20_value
         END                                     segment20_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment20_meaning
         END                                     segment20_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment21
         END                                     segment21_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment21_value
         END                                     segment21_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment21_meaning
         END                                     segment21_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment22
         END                                     segment22_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment22_value
         END                                     segment22_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment22_meaning
         END                                     segment22_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment23
         END                                     segment23_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment23_value
         END                                     segment23_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment23_meaning
         END                                     segment23_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment24
         END                                     segment24_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment24_value
         END                                     segment24_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment24_meaning
         END                                     segment24_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment25
         END                                     segment25_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment25_value
         END                                     segment25_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment25_meaning
         END                                     segment25_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment26
         END                                     segment26_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment26_value
         END                                     segment26_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment26_meaning
         END                                     segment26_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment27
         END                                     segment27_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment27_value
         END                                     segment27_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment27_meaning
         END                                     segment27_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment28
         END                                     segment28_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment28_value
         END                                     segment28_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment28_meaning
         END                                     segment28_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment29
         END                                     segment29_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment29_value
         END                                     segment29_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment29_meaning
         END                                     segment29_meaning_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc.segment30
         END                                     segment30_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment30_value
         END                                     segment30_value_p
  ,      CASE WHEN transaction_type = 'UPDATE'
              THEN pendc_d.segment30_meaning
         END                                     segment30_meaning_p
  ,      'PQH_SS_ATTACHMENT'                     attachment_entity
  ,      pend.transaction_id                     attachment_pk1
  FROM   per_person_analyses    ppa
  ,      per_analysis_criteria  pac
  ,      fnd_id_flex_structures fifs
  ,      (SELECT ppap.person_id
          ,      ppap.person_analysis_id
          ,      hats.api_name
          ,      hat.transaction_id
          ,      hats.transaction_step_id
          ,      tt.varchar2_value             transaction_type
          ,      hat.status                    hr_api_status_code
          ,      aci.number_value              analysis_criteria_id
          FROM   per_person_analyses       ppap
          ,      hr_api_transactions       hat
          ,      hr_api_transaction_steps  hats
          ,      hr_api_transaction_values hatv
          ,      hr_api_transaction_values tt
          ,      hr_api_transaction_values aci
          WHERE  ppap.person_id           = hat.selected_person_id
          AND    hat.status          NOT IN ('D', 'N', 'W', 'ACTIVE', 'AC')
          AND    hat.transaction_id       = hats.transaction_id
          AND    hats.api_name            = 'HR_PROCESS_SIT_SS.PROCESS_API'
          AND    hats.transaction_step_id = hatv.transaction_step_id
          AND    hatv.name                = 'P_PERSON_ANALYSIS_ID'
          AND    hatv.number_value        = ppap.person_analysis_id
          AND    hats.transaction_step_id = tt.transaction_step_id
          AND    tt.name                  = 'P_ACTION'
          AND    hats.transaction_step_id = aci.transaction_step_id
          AND    aci.name                 = 'P_ANALYSIS_CRITERIA_ID' ) pend
  ,     per_analysis_criteria pendc
  ,     TABLE(xxas_com_flex_pkg.kff_value_set_details
              (800
              ,'PEA'
              ,fifs.id_flex_structure_code
              ,'SEGMENT1'
              ,pac.segment1
              ,'SEGMENT2'
              ,pac.segment2
              ,'SEGMENT3'
              ,pac.segment3
              ,'SEGMENT4'
              ,pac.segment4
              ,'SEGMENT5'
              ,pac.segment5
              ,'SEGMENT6'
              ,pac.segment6
              ,'SEGMENT7'
              ,pac.segment7
              ,'SEGMENT8'
              ,pac.segment8
              ,'SEGMENT9'
              ,pac.segment9
              ,'SEGMENT10'
              ,pac.segment10
              ,'SEGMENT11'
              ,pac.segment11
              ,'SEGMENT12'
              ,pac.segment12
              ,'SEGMENT13'
              ,pac.segment13
              ,'SEGMENT14'
              ,pac.segment14
              ,'SEGMENT15'
              ,pac.segment15
              ,'SEGMENT16'
              ,pac.segment16
              ,'SEGMENT17'
              ,pac.segment17
              ,'SEGMENT18'
              ,pac.segment18
              ,'SEGMENT19'
              ,pac.segment19
              ,'SEGMENT20'
              ,pac.segment20
              ,'SEGMENT21'
              ,pac.segment21
              ,'SEGMENT22'
              ,pac.segment22
              ,'SEGMENT23'
              ,pac.segment23
              ,'SEGMENT24'
              ,pac.segment24
              ,'SEGMENT25'
              ,pac.segment25
              ,'SEGMENT26'
              ,pac.segment26
              ,'SEGMENT27'
              ,pac.segment27
              ,'SEGMENT28'
              ,pac.segment28
              ,'SEGMENT29'
              ,pac.segment29
              ,'SEGMENT30'
              ,pac.segment30)) pac_d
  ,     TABLE(xxas_com_flex_pkg.kff_value_set_details
              (800
              ,'PEA'
              ,fifs.id_flex_structure_code
              ,'SEGMENT1'
              ,pendc.segment1
              ,'SEGMENT2'
              ,pendc.segment2
              ,'SEGMENT3'
              ,pendc.segment3
              ,'SEGMENT4'
              ,pendc.segment4
              ,'SEGMENT5'
              ,pendc.segment5
              ,'SEGMENT6'
              ,pendc.segment6
              ,'SEGMENT7'
              ,pendc.segment7
              ,'SEGMENT8'
              ,pendc.segment8
              ,'SEGMENT9'
              ,pendc.segment9
              ,'SEGMENT10'
              ,pendc.segment10
              ,'SEGMENT11'
              ,pendc.segment11
              ,'SEGMENT12'
              ,pendc.segment12
              ,'SEGMENT13'
              ,pendc.segment13
              ,'SEGMENT14'
              ,pendc.segment14
              ,'SEGMENT15'
              ,pendc.segment15
              ,'SEGMENT16'
              ,pendc.segment16
              ,'SEGMENT17'
              ,pendc.segment17
              ,'SEGMENT18'
              ,pendc.segment18
              ,'SEGMENT19'
              ,pendc.segment19
              ,'SEGMENT20'
              ,pendc.segment20
              ,'SEGMENT21'
              ,pendc.segment21
              ,'SEGMENT22'
              ,pendc.segment22
              ,'SEGMENT23'
              ,pendc.segment23
              ,'SEGMENT24'
              ,pendc.segment24
              ,'SEGMENT25'
              ,pendc.segment25
              ,'SEGMENT26'
              ,pendc.segment26
              ,'SEGMENT27'
              ,pendc.segment27
              ,'SEGMENT28'
              ,pendc.segment28
              ,'SEGMENT29'
              ,pendc.segment29
              ,'SEGMENT30'
              ,pendc.segment30)) pendc_d
  WHERE  ppa.analysis_criteria_id  = pac.analysis_criteria_id
  AND    ppa.id_flex_num           = fifs.id_flex_num
  AND    fifs.application_id       = 800
  AND    fifs.id_flex_code         = 'PEA'
  AND    ppa.person_id             = pend.person_id(+)
  AND    ppa.person_analysis_id    = pend.person_analysis_id(+)
  AND    pend.analysis_criteria_id = pendc.analysis_criteria_id(+)
  UNION ALL
  SELECT NULL                                       person_analysis_id
  ,      NULL                                       business_group_id
  ,      NULL                                       analysis_criteria_id
  ,      hat.selected_person_id                     person_id
  ,      NULL                                       date_from
  ,      NULL                                       date_to
  ,      NULL                                       id_flex_num
  ,      NULL                                       request_id
  ,      NULL                                       program_application_id
  ,      NULL                                       program_id
  ,      NULL                                       program_update_date
  ,      NULL                                       attribute_category
  ,      NULL                                       attribute1
  ,      NULL                                       attribute2
  ,      NULL                                       attribute3
  ,      NULL                                       attribute4
  ,      NULL                                       attribute5
  ,      NULL                                       attribute6
  ,      NULL                                       attribute7
  ,      NULL                                       attribute8
  ,      NULL                                       attribute9
  ,      NULL                                       attribute10
  ,      NULL                                       attribute11
  ,      NULL                                       attribute12
  ,      NULL                                       attribute13
  ,      NULL                                       attribute14
  ,      NULL                                       attribute15
  ,      NULL                                       attribute16
  ,      NULL                                       attribute17
  ,      NULL                                       attribute18
  ,      NULL                                       attribute19
  ,      NULL                                       attribute20
  ,      NULL                                       last_update_date
  ,      NULL                                       last_updated_by
  ,      NULL                                       last_update_login
  ,      NULL                                       created_by
  ,      NULL                                       creation_date
  ,      NULL                                       object_version_number
  ,      NULL                                       party_id
  ,      NULL                                       comments
  ,      fifs.id_flex_structure_code                id_flex_structure_code
  ,      NULL                                       segment1
  ,      NULL                                       segment1_value
  ,      NULL                                       segment1_meaning
  ,      NULL                                       segment2
  ,      NULL                                       segment2_value
  ,      NULL                                       segment2_meaning
  ,      NULL                                       segment3
  ,      NULL                                       segment3_value
  ,      NULL                                       segment3_meaning
  ,      NULL                                       segment4
  ,      NULL                                       segment4_value
  ,      NULL                                       segment4_meaning
  ,      NULL                                       segment5
  ,      NULL                                       segment5_value
  ,      NULL                                       segment5_meaning
  ,      NULL                                       segment6
  ,      NULL                                       segment6_value
  ,      NULL                                       segment6_meaning
  ,      NULL                                       segment7
  ,      NULL                                       segment7_value
  ,      NULL                                       segment7_meaning
  ,      NULL                                       segment8
  ,      NULL                                       segment8_value
  ,      NULL                                       segment8_meaning
  ,      NULL                                       segment9
  ,      NULL                                       segment9_value
  ,      NULL                                       segment9_meaning
  ,      NULL                                       segment10
  ,      NULL                                       segment10_value
  ,      NULL                                       segment10_meaning
  ,      NULL                                       segment11
  ,      NULL                                       segment11_value
  ,      NULL                                       segment11_meaning
  ,      NULL                                       segment12
  ,      NULL                                       segment12_value
  ,      NULL                                       segment12_meaning
  ,      NULL                                       segment13
  ,      NULL                                       segment13_value
  ,      NULL                                       segment13_meaning
  ,      NULL                                       segment14
  ,      NULL                                       segment14_value
  ,      NULL                                       segment14_meaning
  ,      NULL                                       segment15
  ,      NULL                                       segment15_value
  ,      NULL                                       segment15_meaning
  ,      NULL                                       segment16
  ,      NULL                                       segment16_value
  ,      NULL                                       segment16_meaning
  ,      NULL                                       segment17
  ,      NULL                                       segment17_value
  ,      NULL                                       segment17_meaning
  ,      NULL                                       segment18
  ,      NULL                                       segment18_value
  ,      NULL                                       segment18_meaning
  ,      NULL                                       segment19
  ,      NULL                                       segment19_value
  ,      NULL                                       segment19_meaning
  ,      NULL                                       segment20
  ,      NULL                                       segment20_value
  ,      NULL                                       segment20_meaning
  ,      NULL                                       segment21
  ,      NULL                                       segment21_value
  ,      NULL                                       segment21_meaning
  ,      NULL                                       segment22
  ,      NULL                                       segment22_value
  ,      NULL                                       segment22_meaning
  ,      NULL                                       segment23
  ,      NULL                                       segment23_value
  ,      NULL                                       segment23_meaning
  ,      NULL                                       segment24
  ,      NULL                                       segment24_value
  ,      NULL                                       segment24_meaning
  ,      NULL                                       segment25
  ,      NULL                                       segment25_value
  ,      NULL                                       segment25_meaning
  ,      NULL                                       segment26
  ,      NULL                                       segment26_value
  ,      NULL                                       segment26_meaning
  ,      NULL                                       segment27
  ,      NULL                                       segment27_value
  ,      NULL                                       segment27_meaning
  ,      NULL                                       segment28
  ,      NULL                                       segment28_value
  ,      NULL                                       segment28_meaning
  ,      NULL                                       segment29
  ,      NULL                                       segment29_value
  ,      NULL                                       segment29_meaning
  ,      NULL                                       segment30
  ,      NULL                                       segment30_value
  ,      NULL                                       segment30_meaning
  ,      hat.transaction_id
  ,      hats.transaction_step_id
  ,      tt.varchar2_value                          transaction_type
  ,      hat.status                                 hr_api_status_code
  ,      xxas_selfservice_workflow_pkg.transcode_status(hat.status) workflow_status_code
  ,      xxas_selfservice_workflow_pkg.decode_status
           (xxas_selfservice_workflow_pkg.transcode_status(hat.status)) workflow_status_meaning
  ,      xxas_hr_api_transaction_pkg.date_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_DATE_FROM')                          date_from_p
  ,      xxas_hr_api_transaction_pkg.date_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_DATE_TO')                            date_to_p
  ,      xxas_hr_api_transaction_pkg.number_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ID_FLEX_NUM')                        id_flex_num_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE_CATEGORY')                 attribute_category_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE1')                         attribute1_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE2')                         attribute2_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE3')                         attribute3_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE4')                         attribute4_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE5')                         attribute5_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE6')                         attribute6_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE7')                         attribute7_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE8')                         attribute8_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE9')                         attribute9_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE10')                        attribute10_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE11')                        attribute11_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE12')                        attribute12_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE13')                        attribute13_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE14')                        attribute14_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE15')                        attribute15_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE16')                        attribute16_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE17')                        attribute17_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE18')                        attribute18_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE19')                        attribute19_p
  ,      xxas_hr_api_transaction_pkg.varchar2_value
           (hat.selected_person_id
           ,hats.api_name
           ,hats.transaction_step_id
           ,'P_ATTRIBUTE20')                        attribute20_p
  ,      pendc.segment1                             segment1_p
  ,      pendc_d.segment1_value                     segment1_value_p
  ,      pendc_d.segment1_meaning                   segment1_meaning_p
  ,      pendc.segment2                             segment2_p
  ,      pendc_d.segment2_value                     segment2_value_p
  ,      pendc_d.segment2_meaning                   segment2_meaning_p
  ,      pendc.segment3                             segment3_p
  ,      pendc_d.segment3_value                     segment3_value_p
  ,      pendc_d.segment3_meaning                   segment3_meaning_p
  ,      pendc.segment4                             segment4_p
  ,      pendc_d.segment4_value                     segment4_value_p
  ,      pendc_d.segment4_meaning                   segment4_meaning_p
  ,      pendc.segment5                             segment5_p
  ,      pendc_d.segment5_value                     segment5_value_p
  ,      pendc_d.segment5_meaning                   segment5_meaning_p
  ,      pendc.segment6                             segment6_p
  ,      pendc_d.segment6_value                     segment6_value_p
  ,      pendc_d.segment6_meaning                   segment6_meaning_p
  ,      pendc.segment7                             segment7_p
  ,      pendc_d.segment7_value                     segment7_value_p
  ,      pendc_d.segment7_meaning                   segment7_meaning_p
  ,      pendc.segment8                             segment8_p
  ,      pendc_d.segment8_value                     segment8_value_p
  ,      pendc_d.segment8_meaning                   segment8_meaning_p
  ,      pendc.segment9                             segment9_p
  ,      pendc_d.segment9_value                     segment9_value_p
  ,      pendc_d.segment9_meaning                   segment9_meaning_p
  ,      pendc.segment10                            segment10_p
  ,      pendc_d.segment10_value                    segment10_value_p
  ,      pendc_d.segment10_meaning                  segment10_meaning_p
  ,      pendc.segment11                            segment11_p
  ,      pendc_d.segment11_value                    segment11_value_p
  ,      pendc_d.segment11_meaning                  segment11_meaning_p
  ,      pendc.segment12                            segment12_p
  ,      pendc_d.segment12_value                    segment12_value_p
  ,      pendc_d.segment12_meaning                  segment12_meaning_p
  ,      pendc.segment13                            segment13_p
  ,      pendc_d.segment13_value                    segment13_value_p
  ,      pendc_d.segment13_meaning                  segment13_meaning_p
  ,      pendc.segment14                            segment14_p
  ,      pendc_d.segment14_value                    segment14_value_p
  ,      pendc_d.segment14_meaning                  segment14_meaning_p
  ,      pendc.segment15                            segment15_p
  ,      pendc_d.segment15_value                    segment15_value_p
  ,      pendc_d.segment15_meaning                  segment15_meaning_p
  ,      pendc.segment16                            segment16_p
  ,      pendc_d.segment16_value                    segment16_value_p
  ,      pendc_d.segment16_meaning                  segment16_meaning_p
  ,      pendc.segment17                            segment17_p
  ,      pendc_d.segment17_value                    segment17_value_p
  ,      pendc_d.segment17_meaning                  segment17_meaning_p
  ,      pendc.segment18                            segment18_p
  ,      pendc_d.segment18_value                    segment18_value_p
  ,      pendc_d.segment18_meaning                  segment18_meaning_p
  ,      pendc.segment19                            segment19_p
  ,      pendc_d.segment19_value                    segment19_value_p
  ,      pendc_d.segment19_meaning                  segment19_meaning_p
  ,      pendc.segment20                            segment20_p
  ,      pendc_d.segment20_value                    segment20_value_p
  ,      pendc_d.segment20_meaning                  segment20_meaning_p
  ,      pendc.segment21                            segment21_p
  ,      pendc_d.segment21_value                    segment21_value_p
  ,      pendc_d.segment21_meaning                  segment21_meaning_p
  ,      pendc.segment22                            segment22_p
  ,      pendc_d.segment22_value                    segment22_value_p
  ,      pendc_d.segment22_meaning                  segment22_meaning_p
  ,      pendc.segment23                            segment23_p
  ,      pendc_d.segment23_value                    segment23_value_p
  ,      pendc_d.segment23_meaning                  segment23_meaning_p
  ,      pendc.segment24                            segment24_p
  ,      pendc_d.segment24_value                    segment24_value_p
  ,      pendc_d.segment24_meaning                  segment24_meaning_p
  ,      pendc.segment25                            segment25_p
  ,      pendc_d.segment25_value                    segment25_value_p
  ,      pendc_d.segment25_meaning                  segment25_meaning_p
  ,      pendc.segment26                            segment26_p
  ,      pendc_d.segment26_value                    segment26_value_p
  ,      pendc_d.segment26_meaning                  segment26_meaning_p
  ,      pendc.segment27                            segment27_p
  ,      pendc_d.segment27_value                    segment27_value_p
  ,      pendc_d.segment27_meaning                  segment27_meaning_p
  ,      pendc.segment28                            segment28_p
  ,      pendc_d.segment28_value                    segment28_value_p
  ,      pendc_d.segment28_meaning                  segment28_meaning_p
  ,      pendc.segment29                            segment29_p
  ,      pendc_d.segment29_value                    segment29_value_p
  ,      pendc_d.segment29_meaning                  segment29_meaning_p
  ,      pendc.segment30                            segment30_p
  ,      pendc_d.segment30_value                    segment30_value_p
  ,      pendc_d.segment30_meaning                  segment30_meaning_p
  ,      'PQH_SS_ATTACHMENT'                        attachment_entity
  ,      hat.transaction_id                         attachment_pk1
  FROM   hr_api_transactions       hat
  ,      hr_api_transaction_steps  hats
  ,      hr_api_transaction_values tt
  ,      hr_api_transaction_values aci
  ,      per_analysis_criteria     pendc
  ,      fnd_id_flex_structures    fifs
  ,      TABLE(xxas_com_flex_pkg.kff_value_set_details
                (800
                ,'PEA'
                ,fifs.id_flex_structure_code
                ,'SEGMENT1'
                ,pendc.segment1
                ,'SEGMENT2'
                ,pendc.segment2
                ,'SEGMENT3'
                ,pendc.segment3
                ,'SEGMENT4'
                ,pendc.segment4
                ,'SEGMENT5'
                ,pendc.segment5
                ,'SEGMENT6'
                ,pendc.segment6
                ,'SEGMENT7'
                ,pendc.segment7
                ,'SEGMENT8'
                ,pendc.segment8
                ,'SEGMENT9'
                ,pendc.segment9
                ,'SEGMENT10'
                ,pendc.segment10
                ,'SEGMENT11'
                ,pendc.segment11
                ,'SEGMENT12'
                ,pendc.segment12
                ,'SEGMENT13'
                ,pendc.segment13
                ,'SEGMENT14'
                ,pendc.segment14
                ,'SEGMENT15'
                ,pendc.segment15
                ,'SEGMENT16'
                ,pendc.segment16
                ,'SEGMENT17'
                ,pendc.segment17
                ,'SEGMENT18'
                ,pendc.segment18
                ,'SEGMENT19'
                ,pendc.segment19
                ,'SEGMENT20'
                ,pendc.segment20
                ,'SEGMENT21'
                ,pendc.segment21
                ,'SEGMENT22'
                ,pendc.segment22
                ,'SEGMENT23'
                ,pendc.segment23
                ,'SEGMENT24'
                ,pendc.segment24
                ,'SEGMENT25'
                ,pendc.segment25
                ,'SEGMENT26'
                ,pendc.segment26
                ,'SEGMENT27'
                ,pendc.segment27
                ,'SEGMENT28'
                ,pendc.segment28
                ,'SEGMENT29'
                ,pendc.segment29
                ,'SEGMENT30'
                ,pendc.segment30)) pendc_d
  WHERE  hat.transaction_id       = hats.transaction_id
  AND    hats.api_name            = 'HR_PROCESS_SIT_SS.PROCESS_API'
  AND    hats.transaction_step_id = tt.transaction_step_id
  AND    tt.name                  = 'P_ACTION'
  AND    tt.varchar2_value        = 'INSERT'
  AND    hats.transaction_step_id = aci.transaction_step_id
  AND    aci.name                 = 'P_ANALYSIS_CRITERIA_ID'
  AND    aci.number_value         = pendc.analysis_criteria_id
  AND    pendc.id_flex_num        = fifs.id_flex_num
  AND    fifs.application_id      = 800
  AND    fifs.id_flex_code        = 'PEA'
  AND    hat.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_PER_PERSON_ANALYSES_V'
   ,p_description            => 'Applaud Person SIT');
END;
/
  
COMMIT;
EXIT;
