ALV Reports Part 10: Authorization and Sensitive Data in ALV Reports
Preview · a free account unlocks the full lesson
Secure ALV reports: authorization checks on the selection screen and per row (AUTHORITY-CHECK with organizational levels), hiding or masking sensitive columns, restricting export and layout saving, and protecting drill-down navigation.
In this lessonShow sectionsHide sections
Visual overview
Explanation
An ALV grid shows everything that is in its output table, so authorization has to be checked before rows ever go into that table — this matters because Parts 1 through 9 built functional ALVs, but a report that shows payroll, vendor bank data, or customer personal data must also be safe, and missing checks here are a common audit finding.
Checks belong at two levels. At transaction or report start, S_TCODE is checked automatically for a transaction, but a report run via SA38 needs its own check — either an authorization group set in the report's attributes, or an AUTHORITY-CHECK placed in INITIALIZATION or AT SELECTION-SCREEN.
On the selection screen, the organizational values the user entered (for example, all the company codes in s_bukrs) should be checked at AT SELECTION-SCREEN. And at the row level, after data has been selected, rows the user isn't allowed to see should be removed — check each distinct organizational value once rather than checking every single row.
The AUTHORITY-CHECK statement itself looks like AUTHORITY-CHECK OBJECT 'F_BKPF_BUK' ID 'BUKRS' FIELD lv_bukrs ID 'ACTVT' FIELD '03', where sy-subrc = 0 means the user is allowed. Use standard authorization objects where they already exist, and create custom ones in SU21 for custom data; SU53 and ST01 (the STAUTHTRACE trace) are the tools for analyzing failures.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Related SAP topics
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.