0% found this document useful (0 votes)
82 views1 page

Test Subledger Query

This SQL query selects distinct company codes, fiscal years, periods, accounting unit numbers, account numbers, currencies, debit amounts, and credit amounts from various tables in the gmf database. It groups the results by company code, fiscal year, period, accounting unit number, account number, and currency. The query filters for a specific company code, fiscal year, and period passed as bind variables.

Uploaded by

anchauhan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views1 page

Test Subledger Query

This SQL query selects distinct company codes, fiscal years, periods, accounting unit numbers, account numbers, currencies, debit amounts, and credit amounts from various tables in the gmf database. It groups the results by company code, fiscal year, period, accounting unit number, account number, and currency. The query filters for a specific company code, fiscal year, and period passed as bind variables.

Uploaded by

anchauhan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

SELECT DISTINCT l.co_code, l.fiscal_year, l.period, --l.doc_type, --gsm.sub_event_code, --gsm.sub_event_desc, --l.acct_ttl_type, --gat.acct_ttl_code, --gat.acct_ttl_desc, SUBSTR(u.acctg_unit_no,1,10) acct_unit, SUBSTR(m.

acct_no,4,5) account, l.currency_base, SUM(DECODE(l.debit_credit_sign,1,l.AMOUNT_BASE*l.debit_credit_sign,0)) debit, SUM(DECODE(l.debit_credit_sign,-1,l.AMOUNT_BASE*-l.debit_credit_sign,0)) credit FROM gmf.gl_subr_tst l, gmf.gl_accu_mst u, gmf.gl_acct_mst m, gl_sevt_mst gsm, gl_acct_ttl gat WHERE l.co_code =:co_code AND l.fiscal_year =:fiscal_year AND l.period =:period --AND l.acct_ttl_type = 1500 -- inventory AND u.acctg_unit_id = l.acctg_unit_id AND m.acct_id = l.acct_id AND u.co_code = l.co_code AND m.co_code = l.co_code AND l.acct_ttl_type = gat.acct_ttl_type AND l.sub_event_type = gsm.sub_event_type GROUP BY l.co_code , l.fiscal_year, l.period,SUBSTR(u.acctg_unit_no,1,10), SUBSTR(m.acct_ no,4,5), --l.doc_type, gsm.sub_event_code, --gsm.sub_event_desc, l.acct_ttl_type, gat.acct_ttl_code, ---gat.acct_ttl_desc, u.acctg_unit_no,l.currency_base;

You might also like