-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathPSA Budgetary Control Transactions.sql
More file actions
114 lines (108 loc) · 3.66 KB
/
PSA Budgetary Control Transactions.sql
File metadata and controls
114 lines (108 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*************************************************************************/
/* */
/* (c) 2010-2024 Enginatics GmbH */
/* www.enginatics.com */
/* */
/*************************************************************************/
-- Report Name: PSA Budgetary Control Transactions
-- Description: Imported from Concurrent Program
Description: Budgetary Control Results Report Program
Application: Public Sector Financials
Source: Budgetary Control Results Report
Short Name: PSABCRRP
DB package: XXEN_PSA
The Expand Amounts Yes/No Parameter determines whether or not the Budget, Encumbrances, Expenditures, and Funds Available Amounts are displayed on the same excel row (Expand=No) or are split into separate excel rows (Expand=Yes) in the generated excel.
The following templates are provided with this report:
Budgetary Control Transactions Pivot
===========================
Corresponds to the standard Oracle Budgetary Control Status Report.
Budget, Encumbrances, Expenditures, and Funds Available Amounts are displayed on separate rows in the generated Excel
Budgetary Control Transactions Extract
============================
Flat File one row per transaction extract.
Budget, Encumbrances, Expenditures, and Funds Available Amounts are included as separate columns on the same excel row
-- Excel Examle Output: https://www.enginatics.com/example/psa-budgetary-control-transactions/
-- Library Link: https://www.enginatics.com/reports/psa-budgetary-control-transactions/
-- Run Report: https://demo.enginatics.com/
select
gl.name ledger,
pbrg.application_name,
pbrg.application_short_name,
--
pbrg.accounting_flexfield account_combination,
nvl(pbrg.account_type_meaning,xxen_util.meaning(gcck.gl_account_type,'ACCOUNT_TYPE',0)) account_type,
--
pbrg.period_name period,
pbrg.period_year,
pbrg.period_num,
pbrg.quarter_num,
--
pbrg.batch_reference,
pbrg.document_reference,
pbrg.document_status,
pbrg.actual_flag_meaning actual_flag,
pbrg.vendor_name supplier,
pbrg.vendor_site_name supplier_site,
decode(pbrg.line_reference,'''Summary''','Summary',pbrg.line_reference) line_reference,
pbrg.funds_check_status result_status_type,
pbrg.funds_check_level_meaning funds_check_level,
pbrg.result_message,
--
pbrg.available_total_balance previous_funds_availabe,
pbrg.amount base_amount,
pbrg.current_funds_available current_funds_available,
pbrg.amount_type_meaning amount_type,
pbrg.boundary,
pbrg.funding_budget_name,
pbrg.budget_type,
pbrg.encumbrance_type,
--
&lp_expand_columns
--
pbrg.currency_code,
--
pbrg.je_source_name,
pbrg.je_category_name,
pbrg.je_batch_name,
pbrg.je_header_name,
decode(pbrg.journal_line_number,'''Summary''','Summary',pbrg.journal_line_number) journal_line_number,
pbrg.debit_credit_indicator,
pbrg.summary_account_indicator,
--
pbrg.document_sequence_number,
pbrg.je_batch_id,
pbrg.event_id,
pbrg.ae_header_id,
pbrg.ae_line_num,
pbrg.po_line_number,
pbrg.po_dist_line_number,
pbrg.po_ship_line_number,
pbrg.req_line_number,
pbrg.req_dist_line_number,
pbrg.inv_line_number,
--
pbrg.budget_level,
pbrg.treasury_symbol,
pbrg.funds_check_status_code,
pbrg.result_code,
pbrg.error_source
from
&lp_expand_tables
psa_bc_results_gt pbrg,
gl_ledgers gl,
gl_code_combinations_kfv gcck
where
pbrg.ledger_id=gl.ledger_id and
pbrg.ccid=gcck.code_combination_id(+) and
1=1
order by
&lp_order_by
pbrg.accounting_flexfield,
pbrg.period_year,
pbrg.period_num,
pbrg.application_name,
pbrg.actual_flag_meaning desc,
pbrg.batch_reference,
pbrg.document_reference,
pbrg.document_status
&lp_expand_order_by