1. Home
  2. DevOps
  3. SE16H

SE16H: the SAP table browser that thinks in SQL

Group, count, total, rank and join SAP tables straight from the selection screen, in SAP S/4HANA and SAP ECC. A practical guide with recipes, join set-up, authorizations and the SAP Notes that matter.

  • SE16H
  • General Table Display
  • CO-OM tools
  • SAP Note 1636416

What is SE16H?

SE16H is SAP's most capable table browser. It does everything SE16N does: it shows a table with field names and technical names side by side, with filters, layouts, variants and text tables.

On top of that, it brings SQL-style analysis to the selection screen. Without writing a line of code you can group and count, total and average, filter on totals, rank the top N, add formulas and join tables.

SAP built SE16H for the first SAP HANA scenarios in SAP ERP, where a HANA database ran beside the ERP database. That is why it has a Database Connection field. In SAP S/4HANA, HANA is the main database, and SE16H has become the quickest way to answer a data question without asking for a report.

No SE16 transaction was ever retired to make room for the next one: SE16, SE16N and SE16H all still run side by side.

The SE16 family

Each generation added analysis power and kept the one before. Pick the tool by the question you need to answer.

  1. SAP R/3SE16Data Browser. Plain display of one table; you pick the selection and output fields by hand.
  2. R/3 Enterprise · ECCSE16NGeneral Table Display. All fields at once, technical and field names together, text tables, layouts and variants.
  3. ECC on HANA · S/4HANASE16HSE16N plus grouping, totals, aggregates, HAVING, top-N, formulas, joins and drilldown.
  4. S/4HANA 2023 and laterSE16JSE16 with joins. Saved join queries with an inner-join switch per table (SAP Note 3529563).
Which transaction for which job
TransactionWhat it isUse it for
SE16Data BrowserA quick look at one table, or when it is the only one your role allows
SE16NGeneral Table DisplayEveryday table display with readable field names and text tables
SE16HGeneral Table Display with analysisCounting, totals, top-N lists, joins and drilldowns on any table
SE16JSE16 with joinsSaved, reusable join queries in S/4HANA 2023 and later
SE16SGeneric table and value searchFinding where a value (a company code, a sales organization) is stored across many tables
SE16SLTable and value search, fast modeThe same search as SE16S, quicker but less accurate
SE16TCentral access to the SE16 toolsFinding tables and transactions by keyword, then jumping into SE16H
SQVIQuickViewerSmall saved queries with joins, built in a graphical editor
TAANATable analysisCounting entries per field value as a background job, for archiving and housekeeping. On HANA, SE16H gives the same counts online.

What SE16H adds to SE16N

Ten functions, all set on the selection screen. The database does the work, so only the answer travels back to you.

  • Group and count

    Tick Group on a field to get one line per value with the number of entries behind it. Group several fields for a breakdown.

  • Totals and aggregates

    Total sums a field per group. Aggregate gives the maximum, minimum or average instead. A field is either totalled or aggregated, not both.

  • Conditions on totals

    Having Option and Having Value keep only groups whose total passes a limit, like SQL HAVING. Grouping Minimum does the same for the count.

  • Top-N lists

    Sort plus Highest/Lowest orders the result in the database; Maximum No. of Hits sets N. Sequence (01–99) decides which sort field comes first.

  • Sets in the selection

    Select with a group or set maintained in GS01, such as an account group or order group (F4 help works). Keep sets small: SE16H cannot split a huge set, and the select may terminate.

  • Formulas

    Add a calculated column to the result rows. The formula editor came with SAP Note 2795867; if the Formula field does not show, see SAP Note 3302692.

  • Table joins

    An Outer Join Definition adds fields from other tables, such as texts. Inner or outer join can be chosen per table (SAP Note 2188410).

  • Drilldown

    Right-click a result line to break it down by more fields. Each drilldown opens a new window, so you can compare levels side by side.

  • Show the SQL as ABAP

    Press F9 in the result list to see the statement as a generated ABAP report (SAP Note 2880334). Copy it into a custom program as a starting point.

  • Database connection

    Read a secondary SAP HANA database instead of the main one. Built for ECC with replicated tables; in S/4HANA, leave it empty.

