SAP S/4 HANA Data Extraction Guide
Share this with your Basis team or SAP administrator before starting an assessment. All extractions require read-only access — no changes are made to the system.
Prerequisites & Access Requirements
Before extraction begins, confirm the following access levels are available. Read-only access is sufficient throughout.
Required for ABAP system transactions (SE16, SUIM, SM59, SCC4, etc.). A dialog user with S_TCODE authorization for the relevant transactions and read access to the tables below is sufficient. No write access is needed.
Required for HANA database-level extractions (hana_users, hana_granted_roles, hana_audit_policies, hana_encryption, hana_password_policy). A HANA DB user with CATALOG READ or DATA ADMIN privilege on system views is sufficient.
Required for BTP and Integration Suite exports (btp_roles, btp_trust_config, btp_iflows, btp_api_proxies). A BTP subaccount administrator or security administrator role is required. Alternatively, a BTP CLI user with viewer permissions.
SE16 / SE16N table browser and report RSPFPAR are used in display mode only.Minimum Required Files vs. Optional Files
Required files must be present for a complete assessment. Optional files enhance coverage but are not blocking.
HANA Database (5 files)
Run these SQL queries in SAP HANA Studio, HANA Cockpit Database Explorer, or any JDBC/ODBC client connected to the HANA system database. The executing user must have SELECT on SYS schema views.
- HANA Cockpit: navigate to Security → User Management → select all users → Export as CSV
- HANA Studio: Systems → [System] → Security → Users → right-click → Export
USER or ROLE. Filter to USER grantees for direct user assignments. Include role-to-role grants for privilege escalation analysis.
- HANA Cockpit: navigate to Security → Audit Policy → Export
- HANA Studio: Systems → [System] → Security → Audit Policies → Export list
maximum_password_lifetime, minimal_password_length, maximum_invalid_connect_attempts, password_lock_time.
Fiori / OData & ICF Services (2 files)
Covers SAP Gateway OData services and active ICF HTTP endpoints. Both are critical for internet-facing attack surface assessment.
- Log on to the SAP Gateway Hub system (or the embedded gateway if using a single-system landscape)
- Enter transaction
/IWFND/MAINT_SERVICEin the command field and press Enter - The Service Catalog is displayed. Choose Filter → set Active =
Xto show only active services - Go to List → Export → Spreadsheet to download the active service list as CSV/XLSX
- Alternatively: run
SE16→ enter table/IWFND/I_SRV_MONI→ set field ACTIVE =X→ Execute → Export → Spreadsheet
- Enter transaction
SICFand press Enter - Choose Execute to display the ICF service tree
- From the menu go to List → Display Active Services to filter to activated services only
- Use List → Download to save the list locally as a spreadsheet
- Alternative via SE16: open table
ICFSERVLOC, set ICFACTIVE =X, set max rows to 50,000, Execute → Export → Spreadsheet
ABAP Authorization & User Management (3 files)
Core identity and access data extracted from ABAP user management tables. These three files power SoD analysis, privilege review, and user lifecycle checks.
- Enter transaction
SE16and press Enter - Enter table name
AGR_1251and press Enter - Leave all selection fields blank, set Maximum number of hits to
500000 - Press Execute (F8)
- In the ALV result, go to System → List → Save → Local file → select Spreadsheet → confirm path and save
- Enter transaction
SE16→ enter tableAGR_USERS→ press Enter - Leave selection fields blank, set maximum hits to
500000 - Press Execute (F8)
- Go to System → List → Save → Local file → Spreadsheet → save
- Alternative via SUIM: SUIM → Roles → By Users (Complex) → leave user field blank → Execute → Export
- Enter transaction
SE16→ enter tableUSR02→ press Enter - Set Maximum number of hits to
50000(adjust if user count exceeds this) - Press Execute (F8) — do not filter by client if extracting all clients
- Go to System → List → Save → Local file → Spreadsheet → save
BTP & Integration Suite (4 files)
Extracted from SAP Business Technology Platform Cockpit. Required only if the organisation uses BTP services including Integration Suite or API Management.
- Log on to cockpit.btp.cloud.sap and navigate to your Global Account → Subaccount
- Go to Security → Role Collections
- Click each Role Collection → view Users → export using the Download button, or take a full export from the Role Collections overview
- Alternative (BTP CLI):
btp list security/role-collection --subaccount [ID] --output jsonthen convert to CSV
- In BTP Cockpit, navigate to Subaccount → Security → Trust Configuration
- The list shows all configured identity providers (default SAP ID Service and any custom IdPs)
- Use the Export or screenshot-and-compile approach — note IDP name, type, status, and whether it is the default IdP
- Open SAP Integration Suite from BTP Cockpit subscriptions
- Go to Design → Integrations — this shows all packages and iFlows
- Export the package list using the Download icon on each package, or use the Integration Suite OData API:
GET /api/v1/IntegrationPackages - Note the authentication type (OAuth, Basic, Certificate) for each deployed iFlow
- Open API Management from the BTP Cockpit subscriptions (or the API Portal URL)
- Navigate to APIs — all deployed proxies are listed
- Use the Export option or manually note each proxy: name, target URL, authentication type, whether rate limiting is enabled, and status
Basis & System Configuration (2 files)
System-level configuration including profile parameters and client settings — foundational controls reviewed in every SAP security assessment.
- Enter transaction
SA38, enter report nameRSPFPAR, and press Execute (F8) - Leave the parameter name field blank to retrieve all parameters
- From the ALV results, go to System → List → Save → Local file → select Spreadsheet → save
- Alternative (table export):
SE16→ tablePAHI→ set max rows 1000 → Execute → Export → Spreadsheet
- Enter transaction
SCC4and press Enter - The client overview is displayed. Ensure the display mode is active (do not click Edit)
- Go to Table View → Print / Display → Export → Spreadsheet, or use System → List → Save → Local file
- Confirm all clients are included (000, 001, production client, and any sandbox clients)
Change & Transport Management (1 file)
Transport request history provides evidence of change management controls and identifies direct-to-production changes.
- Enter transaction
SE10→ press Enter to open Transport Organizer - Set the User field to
*and select status options: Released and Modifiable - Set a date range (recommend last 12 months minimum for an annual assessment)
- Press Display to retrieve the list
- Go to List → Export → Spreadsheet to save locally
- Alternative:
SE16→ tableE070→ set date range → Execute → Export
User Lifecycle & RFC Connections (2 files)
Extended user details for provisioning and termination review, plus RFC destination inventory for interface security analysis.
- Enter transaction
SUIM→ navigate to Users → By Logon Date and Time - Leave the user filter blank, set date range from system inception to today, and press Execute
- Export the result via List → Export → Spreadsheet
- Alternatively, use
SE16→ tableUSR21(user address cross-reference) → Execute → Export for email and address data
- Enter transaction
SM59and press Enter - Expand all connection type groups (A = ABAP, G = HTTP, H = HTTP(S), L = Logical, T = TCP/IP, W = WebRFC)
- Select all entries, then go to Goto → RFC Destinations → Print List or List → Export → Spreadsheet
- For each Type 3 (ABAP-to-ABAP) connection, note whether it is a Trusted System connection and whether a stored user/password exists
Audit Logging, Security Notes, EAM & Operational Files (5 files)
Covers security audit log configuration, SAP Note currency, emergency access management, background job security, and payment run controls.
- Enter transaction
SM19→ press Enter to open Security Audit Log Configuration - Click Display Active Profile to see the currently active configuration
- Note each filter entry: number, active status, event class selections, user filter, client filter, and log level
- Since SM19 does not have a built-in export, manually compile each filter row into the CSV. Most systems have 5–15 filter entries
- Confirm whether the audit log is active at all (status icon in the header area)
- Enter transaction
SNOTE→ press Enter to open SAP Note Assistant - Navigate to Utilities → Applied Notes to see all applied notes
- Export via List → Export → Spreadsheet
- Alternative:
SE16→ tableCWBNTHEAD→ filter NOTE_TYPE =SN→ Execute → Export
- If SAP GRC Access Control is deployed: navigate to GRFN transaction or run report
/GRCPI/GRIA_EAM→ set date range → Execute → Export - If custom EAM is in use: identify the custom log table with your Basis team →
SE16→ open table → date filter → Execute → Export - If no formal EAM exists: note this in the assessment — absence of an EAM log is itself a finding
- Enter transaction
SPAM→ press Enter to open the Support Package Manager - Navigate to Display → Component Information or the Component List view
- This shows all installed software components (SAP_BASIS, SAP_ABA, S4CORE, etc.) with their release and patch levels
- Export via List → Export → Spreadsheet
- If Add-On components are also required: run
SAINTfor add-on installation status
- Enter transaction
SM37→ press Enter - Set Job name =
*, User name =*, and tick all Status checkboxes (Active, Scheduled, Released, Ready, Running, Finished, Cancelled) - Set a date range — for a security assessment, cover at least the last 90 days of job history
- Press Execute, then List → Export → Spreadsheet to save
- Alternative:
SE16→ tableTBTCO→ Execute → Export for the full job definition table
- Enter transaction
F110→ press Enter - Enter the run date range in the Run Date field and an identification if known, or leave blank to see all runs
- Select a run → click Display to see the full run log including who proposed, approved, and executed
- Export via List → Export → Spreadsheet
- Alternative:
SE16→ tableREGUH→ set date range in LAUFD field → Execute → Export. Note: REGUH contains settlement data per payment run
Quick Reference — All Transactions & Sources
Print this table and hand it to your Basis team or SAP administrator.
| Transaction / Source | Description | Used For (Files) | Domain |
|---|---|---|---|
SYS.USERS (SQL) | HANA user account system view | hana_users.csv | HANA DB |
SYS.GRANTED_ROLES (SQL) | HANA role grant system view | hana_granted_roles.csv | HANA DB |
SYS.AUDIT_POLICIES (SQL) | HANA audit policy system view | hana_audit_policies.csv | HANA DB |
SYS.M_VOLUME_ENCRYPTION_STATUS | HANA volume encryption monitoring view | hana_encryption.csv | HANA DB |
SYS.M_ENCRYPTION_OVERVIEW | HANA encryption component overview | hana_encryption.csv | HANA DB |
SYS.M_PASSWORD_POLICY (SQL) | HANA password policy parameters view | hana_password_policy.csv | HANA DB |
/IWFND/MAINT_SERVICE | SAP Gateway service maintenance | odata_services.csv | Fiori |
SICF | ICF service tree maintenance | icf_services.csv | Fiori |
SE16 → AGR_1251 | Role authorization data table | role_auth_objects.csv | ABAP Auth |
SE16 → AGR_USERS | User-role assignment table | user_role_matrix.csv | ABAP Auth |
SUIM | User Information System — roles, auths, users | role_auth_objects.csv, user_role_matrix.csv, user_details.csv | ABAP Auth |
SE16 → USR02 | User master data — logon, lock status | critical_users.csv | ABAP Auth |
SE16 → USR21 | User address cross-reference | user_details.csv | User Lifecycle |
BTP Cockpit → Security → Role Collections | BTP role collection assignments | btp_roles.csv | BTP |
BTP Cockpit → Security → Trust Configuration | BTP identity provider configuration | btp_trust_config.csv | BTP |
Integration Suite → Design → Integrations | Integration Suite iFlow listing | btp_iflows.csv | BTP |
API Management → APIs | API proxy listing | btp_api_proxies.csv | BTP |
SA38 → RSPFPAR | Profile parameter report | profile_parameters.csv | Basis |
RZ11 | Profile parameter display (individual) | profile_parameters.csv | Basis |
SE16 → PAHI | Profile parameter history table | profile_parameters.csv | Basis |
SE10 / SE09 | Transport Organizer | transport_requests.csv | Change Mgmt |
SE16 → E070 | Transport request header table | transport_requests.csv | Change Mgmt |
SM59 | RFC destination maintenance | rfc_connections.csv | RFC |
SM19 | Security audit log configuration | audit_log_config.csv | Audit |
SNOTE | SAP Note Assistant — applied notes | installed_notes.csv | Patching |
SE16 → CWBNTHEAD | SAP Note header table | installed_notes.csv | Patching |
SCC4 | Client settings maintenance | client_settings.csv | Basis |
GRFN / /GRCPI/GRIA_EAM | GRC EAM firefighter log report | eam_log.csv | EAM / GRC |
SPAM | Support Package Manager | software_components.csv | Patching |
SAINT | Add-on Installation Tool | software_components.csv | Patching |
SM37 | Background job overview | background_jobs.csv | Jobs |
SE16 → TBTCO | Background job definition table | background_jobs.csv | Jobs |
F110 | Payment run — display & log | payment_runs.csv | Finance |
SE16 → REGUH | Payment settlement header table | payment_runs.csv | Finance |
Tips & Troubleshooting
Common issues encountered during SAP data extraction and how to resolve them.
By default SE16 returns a maximum of 200 rows. You must increase this before running the query. In the selection screen, set the Maximum Number of Hits field to a sufficiently large number (e.g. 500000 for AGR_1251, 50000 for USR02). If the exact row count is unknown, temporarily set it to 9999999 and note the actual count returned for your working papers.
If SE16 returns an authorization error for a specific table, the extracting user may be missing S_TABU_DIS authorization for that table's authorization group, or S_TABU_NAM for the specific table name. Ask your Basis admin to grant read-only access to the specific table. Do not request SAP_ALL — only the minimum required authorizations.
When saving from the SAP ALV list as a local file, select Spreadsheet format (not text / tab delimited) where possible. If CSV format is required, ensure the file is saved as UTF-8 with BOM to avoid corruption of special characters (umlauts, accented characters in user names). In Excel, use Data → From Text/CSV and select UTF-8 encoding when opening.
If the HANA SQL queries return an error such as "insufficient privilege: Not authorized", the executing DB user is missing CATALOG READ or SELECT privilege on the SYS schema. Ask your HANA DBA to grant GRANT CATALOG READ TO [user] or GRANT SELECT ON SYS.USERS TO [user]. This is a read-only privilege and does not allow any data modification.
On production systems with millions of records, run large SE16 extracts during off-peak windows (e.g. weekends or batch maintenance windows). For AGR_1251 and AGR_USERS, consider using SE16N instead of SE16 — it offers better performance via optimised SQL. When extracting USR02, consider filtering by client to reduce result sets if a multi-client landscape is in scope.
Name each file exactly as specified in this guide (e.g. hana_users.csv, role_auth_objects.csv) before uploading to AuditCore. The assessment engine uses these exact filenames for classification. Include the client number or system ID as a suffix if exporting from multiple systems (e.g. critical_users_PRD300.csv). Confirm the file encoding is UTF-8 and that the first row contains column headers.
If a transaction such as /IWFND/MAINT_SERVICE or SNOTE is not available, it may not be installed on this system (e.g. OData gateway is on a separate hub system). Consult your Basis team to identify the correct system in the landscape. For SNOTE, ensure the SAP Note Assistant add-on (SAP_BASIS component) is at a sufficient release level.
If SAP HANA Studio is not installed, use SAP HANA Cockpit (browser-based) instead. Navigate to the Database Overview → SQL Console to run SQL queries. Alternatively, use the SAP HANA Database Explorer plugin in SAP Business Application Studio (BAS) if BTP Dev Space access is available. All queries in this guide are standard ANSI SQL compatible with HANA's SQL console.
Live Connection — Enterprise Plan Enterprise Plan Feature
The Enterprise plan connects AuditCore directly to your SAP S/4 HANA system for real-time assessment without manual CSV exports. This section explains how to prepare your SAP environment.
AuditCore connects via RFC (Remote Function Call) to read data directly from the SAP system using the same underlying tables as the manual export. No ABAP development is installed on the client system — the connection is read-only and uses standard SAP APIs. A dedicated RFC destination is created on the SAP system pointing to the AuditCore assessment server.
- SAP S/4 HANA 1709 or higher (on-premise or RISE with SAP)
-
Network connectivity: AuditCore server IP whitelisted on SAP firewall for port
33XX(where XX = SAP instance number, typically00) - RFC-enabled audit user created (see step C below)
- SAP Message Server accessible (for group logon) or Application Server host known
- SNC (Secure Network Communications) recommended for encrypted RFC — certificate exchange required
-
1
In SU01, create user
VERGENT_AUDITwith user typeS(System) — not Dialog -
2
Assign the following roles/profiles — create a custom role (e.g.
ZAUDITCORE_READ) containing ONLY these authorization objects with display/read values: - 3 Set a strong password — minimum 12 characters, uppercase, digit, special character
- 4 Set validity end date — recommended 90 days, renewable per engagement
- 5 Lock the user between assessments — SU01 → Lock
If SNC is enabled on the SAP system, AuditCore supports SNC/Kerberos and X.509 certificate-based encryption. Contact support@vergent.co.ke for the AuditCore SNC certificate to import into your SAP trust store.
VERGENT_AUDIT user must be locked between assessments. Never grant SAP_ALL or S_DEVELOP to this user. All RFC calls made by AuditCore are SELECT-only — no INSERT, UPDATE, or DELETE operations are performed. A full activity log is provided post-assessment.