select decode(record_category, 'GTAS_UNDEFINED', 'Account not defined on GTAS Attributes',
'USSGL_MULTIPLE_PARENTS', 'Multiple US SGL Account Parents Defined',
'NON_USSGL_ACCT', 'Not a Valid US SGL Account',
'USSGL_DISABLED', 'Disabled US SGL Account',
'EXCH_NON_EXCH_MULTIPLE', 'Only one Exchange or Non-exchange Code must be defined for GL Account',
'CUST_NON_CUST_INVALID', 'Custodial or Noncustodial Code not valid for GL Account',
'APPOR_CAT_INVALID', 'Apportionment Category Code not valid for GL Account',
'APPOR_CATB_MISSING', 'Apportionment Category B Code is Required',
'PRC_MISSING', 'Program Reporting Category Code is Required',
'BEA_CATEGORY BEA', 'Category Code not valid for GL Account',
'BORR_SOURCE_INVALID', 'Borrowing Source Code not valid for GL Account' ,
'PYA_MULTIPLE', 'Only one Prior Year Adjustment Code must be defined for GL Account' ,
'DIREC_REIMB_INVALID', 'Direct or Reimbursable Code not valid for GL Account',
'PCI_INVALID', 'Program Cost Indicator not valid for GL Account',
'CURR_SUB_INVALID', 'Only one Current or Subsequent Code must be defined for GL Account',
'INVALID_AUTH_TYPE_CODE', 'The derived Authority Type Code derived is not valid for the GL Account based on the GTAS Attribute valid values',
'INVALID_FED_NONFED_CODE', 'The Federal or Non-Federal Code derived based on the Customer Supplier is not valid for the GL Account base on the Federal or Non-Federal Code GTAS Attribute values',
'TP_AID_NOT_IN_RANGE', 'The Trading Partner Agency ID must between "001" and "999" if derived Federal or Non-Federal Code is "F" and the Trading Partner Checkbox is checked',
'TP_MAIN_ACCT_NOT_IN_RANGE', 'The Trading Partner Main Account must between "0000" and "9999" if derived Federal or Non-Federal Code is "F" and the Trading Partner Checkbox is checked',
record_category) record_category,
tas.dept_transfer,
tas.department_id,
tas.established_fiscal_yr,
tas.end_year_avail,
tas.availability_type_code,
tas.fund_group_code,
tas.TAFS_SUB_ACCT,
tas.treasury_symbol,
r.fund_value,
r.amount,
r.AUTHORITY_TYPE_CODE,
r.DIRECT_OR_REIMB_CODE,
r.APPOR_CAT_CODE,
r.APPOR_CAT_B_CODE,
r.PROGRAM_REPT_CODE,
r.FED_NON_FED,
r.TRADING_PARTNER_AGENCY_ID,
r.TRADING_PARTNER_MAIN_ACCOUNT,
r.NEW_BAL_CODE,
r.CUR_SUBSEQUENT_CODE,
r.BEA_CAT_CODE,
r.BORR_SRC_CODE,
r.EXCH_NON_EXCH,
r.CUST_NON_CUST,
r.BUDGET_IMPACT_IND,
r.PYA_CODE,
r.CREDIT_COHORT_YR,
r.PROGRAM_COST_IND,
r.REDUCTION_TYPE_CODE,
r.USSGL_ACCOUNT
FROM fv_gtas1_report_t2 r,
fv_treasury_symbols tas
WHERE r.set_of_books_id = :P_LEDGER
AND r.reported_status = 'E'
AND r.treasury_symbol_id = tas.treasury_symbol_id
GROUP BY r.USSGL_ACCOUNT, r.record_category,
tas.dept_transfer, tas.department_id,
tas.established_fiscal_yr, tas.end_year_avail,
tas.availability_type_code, tas.fund_group_code,
tas.TAFS_SUB_ACCT, tas.treasury_symbol,
r.fund_value,r.amount,r.AUTHORITY_TYPE_CODE,
r.DIRECT_OR_REIMB_CODE,r.APPOR_CAT_CODE,r.APPOR_CAT_B_CODE, r.PROGRAM_REPT_CODE,
r.FED_NON_FED,r.TRADING_PARTNER_AGENCY_ID, r.TRADING_PARTNER_MAIN_ACCOUNT,
r.NEW_BAL_CODE,r.CUR_SUBSEQUENT_CODE,r.BEA_CAT_CODE,r.BORR_SRC_CODE,
r.EXCH_NON_EXCH,r.CUST_NON_CUST,r.BUDGET_IMPACT_IND,r.PYA_CODE,
r.CREDIT_COHORT_YR,r.PROGRAM_COST_IND,r.REDUCTION_TYPE_CODE
ORDER BY r.USSGL_ACCOUNT, r.record_category,
tas.dept_transfer, tas.department_id,
tas.established_fiscal_yr, tas.end_year_avail,
tas.availability_type_code, tas.fund_group_code,
tas.TAFS_SUB_ACCT, tas.treasury_symbol,
r.fund_value |