BASIS Report Custom development ALV report

User, Role and Transaction Authorization Audit Report with Role Assignment History

Short answer: A custom ALV report that shows in one audit-ready list who can run a transaction and through which role, which transactions a user is authorized for through which roles, and who added or removed role assignments and when. Composite roles are expanded to single roles, ranges and wildcards in S_TCODE values are resolved, and locked or expired users are shown separately.

Estimated effort
M · 8–12 working days
System
ECC and S/4HANA
Tables
13
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

The user information system (SUIM) answers these questions in separate reports: transaction to users, user to roles and change documents are separate screens and the results come in a technical format. The role-transaction-user matrix and the assignment history are not combined in one list; the file for the auditor is prepared by hand every time and cannot be compared between periods.

Who uses it? Internal and external auditors, authorization administrators, information security teams and process owners who own roles.

Closest standard alternatives

  • SUIM User Information System. Offers separate reports for users, roles, transactions and change documents; does not combine them in one audit list.
  • PFCG Role Maintenance. Shows a role's menu, authorizations and users role by role; does not give a system-wide matrix.

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
AGR_USERSAssignment of Roles to UsersUser-role assignment and validity dates—ECC + S/4
AGR_1251Authorization Data for RolesRole authorization values: transactions granted through S_TCODEAGR_1251-AGR_NAME = AGR_USERS-AGR_NAMEECC + S/4
AGR_TCODESAssignment of Roles to Transaction CodesTransactions in the role menuAGR_TCODES-AGR_NAME = AGR_USERS-AGR_NAMEECC + S/4
AGR_AGRSRoles in Composite RolesSingle roles of a composite roleAGR_AGRS-AGR_NAME = AGR_USERS-AGR_NAMEECC + S/4
AGR_TEXTSRole TextsRole descriptionAGR_TEXTS-AGR_NAME = AGR_USERS-AGR_NAMEECC + S/4
USR02User Logon DataUser lock, validity and user typeUSR02-BNAME = AGR_USERS-UNAMEECC + S/4
USR21User Name to Address Key AssignmentUser's person numberUSR21-BNAME = AGR_USERS-UNAMEECC + S/4
ADRPPersons (Business Address Services)User's full nameADRP-PERSNUMBER = USR21-PERSNUMBERECC + S/4
TSTCSAP Transaction CodesTransaction codes (for resolving ranges and wildcards)—ECC + S/4
TSTCTTransaction Code TextsTransaction code textTSTCT-TCODE = TSTC-TCODEECC + S/4
CDHDRChange Document HeaderRole assignment change document header (object class PFCG)—ECC + S/4
CDPOSChange Document ItemsRole assignment change detail: role added or removedCDPOS-CHANGENR = CDHDR-CHANGENRECC + S/4
USH04Change History for AuthorizationsProfile assignment change historyUSH04-BNAME = AGR_USERS-UNAMEECC + S/4

BAPIs and functions used

  • CHANGEDOCUMENT_READRead Change Documents. Reads role assignment change documents

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_TCODETransaction codeRange / multipleTSTC-TCODENoFB60
S_UNAMEUserRange / multipleAGR_USERS-UNAMENoMDEMIR
S_AGRRoleRange / multipleAGR_USERS-AGR_NAMENoFI_*
S_UDATEChange date (history view)Range / multipleCDHDR-UDATENo01.01.2026 – 16.11.2026
P_VIEWView: transaction / user / role / assignment historyRadio button—Yesİşlem kodu
P_LOCKAlso show locked and expired usersCheckbox—No—

Output columns

#ColumnSource
1UserAGR_USERS-UNAME
2Full nameADRP-NAME_TEXT
3RoleAGR_USERS-AGR_NAME
4Role descriptionAGR_TEXTS-TEXT
5Composite roleCalculated Name of the composite role if the single role was assigned through it (AGR_AGRS)
6TransactionCalculated Transaction resolved from the S_TCODE value
7Transaction textTSTCT-TTEXT
8Valid fromAGR_USERS-FROM_DAT
9Valid toAGR_USERS-TO_DAT
10User statusCalculated Active, locked or expired (USR02-UFLAG, USR02-GLTGB)
11ChangeCalculated Role added or removed (CDPOS change indicator)
12Changed byCDHDR-USERNAME
13Change dateCDHDR-UDATE