From the selection screen to SQL

Every column on the SE16H selection screen adds one clause to the statement sent to the database. Think in SQL and the screen becomes obvious.

SE16H runs whatever you combine, even when it makes no business sense, and it never warns you. Decide what you want to see first, then validate the result.

SE16H setting and the SQL it creates
On the selection screenIn SQL
Output checkboxSELECTfield list
From and To values, Option, MoreWHERE
A set or group (GS01) in the selectionWHERE … INthe set's values
GroupGROUP BYplus a count of lines
TotalSUM( )
Aggregate: Maximum, Minimum, AverageMAX( )MIN( )AVG( )
Having Option and Having ValueHAVING
Grouping MinimumHAVING COUNT(*) >= n
Sort with Highest/LowestORDER BY … DESCENDINGorASCENDING
Sequence (01 to 99)Order of the fields inORDER BY
Maximum No. of HitsUP TO n ROWS
FormulaA calculated column on the result rows
Outer Join DefinitionLEFT OUTER JOINorINNER JOIN
Database ConnectionCONNECTIONto a secondary database

Five SE16H recipes

Pick a question to see what to fill in on the selection screen and the SQL that SE16H sends. Values like company code 1000 are examples: use your own.

Recipe

How many documents per company code?

Table BKPF · Max. hits 500

BKPF · Accounting document header

FieldTechnical nameSelectionSet on the field
Company CodeBUKRS—
  • Group
Fiscal YearGJAHR2026

Equivalent ABAP SQL (simplified)

SELECT FROM bkpf
  FIELDS bukrs, COUNT(*) AS entries
  WHERE gjahr = '2026'
  GROUP BY bukrs
  INTO TABLE @DATA(result).

What you get

One line per company code with the number of documents. Group adds the count column on its own.

Tip

Leave Fiscal Year empty to count the whole table. On SAP HANA this answers online, in seconds, what used to need a TAANA job.

The 5 largest postings on a cost center

Table ACDOCA · Max. hits 5

ACDOCA · Universal Journal line items

FieldTechnical nameSelectionSet on the field
LedgerRLDNR0L
Company CodeRBUKRS1000
Fiscal YearRYEAR2026
Cost CenterRCNTR4110
Journal EntryBELNR—
  • Output
G/L AccountRACCT—
  • Output
Amount in Company Code CurrencyHSL—
  • Output
  • Sort
  • Highest

Equivalent ABAP SQL (simplified)

SELECT FROM acdoca
  FIELDS belnr, racct, hsl
  WHERE rldnr = '0L' AND rbukrs = '1000'
    AND ryear = '2026' AND rcntr = '0000004110'
  ORDER BY hsl DESCENDING
  INTO TABLE @DATA(result)
  UP TO 5 ROWS.

What you get

The five largest amounts posted to the cost center, biggest first.

Tip

Maximum No. of Hits is the N in top-N. In SAP ECC the same recipe runs on COEP with OBJNR = KS + controlling area + cost center and the value field WKGBTR.

Top 5 functional areas by amount

Table ACDOCA · Max. hits 5

ACDOCA · Universal Journal line items

FieldTechnical nameSelectionSet on the field
LedgerRLDNR0L
Company CodeRBUKRS1000
Fiscal YearRYEAR2026
Functional AreaRFAREA—
  • Group
Amount in Company Code CurrencyHSL—
  • Total
  • Sort
  • Highest

Equivalent ABAP SQL (simplified)

SELECT FROM acdoca
  FIELDS rfarea, SUM( hsl ) AS total
  WHERE rldnr = '0L' AND rbukrs = '1000'
    AND ryear = '2026'
  GROUP BY rfarea
  ORDER BY total DESCENDING
  INTO TABLE @DATA(result)
  UP TO 5 ROWS.

What you get

The five functional areas with the highest totals, one line each, with the number of lines behind every total.

Tip

Add an account range in RACCT to keep only cost accounts. Each extra Group field adds runtime, so group only what you need.

Accounts whose period total is above 1,000

Table ACDOCA · Max. hits 500

ACDOCA · Universal Journal line items

