ECC G/L accounts, cost elements and the combined list: three Oracle SQL queries on SKA1/SKB1/CSKB
Three Oracle SQL queries for ECC: G/L accounts, cost elements, and the two combined. Each section goes query → result → notes. Unlike S/4HANA, ECC keeps G/L accounts (SKA1) and cost elements (CSKA/CSKB) as separate masters. SKA1 has no GLACCOUNT_TYPE field; whether an account is a cost element is decided by whether a CSKB row exists. Verified on IDES ECC 6.0 EhP7 / client 800 / company code 1000 (IDES AG, chart of accounts INT, EUR) / controlling area 1000 (CO Europe). The result values were read in SE16N. Replace the schema prefix SAPSR3 with the one on your system. 1. G/L accounts — query Case G/L accounts used by a company code (T001 + SKA1 + SKB1 + SKAT) What it does The chart-of-accounts master (SKA1) joined to the company code segment (SKB1) and the texts (SKAT). The INNER JOIN on SKB1 keeps only accounts that were actually extended to the company code. Result 1,400 rows for SKB1 BUKRS = 1000 (SE16N Number of Entries) SELECT t.BUKRS, t.KTOPL, LTRIM(a.SAKNR, ...