Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

----------------------------------------GENERAL LEDGER TABLES AND JOINS -------------------------------

--------------------------------------GL_BALANCES-------------------------------------------

-------------------------GL_CODE_COMBINATIONS-------------------------------------------

https://docs.oracle.com/en/cloud/saas/financials/22d/oedmf/glcodecombinations-
12960.html#glcodecombinations-12960

--------------------GL_DAILY_RATES------------------------------

---------------------GL_IMPORT_REFERANCES------------------------------------------------------

-----------------------------GL_JE_BATCHES---------------------------------------------------
---------------------------GL_JE_HEADERS-----------------------------------------------

-----------------------------------GL_JE_LINES-------------------------------------------------------------
--------------------------------GL_LEDGERS----------------------------

https://docs.oracle.com/en/cloud/saas/financials/22d/oedmf/glledgers-13488.html#glledgers-13488

------------------------------- GL_LEDGERS JOINS------------------------------------------------

 gl_ledgers.ledger_id = gl_balances. ledger_id


 gl_ledgers.ledger_id = gl_je_headers.ledger_id
 gl_ledgers.ledger_id = gl_je_lines.ledger_id
 gl_ledgers.ledger_id = gl_period_statuses.ledger_id
 gl_ledgers.ledger_id = gl_balances.ledger_id
 gl_ledgers.ledger_id = xla_ae_lines.ledger_id
 gl_ledgers.ledger_id = xla_transaction_entities.ledger_id

----------------------------------- GL_CODE_COMBINATIONS---------------------------------------

 gl_code_combinations. code_combination_id = gl_ledgers. CUM_TRANS_CODE_COMBINATION_ID.


 gl_code_combinations. code_combination_id = ar_cash_receipt_history_all.
ACCOUNT_CODE_COMBINATION_ID
 gl_code_combinations. code_combination_id = ar_cash_receipt_history_all.
BANK_CHARGE_ACCOUNT_CCID
 gl_code_combinations. code_combination_id = ap_batches_all. BATCH_CODE_COMBINATION_ID
 gl_code_combinations. code_combination_id = ap_invoice_distributions_all.
DIST_CODE_COMBINATION_ID
 ---gl_code_combinations. code_combination_id = gl_ledgers. RES_ENCUMB_CODE_COMBINATION_ID
 ---gl_code_combinations. code_combination_id = gl_ledgers. NET_INCOME_CODE_COMBINATION_ID
 ---gl_code_combinations. code_combination_id = gl_ledgers. ROUNDING_CODE_COMBINATION_ID
 ---gl_code_combinations. code_combination_id = gl_ledgers. RET_EARN_CODE_COMBINATION_ID
 --gl_code_combinations. code_combination_id = gl_ledgers. CUM_TRANS_CODE_COMBINATION_ID
 --gl_code_combinations. code_combination_id = ap_invoices_all. PA_DEFAULT_DIST_CCID
 ---gl_code_combinations. code_combination_id = ap_invoices_all.
ACCTS_PAY_CODE_COMBINATION_ID
 ---gl_code_combinations. code_combination_id = ra_cust_trx_line_gl_dist_all. COLLECTED_TAX_CCID
 gl_code_combinations. code_combination_id = ra_cust_trx_line_gl_dist_all. CODE_COMBINATION_ID
 gl_code_combinations. code_combination_id = gl_je_lines. CODE_COMBINATION_ID
 gl_code_combinations. code_combination_id = ar_distributions_all. CODE_COMBINATION_ID
 -----gl_code_combinations. code_combination_id = ap_invoice_payments_all.
ACCTS_PAY_CODE_COMBINATION_ID
 ----gl_code_combinations. code_combination_id = ap_invoice_payments_all.
ASSET_CODE_COMBINATION_ID
 ---gl_code_combinations. code_combination_id = ap_invoice_payments_all.
GAIN_CODE_COMBINATION_ID
 ----gl_code_combinations. code_combination_id = ap_invoice_payments_all.
LOSS_CODE_COMBINATION_ID
 gl_code_combinations. code_combination_id = ra_interface_distributions_all. code_combination_id
 gl_code_combinations. code_combination_id = gl_balances.code_combination_id
 gl_code_combinations. code_combination_id = ar_adjustments_all.code_combination_id

-------------------------------------------- GL_DAILY_RATES------------------------------------------

 GL_DAILY_RATES. CONVERSION_TYPE = gl_daily_conversion_types. CONVERSION_TYPE