FieldTechnical nameSelectionSet on the field
LedgerRLDNR0L
Company CodeRBUKRS1000
Fiscal YearRYEAR2026
Posting PeriodPOPER010
G/L AccountRACCT—
  • Group
Amount in Company Code CurrencyHSL—
  • Total
  • Having > 1000

Equivalent ABAP SQL (simplified)

SELECT FROM acdoca
  FIELDS racct, SUM( hsl ) AS total
  WHERE rldnr = '0L' AND rbukrs = '1000'
    AND ryear = '2026' AND poper = '010'
  GROUP BY racct
  HAVING SUM( hsl ) > 1000
  INTO TABLE @DATA(result).

What you get

Only the accounts whose period total passes 1,000. The others never leave the database.

Tip

Having works on fields you total (SAP Note 2802623). Grouping Minimum does the same for the count: 10 keeps only groups with at least 10 lines.

Average sales order value, per currency

Table VBAK · Max. hits 500

VBAK · Sales document header

FieldTechnical nameSelectionSet on the field
Sales Document CategoryVBTYPC
Document CurrencyWAERK—
  • Group
Net ValueNETWR—
  • Aggregate: Average

Equivalent ABAP SQL (simplified)

SELECT FROM vbak
  FIELDS waerk, AVG( netwr ) AS average
  WHERE vbtyp = 'C'
  GROUP BY waerk
  INTO TABLE @DATA(result).

What you get

The average order value in each document currency, one line per currency.

Tip

Always group by the currency when you total or average amounts: values in different currencies cannot be added up. Maximum and Minimum work the same way.

Joining tables with an Outer Join Definition

A join definition is a named, saved set of secondary tables for one primary table. It started as a way to read extra attributes, like texts. Today you can pick inner or outer join per table, and SE16H sends one join statement for all tables (SAP Note 2794526), which is much faster than the old table-by-table reads.

Set it up in seven steps

  1. Start SE16H with the primary table, for example T030.
  2. Choose the button next to Outer Join Definition. Enter a new name and choose Create, or Change or Display an existing one.
  3. Under Definition of Secondary Tables, add each table. Put them in the order they depend on each other: if table C needs a field from table B, B comes first and that field must be an output field of B.
  4. Choose Output to pick which fields of each secondary table appear in the result.
  5. Double-click the secondary table (or choose Maintain Details) and fill each key field with a method, shown in the table beside these steps.
  6. Save, then call SE16H again. This clears the buffer; skip it and new fields may be missing or wrong, and a short dump can occur.
  7. Select the definition, choose the primary-table fields and execute. Save a layout to reuse it.
How a secondary-table field gets its value
MethodWhat it doesExample
ReferenceTakes the value of a field from the primary table or an earlier secondary tableSKAT-SAKNR ← T030-KONTS
ConstantA fixed value, typed in internal format, without quotes; one constant per fieldSKAT-SPRAS = E (not EN)
Complex variableA function module works the value outSE16N_OJ_GET_OBJECT_FROM_OBJNR turns a CO object number into a cost center or order
String operationCuts part of a character field by offset and lengthOrder number from OBJNR, offset 3, length 12
System fieldAny field of structure SYST at runtimeSY-LANGU for the user's language in text tables

Option changes the default "=" per field. For time-dependent texts such as CSKT, set valid-to DATBI ≥ SY-DATLO to read the current text. String operations used the old table-by-table logic; SAP Note 2886898 lets them work with the join statement.

Worked example

Account determination with texts (FI-MM)

Primary table T030 (standard accounts table) shows which G/L account each transaction key and valuation class posts to. Two joins add the account name and the valuation class text.

Secondary tableFieldMethodValue
SKAT G/L account textsKTOPLReferenceT030-KTOPL
SAKNRReferenceT030-KONTS
SPRASConstantE
T025T Valuation class textsBKLASReferenceT030-BKLAS
SPRASConstantE

