Showing posts with label Chart of Accounts. Show all posts
Showing posts with label Chart of Accounts. Show all posts
Monday, October 19, 2009
Function to return COA Account Combination.
Function to return concatenated account from id.
[code]</pre>
CREATE OR REPLACE FUNCTION APPS.GET_CONCAT_ACC (ACC_ID VARCHAR2)
RETURN VARCHAR2 IS
<p style="padding-left:30px;">AC VARCHAR2(100);</p>
BEGIN
/*** Returns Concatenated Accounts ***/
<p style="padding-left:30px;">SELECT ACCOUNT_COMB
INTO AC
FROM ABH_GL_ACC_CONCAT_SEGMENTS
WHERE CODE_COMBINATION_ID = ACC_ID;
RETURN NVL(AC, 'ERROR');</p>
END;
/
<pre>[/code]
This function is based on the View for Chart of Accounts KFF.
Shameem Bauccha
19 October 2009
View for Chart of Accounts KFF
The script below allows you creates a view for your chart of accounts.
Modify to suit your requirements. Note that the value set name of each segment is passed as parameter.
[code]
CREATE OR REPLACE VIEW ABH_GL_ACC_CONCAT_SEGMENTS
AS
SELECT cc.code_combination_id,
cc.chart_of_accounts_id,
cc.detail_posting_allowed_flag post,
cc.detail_budgeting_allowed_flag budget,
cc.account_type,
cc.show_account_type,
cc.enabled_flag,
cc.summary_flag,
--segment: segments used in COA definition
cc.segment1,
cc.segment2,
cc.segment3,
cc.segment4,
cc.segment5,
cc.segment6,
concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(segment1, '-'), segment2),'-'), segment3), '-'), segment4), '-'), segment5), '-'), segment6) account_comb,
get_flex_vs_desc('ABH Company', cc.segment1, '') Company,
get_flex_vs_desc('ABH Cost Center', cc.segment2, '') "Cost Center",
get_flex_vs_desc('ABH Account', cc.segment3, '') "Account",
get_flex_vs_desc('ABH Sub Account', cc.segment4, cc.segment3) "Sub Account",
get_flex_vs_desc('ABH Location', cc.segment5, '') "Location",
get_flex_vs_desc('ABH Entity-Services', cc.segment6, '') "Entity-Services"
FROM GL_CODE_COMBINATIONS_V cc
[/code]
Refer to document 'Fetching Key Flexfield Value Description' for get_flex_vs_desc.
Shameem Bauccha
19 October 2009
Labels:
Chart of Accounts,
General Ledger,
KFF,
Oracle Apps,
Scripts,
System Administrator,
Technical,
view
Subscribe to:
Posts (Atom)