---------------------------------- GL_IMPORT_REFERENCES------------------------------------------------

 GL_IMPORT_REFERENCES. JE_BATCH_ID = gl_je_batches. JE_BATCH_ID


 GL_IMPORT_REFERENCES. JE_HEADER_ID = gl_je_headers. JE_HEADER_ID
 GL_IMPORT_REFERENCES. JE_LINE_NUM = gl_je_lines. JE_LINE_NUM

-------------------------------------- GL_JE_BATCHES--------------------------------------------------------

 GL_JE_BATCHES.JE_BATCH_ID = gl_je_headers. JE_BATCH_ID


 gl_je_batches. JE_BATCH_ID = GL_IMPORT_REFERENCES. JE_BATCH_ID

----------------------------------------GL_JE_HEADERS-----------------------------------------------------------

 gl_je_headers.ledger_id = gl_ledgers.ledger_id
 gl_je_headers.je_header_id = gl_je_lines.je_header_id
 gl_je_headers. JE_BATCH_ID = GL_JE_BATCHES.JE_BATCH_ID
 gl_je_headers.CURRENCY_CONVERSION_TYPE =
gl_daily_conversion_types. CONVERSION_TYPE
 gl_je_headers.je_category = GL_JE_CATEGORIES. CATEGORY_NAME

--------------------------------------- GL_JE_CATEGORIES--------------------------------------------

 GL_JE_CATEGORIES. CATEGORY_NAME = gl_je_headers.je_category

------------------------------------------GL_JE_LINES--------------------------------------------------------------

 gl_je_lines.je_header_id = gl_je_headers.je_header_id
 gl_je_lines. Code_combination_id = gl_code_combinations.code_combination_id
 gl_je_lines.ledger_id = gl_ledgers.ledger_id
 gl_je_lines.je_line_num = gl_import_references.je_line_num

-------------------------------GL TO INV JOINS----------------------------------------------------------------------


 gl_code_combinations. code_combination_id = MTL_SYSTEM_ITEMS. COST_OF_SALES_ACCOUNT

----------------------------------------------------GL TO PO ---------------------------------------------------

 gl_code_combinations. code_combination_id = po_distributions_all. code_combination_id

----------------------------------------------- GL TO AP - --------------------------------------------------------

 GL_SETS_OF_BOOKS.SET_OF_BOOKS_ID = AP_INVOICES_ALL.SET_OF_BOOKS_ID
 gl_code_combinations. code_combination_id = ap_invoices_all.
ACCTS_PAY_CODE_COMBINATION_ID
 gl_code_combinations. code_combination_id = ap_invoice_distributions_all.
DIST_CODE_COMBINATION_ID

----------------------------------------------- GL TO AR
------------------------------------------------------------

 gl_code_combinations. code_combination_id = ra_cust_trx_line_gl_dist_all.


CODE_COMBINATION_ID

select * from fnd_id_flex_segments;------------

| flex_value_set_id

select * from fnd_flex_values;----------------

select* from gl_daily_rates; --------------------

| conversion_type

select* from gl_daily_conversion_types;----------

select* from gl_period_statuses;

select* from gl_sets_of_books;

select* from gl_je_headers;

select* from gl_je_sources;

select* from gl_je_categories;


select* from gl_je_lines;

select* from gl_je_batches;

select* from gl_balances;

select* from gl_import_references;

select* from xla_ae_lines;

select* from ap_suppliers;

select* from xla_transaction_entities;

--------------------------------------- JOINS -------------------------------

SELECT distinct

gjh.status,

gjl.je_line_num,

gjl.ledger_id,

gjs.JE_SOURCE_NAME source,

gjc.user_je_category_name Category,

gjb.NAME "Batch Name"

FROM

gl_je_headers gjh,

gl_je_lines gjl,

GL_JE_BATCHES gjb,

GL_JE_SOURCES gjs,

GL_JE_CATEGORIES gjc,

gl_ledgers gl

WHERE

gjh.je_header_id = gjl.je_header_id
and gjs.JE_SOURCE_NAME = gjh.JE_SOURCE

and gjc.JE_CATEGORY_NAME = gjh.JE_CATEGORY

and gjb.JE_BATCH_ID = gjh.JE_BATCH_ID

and gjl.ledger_id = gl.ledger_id;

You might also like