Mark KTOPL, KONTS and BKLAS as output fields of T030, or the references stay empty. Use SY-LANGU instead of E to follow each user's logon language.

  • Rules to know

    • Primary to secondary can be 1:1 or 1:N; several matching lines are aggregated.
    • A field from the primary table is only available to a join if it is an output or grouping field.
    • There is no logical check of a definition: odd results usually mean a wrong definition.
  • Names and transport

    • SAP names start with a digit (0–9); customer names start with a letter or "/".
    • Definitions are workbench objects: cross-client, not tied to a user, unique per primary table, and transportable.
    • A definition can be copied to a similar primary table.
  • On S/4HANA 2023 or later?

    Try SE16J. It saves join queries by name, with an Inner Join checkbox per secondary table, output fields, aggregation and selections on one screen. SAP Note 3529563 lists its functions.

Working with the result list

  • Drilldown (right-click a line)

    Drilldown without value entry
    Pick more Group and Total fields for that line. Example: COEP grouped by controlling area, then drill one line down by cost element.
    Drilldown with value entry
    Opens a new SE16H screen with the line's values filled in, so you can add more restrictions.
    Drilldown for complete list
    Copies the current selection to a new SE16H screen to change or extend it.

    To make double-click drill down, choose Change Settings (Ctrl+F12) on the first screen and set Action with Double-Click in List.

  • See the SQL (F9)

    In the result list, F9 shows the statement SE16H sent, as a generated ABAP report (SAP Note 2880334, extended by 2886898).

    • Check that the result means what you think it means.
    • Hand a developer a working statement instead of a screenshot.
    • Copy it into a custom program and build on it.

    Big selections can run in the background; SAP Note 2934750 fixed background runs that use join tables.

Database connection and Controlling use cases

These functions come from SE16H's roots in Controlling and in ECC systems with a second SAP HANA database. They still help in migrations and reconciliations.

  • The Database Connection field

    • F4 lists the database connections; the Table F4 then shows the tables and views available in SAP HANA.
    • Row counts are shown for tables (not views) across all clients, so your client may hold fewer rows.
    • SE16H only checks the physical connection. The HANA table must match the ABAP Dictionary exactly, or SE16H dumps; it suits tables replicated one-to-one.
    • Tables created only in SAP HANA belong in the SAP HANA tools, not in SE16H.
    • Left empty, SE16H reads the main database. On a database other than HANA, runtimes can be very long.
  • Consistency check: ERP database vs SAP HANA

    1. Primary table COEP; in the join definition add COEP again, on the HANA connection, with No. of Rows and output field WKGBTR.
    2. Access fields: KOKRS and BELNR by Reference to COEP.
    3. Group by KOKRS and BELNR, total WKGBTR, execute.
    4. Each document shows its total and row count from both databases, side by side.

    The data is read twice, so start rough (controlling area, one period) and drill only where totals differ.

  • Reporting across controlling areas

    CO postings carry a technical object number (OBJNR) for every cost center, order or WBS element.

    • Build an object number group in GS01, or with report RKSE16H_CREATE_SET (SAP Note 1666911) from cost center and order groups.
    • Run the report twice to put objects of two controlling areas in one group.
    • Enter the group in the OBJNR selection and compare objects across controlling areas in one list.

COEP in S/4HANA: actual CO line items live in the Universal Journal, ACDOCA. A read on COEP goes through a compatibility view built from ACDOCA, which can run long or run out of memory (SAP KBA 2793263). In S/4HANA, run these analyses on ACDOCA, which carries OBJNR, KOKRS and the amounts too.

Authorizations and safe use

SE16H can read almost any table, so treat it like a powerful tool, not a report.

Authorization objects
ObjectFieldsControls
S_TCODETCD = SE16HStarting the transaction
S_TABU_DISDICBERCLS, ACTVTAccess by table authorization group (03 display, 02 change)
S_TABU_NAMTABLE, ACTVTAccess by table name, when the group check fails
S_BRWS_CUSBRWS_KEY = JOIN, BRWS_NAME, ACTVTMaintaining join definitions; BRWS_NAME can enforce a naming convention
  • Joins check every table

    Display authorization is checked per table; a table you may not see is dropped from the join. Apply SAP Notes 3007467 and 3273342, which closed a gap that let a join read a restricted table.

  • Changing data

    Entries can be maintained only where the table's Data Browser/Table View Editing setting allows it, and only with change authorization. The old &SAP_EDIT shortcut was switched off by SAP Note 1420281. Keep production users on display.

  • For business users

    Rather than open table access, give a parameter transaction (SE93) locked to the tables they need.

