How to extract a chart of accounts from SAP
SAP exposes the chart of accounts through a few transactions and a few APIs — here's the practical map for finance teams who need a clean export, not a consultant's project.
The chart of accounts (CoA) lives in the SKA1 and SKB1 tables in classic SAP ERP, and in the ACDOCA / ACDOCT structures in S/4HANA. You don't normally read the tables directly — you go through transactions or APIs that respect the access controls.
1. SAP GUI transactions
- S_ALR_87012326 — Chart of Accounts list. Run by chart of accounts code, then export from the menu (List → Export → Spreadsheet).
- FS00 — Display G/L Account Master. Single account drilldown.
- FSP3 / FSS3 — Display chart of accounts data and company-code segment data separately.
For most finance teams the S_ALR_87012326 export is the right call. Excel output, all relevant fields, no dev work.
2. SAP S/4HANA via OData / Fiori
S/4HANA exposes the CoA through the API_GLACCOUNTINCHARTOFACCOUNTS_SRV OData service. A GET against /A_GLAccountInChartOfAccounts returns every account with descriptions, blocked flags, and group assignments. Authentication is the standard SAP API Hub OAuth flow.
If you have a Fiori launchpad rather than SAP GUI, the Manage G/L Account Master Data app lists accounts across charts and company codes with filters for blocked and deletion flags, and exports to spreadsheet from the table toolbar. Underneath it sits the CDS view I_GLAccountInChartOfAccounts — the same data the OData service exposes, handy when a developer on the team prefers checking field names in the browser's View Browser app.
3. Programmatic: RFC_READ_TABLE
For integration work without an API Hub subscription, the classic route is RFC_READ_TABLE over RFC — via PyRFC in Python or the SAP .NET Connector — querying SKA1 (chart segment) and SKB1 (company-code segment) directly. Two gotchas: rows come back as fixed-width 512-character strings that you slice using the field metadata, and the function needs the S_TABU_DIS authorization that many auditors deliberately withhold from dialog users.
4. Fields worth including in the export
- Account number (SAKNR) and chart of accounts key (KTOPL) — the join keys for everything downstream.
- Short and long description from SKAT (TXT20/TXT50), in every language your reporting needs.
- Account group (KTOKS) — drives number ranges and the field status of the master record.
- Blocked and deletion flags (XSPEB, XLOEV) — filter these out before mapping, or you migrate dead accounts.
- Company-code segment fields from SKB1: tax category, field status group, open-item management, sort key.
5. SE16N for read-only table access
If transactions are restricted but you have SE16N, query SKA1 (chart-level) and SKB1 (company-code-level) directly. This is the FI consultant's trick when the ad-hoc reports aren't enough.
6. When all you have is a printout
Common in audit and migration scenarios: someone produced a PDF of the CoA from SAP and the live system access is months away. Drop it into ExtractFox's PDF data extractor with a prompt like "extract account number, description, type, and group as a table." Faster than manually retyping a 500-row CoA.
Common problems and fixes
- S_ALR_87012326 dumps to a spool instead of a spreadsheet — export via System → List → Save → Local File and pick the spreadsheet format.
- SE16N is locked in production — expected. Ask for the S_ALR report instead, or a one-off extract job from the basis team.
- Descriptions come out in German only — SKAT rows are per language. Log in with the target language, or join SKAT and filter SPRAS to your language code.
- ECC and S/4HANA numbers disagree — check which chart you're looking at. Systems often carry an operating chart plus country or group charts; OB13 lists the charts assigned to each company code.
Methods compared
| Method | Access needed | Best for |
|---|---|---|
| S_ALR_87012326 report | SAP GUI + FI display role | One-off Excel export for finance |
| Fiori Manage G/L Account app | S/4HANA Fiori launchpad | Interactive filtering and export |
| OData API service | API Hub credentials | Recurring sync into a warehouse |
| RFC_READ_TABLE on SKA1/SKB1 | RFC user + S_TABU_DIS | Integration pipelines, ECC systems |
| PDF printout + extraction | None | Audits and pre-migration recon |
Picking a route
One-off migration recon: the S_ALR report or a Fiori export. Recurring feed into a data warehouse: the OData service on S/4HANA, RFC_READ_TABLE on ECC. No system access at all: the PDF printout route. The mapping work that follows is identical regardless of how the CoA came out of SAP — don't over-engineer the export step.
Going to another system
SAP account types don't map directly to NetSuite or Oracle. Plan for a mapping spreadsheet between source account → target account → target type. The export is the easy 20% of the migration; mapping is the 80%.