Sample output

UserFull nameRoleRole descriptionComposite roleTransactionTransaction textValid fromValid toUser statusChangeChanged byChange date
MDEMIRMehmet DemirFI_SATICI_FATURAVendor invoice entryFI_MUHASEBE_KOMPOZITFB60Enter Incoming Invoices01.01.202631.12.9999Active
SKAYASelin KayaFI_SATICI_FATURAVendor invoice entryFB60Enter Incoming Invoices15.03.202630.06.2026ActiveAddedYETKI_ADMIN114.03.2026
SKAYASelin KayaFI_SATICI_FATURAVendor invoice entryFB60Enter Incoming Invoices15.03.202630.06.2026ActiveRemovedYETKI_ADMIN201.07.2026
EOZEmre ÖzFI_GOSTERIMAccounting displayFB03Display Document01.02.202631.12.9999Locked
A view built with fictional sample data; not real system data.

How does the report work?

  1. Role-transaction mapping: the values of authorization object S_TCODE in single roles (AGR_1251) are read; ranges and wildcards are resolved against the transactions in TSTC. Transactions in the role menu (AGR_TCODES) are shown as well; a menu transaction that is not granted through S_TCODE is flagged.
  2. Composite roles are expanded to their single roles with AGR_AGRS; access a user gets through a composite role is shown with the composite and single role it comes from.
  3. User-role assignments are read from AGR_USERS with their validity dates. Assignments not valid on the report date, locked users (USR02-UFLAG) and users past their validity (USR02-GLTGB) are flagged separately; name and department come from USR21 → ADRP/ADCP.
  4. Assignment history: role assignment change documents (CDHDR/CDPOS, object class PFCG, table AGR_USERS) are read for the selected date range; each line shows the role added or removed, its validity, the user who made the change, date and time. USH04 is read as well for the profile assignment history.
  5. Views: (a) transaction → users, (b) user → roles → transactions, (c) role → users, (d) assignment history. Each view is exported to Excel in audit format with a heading, run date, selection criteria and the user who ran it.
  6. Note: S_TCODE shows the ability to start a transaction; object checks inside the transaction (e.g. company code, document type) also apply. The report states this as a note on every output; for detailed object checks it is used together with the critical authorization and segregation of duties reports.

Performance notes

Restrict AGR_1251 to object S_TCODE and resolve ranges once per role. Read change documents by object class and date range; read CDPOS only for the selected headers. In large systems run view (b) in the background.

Features

  • ALV list (sort, filter, subtotals)
  • User-specific layout variants
  • Export to Excel Each view is exported in audit format with heading, selection criteria and run details.
  • Double-click drill-down to the document From a line the user drills down to the role (PFCG display) and the user (SU01 display).
  • Runs as a background job

Authorization objects

  • S_USER_GRPDisplaying user master data by user group
  • S_USER_AGRDisplaying roles
  • S_USER_TCDDisplaying transactions in roles

Frequently asked questions

Does the report prove that a user can really perform the activity?

S_TCODE shows the ability to start the transaction. Object checks inside the transaction (company code, document type, activity) also apply. The report states this limit as a note on every output; for object-level audits it should be used together with the critical authorization and segregation of duties reports.

How far back does the role assignment history go?

Role assignment change documents remain in the system as long as they are not deleted or archived; the report reads them for the selected date range. If change documents have been archived, the history view goes back to the archiving date.

Related reports

BASIS Report Custom ALV report

Expiring and Expired Role Assignments Report

A custom ALV report that lists role assignments whose validity ends within the next N days or that have ended but are still on the user, with the …

AGR_USERS · AGR_TEXTS · AGR_DEFINE · AGR_1016

BASIS Report Custom ALV report

Segregation of Duties (SoD) Conflict Report by User

A custom ALV report that lists users who can run conflicting activities together (for example changing vendor master data and running the payment …

USR02 · AGR_USERS · AGR_1251 · TSTC

Let us build this report for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: User, Role and Transaction Authorization Audit Report with Role Assignment History