Skip to content
Learn · SAP access risk

AGR_1251 and the SAP role tables (AGR_*)

What AGR_1251 and the other AGR_* tables hold, how to query them for role analysis, and the pitfalls that distort the results.

Last reviewed · Rinexis SAP security team

Definition

AGR_1251 is the SAP table that stores the authorization data of each PFCG role: one row per role, authorization object, authorization and field, with the permitted value or value range. Together with the other AGR_* tables it is the main source for extracting and analysing role content outside PFCG.

What AGR_1251 stores

Every value you see on the Authorizations tab of a PFCG role is a row in AGR_1251. A single field with several values produces several rows, and a range produces one row with both LOW and HIGH filled. The table is client-dependent, so each client holds its own role data.

The fields most used in analysis.
FieldMeaning
AGR_NAMERole name
COUNTERSequence number linking the row to its authorization header in AGR_1250
OBJECTAuthorization object, for example S_TCODE or F_BKPF_BUK
AUTHAuthorization name within the role (one object can have several authorizations)
VARIANTTemplate or variant the authorization came from
FIELDAuthorization field, for example TCD, ACTVT or BUKRS
LOWValue, or start of a range; * means all values
HIGHEnd of a range, empty for single values
MODIFIEDMaintenance status of the authorization (standard, changed, maintained or manual)
DELETEDSet to X when the authorization is deactivated or deleted in the role

Transactions in a role appear as rows with OBJECT = S_TCODE and FIELD = TCD. That makes AGR_1251 the usual starting point for transaction-level analysis, although wrapper and custom transactions only make sense once you know what they call.

Querying the tables with SE16N

  1. Open SE16N (or SE16/SE16H) in display mode and enter AGR_1251.
  2. Filter on AGR_NAME with a pattern such as Z*FI*, and on OBJECT and FIELD for the question you are asking.
  3. Exclude rows where DELETED = X.
  4. Export to a spreadsheet, or join tables in a QuickView (SQVI) if you need users and values in one list.
  • Which roles grant a transaction: OBJECT = S_TCODE, FIELD = TCD, LOW = the transaction. Also check for * and ranges in LOW/HIGH that cover it.
  • Which roles allow table maintenance: OBJECT = S_TABU_DIS with ACTVT 02, or S_TABU_NAM for specific tables.
  • Which roles carry full access in a company code field: FIELD = BUKRS, LOW = *.

Reading role tables needs table display authorization (S_TABU_DIS or S_TABU_NAM). Use display mode only. Editing AGR_* tables directly bypasses PFCG, profile generation and change documents.

Caveats that distort analysis

  • Role data is not the user's effective access. A role can be changed without its profile being regenerated, or without the user comparison running. The values a user actually holds sit in the user master (UST04 for the profiles assigned to each user, UST12 for the field values in each authorization).
  • Composite roles have no authorization data. Expand them through AGR_AGRS before counting what a user can do.
  • Derived roles have their own rows, so the same functional access appears once per derived role, with different org values.
  • Ranges and wildcards need interpretation. A filter on LOW = FB01 misses a role with LOW = F* or a range from FA* to FZ*.
  • Transactions in AGR_TCODES (the menu) and S_TCODE values in AGR_1251 can differ, for example when S_TCODE was maintained manually. For access analysis, S_TCODE is what counts.
  • Holding S_TCODE alone does not mean a user can complete a transaction; the authority checks behind it, documented in SU24, decide that.

Organizational levels are maintained in AGR_1252. If an org level has not been filled in, the affected fields in AGR_1251 can carry the org level variable rather than a real value, so check AGR_1252 before concluding that a role is restricted.

When tables are not enough

Table extracts answer what a role contains. For questions about users across several roles and systems, SUIM reports such as RSUSR002 and RSUSR070 already resolve wildcards, ranges and composite roles. For SoD, the extract still has to be matched against a ruleset, which is where a spreadsheet approach usually breaks down as the role count grows.

Frequently asked questions

What is the AGR_1251 table in SAP?

AGR_1251 stores the authorization data of PFCG roles: the role name, authorization object, authorization, field and the permitted value or range. It is the table behind the Authorizations tab of PFCG and the main source for extracting role content.

Which table shows the users assigned to a role?

AGR_USERS lists each role assignment with the user name and validity dates. Composite role assignments appear there too, so use AGR_AGRS to resolve the single roles a composite role contains.

What is the difference between AGR_1250 and AGR_1251?

AGR_1250 holds the authorization headers of a role, one row per authorization object instance with its status. AGR_1251 holds the field values inside each of those authorizations. They are linked by role name and counter.

How do I find all roles that contain a transaction code?

Query AGR_1251 in SE16N with OBJECT S_TCODE, FIELD TCD and LOW set to the transaction, excluding deleted rows. Also check for wildcards and ranges, or use SUIM report RSUSR070, which resolves them for you.

What does the DELETED field in AGR_1251 mean?

When DELETED is set to X, the authorization has been deactivated or deleted in the role and is not part of the generated profile. Exclude these rows from any analysis of what a role grants.

How Rinexis handles this

Sodly reads AGR_1251 directly: upload the export and it matches each role's authorization objects, fields and values against your ruleset, surfacing SoD conflicts by user and by role without hand-built table joins.

Where a role carries both sides of a risk, Sodly flags the role so it can be split into single-transaction versions for your PFCG build.

See your own SAP access risk, not a textbook example

Talk to an SAP security specialist about your roles, ruleset and audit timeline, or explore the platform modules that analyse and fix access risk.