Performance and good practice

  1. Count first. Use Number of Entries before reading lines on a big table.

  2. Restrict by key fields such as ledger, company code, year and period, and keep a Maximum No. of Hits.

  3. Read ACDOCA, not compatibility views (COEP, COSP, COSS, BSIS and the like) in S/4HANA.

  4. Group only what you need. Every extra Group field adds runtime.

  5. Group by currency when you total amounts, and expect a field overflow if a total outgrows the table's field length.

  6. Keep joins for small results. Many hits with many secondary tables still cost time.

  7. Sort in SE16H, not in the layout. The Sort column sorts in the database; an ALV layout sorts afterwards.

  8. Validate. A query that runs is not a query that is right: check the SQL with F9 and reconcile with a standard report.

SAP Notes worth knowing

Check them in SAP for Me against your release and support package; most are already included in recent S/4HANA releases.

NoteWhat it coversArea
1636416CO-OM tools: Functions of transaction SE16H. The reference for everything on this page.Documentation
1946896KBA: using SE16H to count entries per company codeHow-to
2427703KBA: SE16N or SE16H does not exist in the systemAvailability
2188410Choice between inner join and outer joinJoins
2794526One complete join statement for all tables, for better runtimeJoins
2886898SE16H: Enhancements to join conditions (string operations with the join logic)Joins
3342534SE16H: combination of Join and Grouping doesn't workJoins
2802623SE16N: Extended HAVING clause (Having Option and Having Value)Functions
2795867CO-OM tools: Implementation of formula editor in SE16HFunctions
3302692Formula field not visible in SE16H / SE16NFunctions
2880334Display of the SQL statement as a generated ABAP report (F9)Functions
1666911Report RKSE16H_CREATE_SET for object number groupsControlling
2934750SE16H: Background Execution not working for JOIN-TablesFix
3450867Wrong number of hits in the result view of SE16HFix
3007467SE16H: Authorization check for execution of Join-SelectionsSecurity
3273342SE16H allows to access a restricted table via JoinSecurity
1420281Edit function &SAP_EDIT removed from SE16NSecurity
2793263KBA: SE16 or SE16N on an S/4HANA compatibility view runs long or runs out of memoryPerformance
3529563Functions of transaction SE16JDocumentation

Frequently asked questions

What is SE16H in SAP?

SE16H (General Table Display) is a table browser in SAP S/4HANA and SAP ECC. It extends SE16N with grouping, counting, totals, aggregates, HAVING conditions, top-N sorting, formulas, table joins and drilldown, all set on the selection screen.

What is the difference between SE16N and SE16H?

SE16N displays table lines. SE16H can also aggregate them in the database: one line per group with counts and totals, top-N lists, conditions on totals and joins with other tables. For a plain look at a table, both work the same.

Is SE16H available in SAP ECC?

Yes, in ECC releases that include it; it came with SAP's HANA scenarios for SAP ERP. On a database other than SAP HANA it works, but heavy aggregations can be slow. If the transaction is missing, see SAP KBA 2427703.

How do I count the entries per value in SE16H?

Tick Group on the field and execute. You get one line per value with the number of entries, for example documents per company code in BKPF (SAP KBA 1946896).

How do I join two tables in SE16H?

Create an Outer Join Definition for the primary table, add the secondary tables, choose their output fields and fill each key field by Reference, Constant or another method. Call SE16H again, pick the definition and execute. From S/4HANA 2023, SE16J offers saved join queries too.

Can I change table entries with SE16H?

Only for tables whose dictionary settings allow maintenance, and only with change authorization in S_TABU_DIS or S_TABU_NAM. The &SAP_EDIT shortcut was removed by SAP Note 1420281. In production, keep users on display authorization.

Is SE16H available in SAP S/4HANA Cloud Public Edition?

No. It is an SAP GUI transaction for on-premise SAP S/4HANA, SAP S/4HANA Cloud Private Edition and SAP ECC. The public edition has no SAP GUI table access.