1 Package FV_GTAS_TRX_REGISTER AUTHID CURRENT_USER AS
2 /* $Header: FVGTATRS.pls 120.0.12020000.4 2013/02/21 21:23:03 snama noship $ */
3
4
5 P_LEDGER_ID Gl_ledgers_public_v.ledger_id%TYPE;
6 P_CHART_OF_ACCOUNTS_ID Gl_Code_Combinations.chart_of_accounts_id%TYPE;
7 P_FLEX_LOW VARCHAR2(2000);
8 P_FLEX_HIGH VARCHAR2(2000);
9 P_FROM_PERIOD Varchar2(15);
10 P_TO_PERIOD Varchar2(15);
11 P_FROM_GL_POSTED_DATE Varchar2(50);
12 P_TO_GL_POSTED_DATE Varchar2(50);
13 P_JOURNAL_SOURCE gl_je_headers.je_source%TYPE;
14 P_JOURNAL_CATEGORY gl_je_headers.je_category%TYPE;
15 P_AID_LOW fv_treasury_symbols.department_id%TYPE;
16 P_AID_HIGH fv_treasury_symbols.department_id%TYPE;
17 P_MAIN_ACCT_LOW fv_treasury_symbols.fund_group_code%TYPE;
18 P_MAIN_ACCT_HIGH fv_treasury_symbols.fund_group_code%TYPE;
19
20 FUNCTION beforereport
21 RETURN BOOLEAN;
22 ---- -------------------------------------------------------------------
23 -- PROCEDURE MAIN
24 -- ---------------------------------------------------------------------
25 -- Called from following procedures:
26 -- This is called from the concurrent program to execute GTAS
27 -- transaction register process
28 -- Purpose:
29 -- This calls all subsequent procedures
30 -- ---------------------------------------------------------------------
31 PROCEDURE main (p_errbuf OUT NOCOPY VARCHAR2,
32 p_retcode OUT NOCOPY NUMBER,
33 p_set_of_books_id NUMBER,
34 p_coa_id NUMBER,
35 p_flex_low VARCHAR2,
36 p_flex_high VARCHAR2,
37 p_from_period_name VARCHAR2,
38 p_to_period_name VARCHAR2,
39 p_from_gl_posted_date VARCHAR2,
40 p_to_gl_posted_date VARCHAR2,
41 p_journal_source VARCHAR2,
42 p_journal_category VARCHAR2,
43 p_aid_low VARCHAR2,
44 p_aid_high VARCHAR2,
45 p_main_acct_low VARCHAR2,
46 p_main_acct_high VARCHAR2
47 );
48
49 -- -------------------------------------------------------------
50 -- PROCEDURE PRCOESS PERIOD INFO
51 -- -------------------------------------------------------------
52 -- Process_Period_Info procedure is called from the Main procedure.
53 -- This procedure loads global variables 'g_period_num_low'
54 -- and 'g_period_num_high' with the derived period num range.
55 -- -------------------------------------------------------------
56
57 PROCEDURE process_period_info;
58
59 -- -------------------------------------------------------------
60 -- PROCEDURE GET QUALIFIER SEGMENTS
61 -- -------------------------------------------------------------
62 -- Get_QualIFier_Segments procedure is called from the Main
63 -- procedure.
64 -- This procedure gets the accounting and the balancing segments.
65 -- -------------------------------------------------------------
66 PROCEDURE get_qualifier_segments;
67
68 -- -------------------------------------------------------------------
69 -- PROCEDURE JOURNAL_PROCESS
70 -- -------------------------------------------------------------------
71 -- Journal_Process procedure is called from the Main procedure.
72 -- Its primary purpose is to derive values to populate
73 -- 'FV_GTAS_TRX_REG_TEMP' table from the rows derived from INVOICES,
74 -- PAYMENTS etc. It uses Dynamic SQL to dynamically set
75 -- the select statement for the cursor.
76 -- It uses the argument 'p_jrnl_type' to find whether the journal
77 -- type is Invoice or payment, etc. The valid journal type values
78 -- INV-Invoice, PMT-Payment, REC-Receivable, ORD-Purchase Order
79 -- -------------------------------------------------------------------
80
81 PROCEDURE journal_process;
82
83
84 -- -------------------------------------------------------------------
85 -- PROCEDURE GET_DOC_USER
86 -- -------------------------------------------------------------------
87 -- Called from following procedures:
88 -- Journal_Process
89 -- Purpose:
90 -- Determine the user who created the journal line being processed
91 -- Also format the creation_date
92 -- -------------------------------------------------------------------
93
94 PROCEDURE get_doc_user (p_created_by NUMBER,
95 p_entry_user OUT NOCOPY VARCHAR2);
96
97 -- --------------------------------------------------------------------
98 -- PROCEDURE GET_FUND_GROUP_INFO
99 -- --------------------------------------------------------------------
100 -- Its primary purpose get the fund Group, Dept Id, bureau Id and
101 -- balancing segment from the fv_fund_parameters table for the
102 -- passed Code Combination Id.
103 -- --------------------------------------------------------------------
104
105 PROCEDURE get_fund_group_info (p_ccid Gl_Balances.code_combination_id%TYPE,
106 p_fund_group IN OUT NOCOPY VARCHAR2,
107 p_dept_id IN OUT NOCOPY VARCHAR2,
108 p_bureau_id IN OUT NOCOPY VARCHAR2,
109 p_bal_segment IN OUT NOCOPY VARCHAR2);
110
111
112 -- -------------------------------------------------------------------
113 -- PROCEDURE GET_SGL_PARENT
114 -- -------------------------------------------------------------------
115 -- Gets the SGL Parent Account for the passed account number
116 -- ------------------------------------------------------------------
117
118 PROCEDURE get_sgl_parent(
119 Acct_num VARCHAR2,
120 sgl_acct_num OUT NOCOPY VARCHAR2 ) ;
121
122 -- -------------------------------------------------------------------
123 -- PROCEDURE GET_USSGL_INFO
124 -- -------------------------------------------------------------------
125 -- Gets the information like enabled flag and reporting type
126 -- for the passed account number.
127 -- -------------------------------------------------------------------
128
129 PROCEDURE get_ussgl_info (p_ussgl_acct_num IN VARCHAR2,
130 p_enabled_flag IN OUT NOCOPY VARCHAR2,
131 p_reporting_type IN OUT NOCOPY VARCHAR2);
132
133
134 -- ------------------------------------------------------------------
135 -- PROCEDURE GET_PERIOD_YEAR
136 -- ------------------------------------------------------------------
137 -- Get_Period_Year procedure is called from the Main procedure.
138 -- This procedure gets the accounting calender name(period set name)
139 -- based on the set of books parameter that is passed and then gets
140 -- the period year based on period from and period to parameters.
141 -- It then gets the start date of the from period and end date of the
142 -- to period, which are used in the Journal_Process Procedure.
143 -- ------------------------------------------------------------------
144
145 PROCEDURE get_period_year (p_period_from VARCHAR2,
146 p_period_to VARCHAR2);
147
148 -- -------------------------------------------------------------------
149 -- PROCEDURE GET_COHORT_INFO
150 -- -------------------------------------------------------------------
151 -- Gets the cohort segment name based on the Financing Acct value
152 -- ------------------------------------------------------------------
153
154 PROCEDURE get_cohort_info ;
155
156 -- -------------------------------------------------------------------
157 -- PROCEDURE PURGE_GTAS_TRANSACTIONS
158 -- -------------------------------------------------------------------
159 -- Purges all GTAS transactions from the FV_GTAS_TRX_REG_TEMP table for
160 -- the passed Treasaury Symbol.
161 -- ------------------------------------------------------------------
162
163 PROCEDURE purge_gtas_transactions ;
164
165 -- -------------------------------------------------------------------
166 -- PROCEDURE LOAD_GTAS_ATTRIBUTES
167 -- -------------------------------------------------------------------
168 -- This procedure selects the attributes for the Account number
169 -- segment from FV_GTAS_ATTRIBUTES table and load them into global
170 -- variables for usage in the GTAS Main process. It also calculates
171 -- one time pull up values for the account number that does not
172 -- require drill down into GL transactions.
173 -- ------------------------------------------------------------------
174 PROCEDURE load_gtas_attributes (p_acct_num IN VARCHAR2,
175 p_fund_val IN VARCHAR2);
176
177
178 -- -------------------------------------------------------------------
179 -- PROCEDURE RESET_ATTRIBUTES
180 -- The Process sets all the values of the GTAS Attributes to NULL
181 -- -------------------------------------------------------------------
182 -- ------------------------------------------------------------------
183
184 PROCEDURE reset_gtas_attributes ;
185
186 END fv_gtas_trx_register;