SAP tableObjectREPOSRCModuleABAP

REPOSRC table — Program Source Administration Table

REPOSRC holds the administrative record for each ABAP program's source code storage, one entry per program name and version state (active or inactive). It does not contain the source text itself, only the metadata that the ABAP kernel uses to locate and manage the stored source. Program editors, transports, and activation logic read and write it indirectly, never through direct SQL changes.

REPOSRC is the low-level administrative table behind ABAP program source storage, tracking which programs exist and in what version state without holding the source text itself. This page covers what a row actually represents, how to join it safely to TADIR and TRDIR, and the recurring mistake of treating it as a readable source repository or a safe target for manual correction.

Published 15 Sept 2026· 1,073 words

What it stores

One row in REPOSRC represents the administrative entry for a given ABAP program name in a given version state, active or inactive. When a developer changes a program and does not activate it, two entries can exist side by side, one marked active and one marked inactive, until activation reconciles them. The table is part of the source management layer introduced to separate program administration from the raw source text, which is stored elsewhere and accessed through the editor and generation tooling rather than direct table read. REPOSRC therefore answers questions like whether a program has an unreleased inactive version pending, not what the program's logic actually says. It covers reports, includes, function group includes, module pools, and the generated include programs behind classes and function modules, since all of these are technically ABAP programs.

Key fields

  • MANDT - client field carried for technical reasons; program source is a cross-client repository object so this rarely varies meaningfully across clients on the same system
  • PROGNAME - the ABAP program name, matching TRDIR-NAME and, for reports, TADIR-OBJ_NAME where TADIR-OBJECT equals PROG
  • R3STATE - version state indicator distinguishing the active version from an inactive, unreleased version of the same program name
  • Other administrative fields such as last-changed user and timestamp exist on the table but are not listed here with confidence in their exact names and should be confirmed in the data dictionary before being used in a query

How it joins the data model

  • REPOSRC-PROGNAME = TRDIR-NAME to bring in the program's technical attributes such as program type and fixed-point arithmetic setting
  • REPOSRC-PROGNAME = TADIR-OBJ_NAME with TADIR-OBJECT = 'PROG' to find the package, original system, and application component the program belongs to
  • REPOSRC-PROGNAME appearing as the object key inside a transport request's object list, joined through E071-OBJ_NAME with E071-OBJECT = 'PROG' or 'REPS' depending on how the change was recorded
  • For class pool includes, REPOSRC-PROGNAME matches the generated include name pattern tied to the class, so a join back to SEOCLASS is needed via the class name embedded in that generated name rather than a direct key match

How to read it safely

Always restrict by PROGNAME first; this table has one row per program per version state across the entire system, so an unrestricted select is effectively a full repository scan and will be slow or blocked in a shared system. Restrict R3STATE to the active version unless the question is specifically about pending inactive changes. The client field is not a meaningful selectivity lever here because repository objects are cross-client in behavior even though the table carries a client column; do not expect different content per client on the same system.

How to prove it in the data

Symptom: a program's runtime behavior does not match what appears in the editor, or a transport seems to have picked up an unreleased change. Select REPOSRC where PROGNAME equals the program name, with no restriction on R3STATE, and look at how many rows come back. Two rows, one active and one inactive, confirms there is an unreleased version sitting alongside the active one, which explains the mismatch until someone activates or resets it.

ECC vs S/4HANA

REPOSRC continues to exist on S/4HANA with the same purpose, since it belongs to the ABAP kernel's source management layer rather than to any business data model that S/4HANA restructured. There is no business-layer CDS compatibility view over it because it is not a business table; it is consulted by development tooling such as the ABAP editor, transport handling, and program activation, and that mechanism did not change with the S/4HANA conversion.

Common pitfalls

  • Treating REPOSRC as a place to read source code: it stores administrative state, not the program text, and selecting from it to review logic wastes time compared to opening the program in the editor
  • Manually deleting or updating rows to fix a program stuck in an odd state: this corrupts the source administration and can leave the program unusable, unlike using activation, deletion via the object editor, or transport tools, which keep related storage in sync
  • Assuming a row with R3STATE marked inactive means the program is not in use: the active version still runs in production exactly as before, the inactive row only signals uncommitted development work sitting on top of it
  • Counting rows per program name to estimate how many programs exist in the system without filtering on state, which double counts every program that currently has both an active and inactive version
  • Expecting client-specific content because MANDT is present as a field: repository objects behave as cross-client entities, so filtering by client to isolate a supposedly client-specific copy of a program's source administration will not explain a genuine discrepancy
  • Confusing this table with the object directory: PROGNAME alone does not tell the package, transport layer, or original system; that information lives in TADIR and TRDIR, and pulling conclusions about ownership or transportability from REPOSRC alone is a common shortcut that goes wrong

Whose problem this is

A data question on REPOSRC belongs to the ABAP development or Basis team, not to a functional module owner. Functional consultants rarely have a reason to query this table directly; when a program's state looks wrong, the correct escalation path is the developer who owns the object, using the editor and transport tools rather than direct table maintenance.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-tables/reposrcERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.