---
title: SAP Query Security
description: SAP Query, SAP reporting. Each one of those could bring issue during authorization management. How to face up the query to have a better governance on this topic?
image: https://www.aglea.com/hubfs/Aglea/Imported_Blog_Media/SAP%20QUERY%20SECURITY-Jun-14-2024-10-10-04-6153-AM.jpg
---

[linkedin](https://www.linkedin.com/company/292350?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A3373431891426179412478%2CVSRPtargetId%3A292350%2CVSRPcmpt%3Aprimary) [YouTube](https://www.youtube.com/c/AgleaSAPSecurity?sub_confirmation=1) [Twitter](https://twitter.com/AgleaItaly?lang=en)

[![Logo-Aglea-horsa-company](https://www.aglea.com/hubfs/Aglea/Aglea_November2018%20Theme/Images/Logo-Aglea-horsa-company.webp) ](https://www.aglea.com/en)

# SAP Query Security

# SAP Query Security

Posted by [Marta Ortona](https://www.aglea.com/en/blog/author/marta-ortona) on Aug 12, 2022 12:00:00 AM

- [Tweet](https://twitter.com/share)

 

Data retrieval is normal in a management system. But what are the tools available in a SAP ERP system? **Is it correct reporting in a transactional system?** 

![SAP QUERY SECURITY](https://www.aglea.com/hubfs/Aglea/Imported_Blog_Media/SAP%20QUERY%20SECURITY-Jun-14-2024-10-10-04-6153-AM.jpg)

**What are the security impacts **in doing corporate data reporting in SAP and** how can they be mitigated? **What is the SAP query survival manual? 

## What are the ways to report in SAP ERP?

There are several, depending on the needs, among the main there are the following:

- SAP Query (Transactions SQ00, SQ01, SQVI), attention, in SAP HR module there are additional specific reporting transactions
- Transactions running programs to extract SAP business reports

## Is the SAP management system the right reporting tool?

We often clash with the question above. There are two distinct database modes:

- [OLAP On-Line Analysis Processing](https://it.wikipedia.org/wiki/OLAP)
- [OLTP On-Line Transaction Processing](https://it.wikipedia.org/wiki/Online_transaction_processing)

The first designed to perform reporting, while the latest for data processing (not just for reading)

 

**In the SAP product family there are many reporting solutions,** for example SAP BW/BI Business Warehouse/Business Intelligence, SAP Business Objects and many others. Obviously, there are also third party software.

 

The conclusion is that if you need to analyze many data and produce many views (for each department), maybe you need to have a tool designed to do that job and you can’t use the company ERP. **The latter has tools for reporting but is not designed to do this work. **

 

## Reporting security in SAP ERP

Beyond the above said, and taking up the title,** one of the most critical security aspects is represented from the queries SAP**. There are actually no display-only transactions in this area. 

 

**Everything is controlled by an authorization object called S_QUERY.**

 

![S_QUERY](https://www.aglea.com/hubfs/Aglea/Imported_Blog_Media/S_QUERY-Jun-14-2024-10-10-06-6983-AM.png)

 

This object, when present in user's permissions, determine whether SAP query transactions (SQ00 ed SQ01, see the following image), are display-only or allow you to change the queries' content.

 

![SQ00](https://www.aglea.com/hubfs/Aglea/Imported_Blog_Media/SQ00-Jun-14-2024-10-10-02-8988-AM.png)

 

Not only. The SAP queries' module has inside a small authorization concept in addition to that normally handled through roles (then through the use of the SAP generated profile, PFCG transaction).

 

**This authorization model allows to manage query user groups **(through SQ03 transactions).

 

![SQ03](https://www.aglea.com/hubfs/Aglea/Imported_Blog_Media/SQ03-Jun-14-2024-10-10-03-4792-AM.png)

 

Let's make an example

1. **I want to enable a user to display only queries, what can I do? ** 
     - Authorize transactions by deactivating the S_QUERY object. This allows to authorize transaction in read-only mode. 

 

However, this is not enough.        

 

Because if I disable the S_QUERY object** I must include the user in one or more defined user query groups **(this allows the user to see and execute queries in that/those groups). Usually query groups are structured by SAP module or corporate function.  

 

**Not so convenient as management! But this isn't over! **

 

Once the user has been enabled to transaction, disabled the authorized object S_QUERY and included the user in the appropriate group, **you will then assign the correct authorizations on the tables that the queries call**. 

 

This occurs through the authorization object S_TABU_DIS/S_TABU_NAM (where a group of tables or individual SAP tables can be authorized).

 

Therefore the tables to be authorized won't have a dedicated transaction,** this authorization must be issued user by user or released by assigning it to the SQ00 transaction** (granting users more permissions than expected).

 

Further consideration, read the note [OSS 24578 - SAP Query: Authorizations.](https://launchpad.support.sap.com/#/notes/24578)

 

## What are the solutions to secure ERP SAP reporting?

The most effective solution we have seen over the years is:

1. **If possible, equip yourself with a system to carry out corporate/directional reporting **(avoiding doing so in the SAP ERP system)**.** In addition to the design and performance aspects of the system, there are additional authorization specificities to better segment and segregate data, in the reporting context. Not present in a transactional system.
2. In the event that, as above, won't be possible, **define for each query a custom transaction** that executes the program generated by the query itself: 

- Avoid managing query user groups (it isn't a small thing)
- Assigning correct table reading authorizations to individual transactions that require it
- Having better governance related to who sees what (in [GDPR](https://www.aglea.com/sap-gdpr) optic this could be important)
- Simplify the issue of query-related authorizations so they become transactions like all the others and therefore can be inserted in the relative [job role](https://www.aglea.com/sap-security)
- Yes, you have to define an extra custom transaction, but it is only a call for a program (which is actually a query) 

## How to handle queries in SAP then?

- **Create a custom transaction via SE93 transaction** (remember to give a naming to custom transactions, especially to understand the scope and the operability)

 

![SE93](https://www.aglea.com/hs-fs/hubfs/Aglea/Imported_Blog_Media/SE93-Jun-14-2024-10-10-06-2064-AM.png?width=444&name=SE93-Jun-14-2024-10-10-06-2064-AM.png)

 

- **Identify the program name **(query), through SQ00 ** Identifica il nome del programma** (query), tramite SQ00 following the path shown below (Query -> More functions -> Display report name)

 

![QUERY_NAME](https://www.aglea.com/hs-fs/hubfs/Aglea/Imported_Blog_Media/QUERY_NAME-Jun-14-2024-10-10-05-8206-AM.png?width=435&name=QUERY_NAME-Jun-14-2024-10-10-05-8206-AM.png)

 

- **Assign the identified program in the SAP transaction definition**
- Remember to **assign all permissions on used tables**, from query to newly created custom transaction 
- Also remember that **queries must be transported** from development to production  

 

Do you have to secure a system? There are not only queries, but many other SAP security aspects to manage and deal with. 

 

Blog post originally translated from: [https://www.aglea.com/blog/sap-query-security](https://www.aglea.com/blog/sap-query-security)

 

 

 

 

 

 

 Topics: [sap consulenza security](https://www.aglea.com/en/blog/tag/sap-consulenza-security), [sap query](https://www.aglea.com/en/blog/tag/sap-query), [governance](https://www.aglea.com/en/blog/tag/governance), [tabelle](https://www.aglea.com/en/blog/tag/tabelle), [sicurezza dei dati sap](https://www.aglea.com/en/blog/tag/sicurezza-dei-dati-sap)

### Subscribe Here!

### Blog Aglea, cosa puoi trovare?

Ogni mercoledì pubblichiamo articoli, interviste e documenti relativi alla security SAP.

Cosa puoi trovare:

- Suggerimenti su come mettere in sicurezza i sistemi SAP
- Come fare a … (How To)
- Checklist
- Gli errori comuni che spesso vengono fatti in ambito Security SAP
- Interviste con esperti del settore
- Chi è AGLEA quale è la nostra vision security SAP

### Recent Posts

### Post By Topic

- [SAP Security (12)](https://www.aglea.com/en/blog/tag/sap-security)
- [SAP GRC (11)](https://www.aglea.com/en/blog/tag/sap-grc)
- [pfcg (8)](https://www.aglea.com/en/blog/tag/pfcg)
- [gdpr (7)](https://www.aglea.com/en/blog/tag/gdpr)
- [SAP GDPR (5)](https://www.aglea.com/en/blog/tag/sap-gdpr)
- [Segregation of duties (5)](https://www.aglea.com/en/blog/tag/segregation-of-duties)
- [governance (5)](https://www.aglea.com/en/blog/tag/governance)
- [sod (5)](https://www.aglea.com/en/blog/tag/sod)
- [SAP ECC (4)](https://www.aglea.com/en/blog/tag/sap-ecc)
- [audit sap (4)](https://www.aglea.com/en/blog/tag/audit-sap)
- [auditing (4)](https://www.aglea.com/en/blog/tag/auditing)
- [sap consulenza security (4)](https://www.aglea.com/en/blog/tag/sap-consulenza-security)
- [sap password (4)](https://www.aglea.com/en/blog/tag/sap-password)
- [HANA (3)](https://www.aglea.com/en/blog/tag/hana)
- [SAP HR (3)](https://www.aglea.com/en/blog/tag/sap-hr)
- [UI logging (3)](https://www.aglea.com/en/blog/tag/ui-logging)
- [rfc security (3)](https://www.aglea.com/en/blog/tag/rfc-security)
- [sap cyber security (3)](https://www.aglea.com/en/blog/tag/sap-cyber-security)
- [sap hana (3)](https://www.aglea.com/en/blog/tag/sap-hana)
- [sap_all (3)](https://www.aglea.com/en/blog/tag/sap_all)
- [security audit log (3)](https://www.aglea.com/en/blog/tag/security-audit-log)
- [sicurezza sap (3)](https://www.aglea.com/en/blog/tag/sicurezza-sap)
- [su53 (3)](https://www.aglea.com/en/blog/tag/su53)
- [HANA Security (2)](https://www.aglea.com/en/blog/tag/hana-security)
- [ISO (2)](https://www.aglea.com/en/blog/tag/iso)
- [Profiles (2)](https://www.aglea.com/en/blog/tag/profiles)
- [SAP FIORI Security (2)](https://www.aglea.com/en/blog/tag/sap-fiori-security)
- [SAP audit (2)](https://www.aglea.com/en/blog/tag/sap-audit)
- [Secure programming (2)](https://www.aglea.com/en/blog/tag/secure-programming)
- [UCON (2)](https://www.aglea.com/en/blog/tag/ucon)
- [UI Masking (2)](https://www.aglea.com/en/blog/tag/ui-masking)
- [access management (2)](https://www.aglea.com/en/blog/tag/access-management)
- [authorization concept (2)](https://www.aglea.com/en/blog/tag/authorization-concept)
- [autorizzazioni sap (2)](https://www.aglea.com/en/blog/tag/autorizzazioni-sap)
- [consulenti (2)](https://www.aglea.com/en/blog/tag/consulenti)
- [corso (2)](https://www.aglea.com/en/blog/tag/corso)
- [e-learning (2)](https://www.aglea.com/en/blog/tag/e-learning)
- [password policy (2)](https://www.aglea.com/en/blog/tag/password-policy)
- [patch (2)](https://www.aglea.com/en/blog/tag/patch)
- [programmazione sicura (2)](https://www.aglea.com/en/blog/tag/programmazione-sicura)
- [quality (2)](https://www.aglea.com/en/blog/tag/quality)
- [rfc (2)](https://www.aglea.com/en/blog/tag/rfc)
- [ruoli (2)](https://www.aglea.com/en/blog/tag/ruoli)
- [sap access control (2)](https://www.aglea.com/en/blog/tag/sap-access-control)
- [sap custom (2)](https://www.aglea.com/en/blog/tag/sap-custom)
- [sap etd (2)](https://www.aglea.com/en/blog/tag/sap-etd)
- [sap gui (2)](https://www.aglea.com/en/blog/tag/sap-gui)
- [sap query (2)](https://www.aglea.com/en/blog/tag/sap-query)
- [sap security guidelines (2)](https://www.aglea.com/en/blog/tag/sap-security-guidelines)
- [sap siem (2)](https://www.aglea.com/en/blog/tag/sap-siem)
- [sap standard role (2)](https://www.aglea.com/en/blog/tag/sap-standard-role)
- [sap super user (2)](https://www.aglea.com/en/blog/tag/sap-super-user)
- [sap vulnerability (2)](https://www.aglea.com/en/blog/tag/sap-vulnerability)
- [se16 (2)](https://www.aglea.com/en/blog/tag/se16)
- [security ams (2)](https://www.aglea.com/en/blog/tag/security-ams)
- [siem (2)](https://www.aglea.com/en/blog/tag/siem)
- [soar (2)](https://www.aglea.com/en/blog/tag/soar)
- [supporto sap ams (2)](https://www.aglea.com/en/blog/tag/supporto-sap-ams)
- [test system (2)](https://www.aglea.com/en/blog/tag/test-system)
- [threat detection (2)](https://www.aglea.com/en/blog/tag/threat-detection)
- [upgrade (2)](https://www.aglea.com/en/blog/tag/upgrade)
- [312 (1)](https://www.aglea.com/en/blog/tag/312)
- [ABAP (1)](https://www.aglea.com/en/blog/tag/abap)
- [AI (1)](https://www.aglea.com/en/blog/tag/ai)
- [CVA (1)](https://www.aglea.com/en/blog/tag/cva)
- [DPO (1)](https://www.aglea.com/en/blog/tag/dpo)
- [FIORI Security (1)](https://www.aglea.com/en/blog/tag/fiori-security)
- [HANA Roles (1)](https://www.aglea.com/en/blog/tag/hana-roles)
- [PFCG SAP transaction (1)](https://www.aglea.com/en/blog/tag/pfcg-sap-transaction)
- [SAP Cloud Security (1)](https://www.aglea.com/en/blog/tag/sap-cloud-security)
- [SAP Consulting (1)](https://www.aglea.com/en/blog/tag/sap-consulting)
- [SAP DLP (1)](https://www.aglea.com/en/blog/tag/sap-dlp)
- [SAP Fraud Management (1)](https://www.aglea.com/en/blog/tag/sap-fraud-management)
- [SAP IDM (1)](https://www.aglea.com/en/blog/tag/sap-idm)
- [SAP LOG (1)](https://www.aglea.com/en/blog/tag/sap-log)
- [SAP Security Documentation (1)](https://www.aglea.com/en/blog/tag/sap-security-documentation)
- [SAP Table (1)](https://www.aglea.com/en/blog/tag/sap-table)
- [SAP Transactions (1)](https://www.aglea.com/en/blog/tag/sap-transactions)
- [SPOOL (1)](https://www.aglea.com/en/blog/tag/spool)
- [Security Analyzer (1)](https://www.aglea.com/en/blog/tag/security-analyzer)
- [Statistiche security SAP (1)](https://www.aglea.com/en/blog/tag/statistiche-security-sap)
- [Trace autorizzazioni SAP (1)](https://www.aglea.com/en/blog/tag/trace-autorizzazioni-sap)
- [User Access Management (1)](https://www.aglea.com/en/blog/tag/user-access-management)
- [aglea (1)](https://www.aglea.com/en/blog/tag/aglea)
- [audit (1)](https://www.aglea.com/en/blog/tag/audit)
- [authorization model (1)](https://www.aglea.com/en/blog/tag/authorization-model)
- [biometric (1)](https://www.aglea.com/en/blog/tag/biometric)
- [chatGPT (1)](https://www.aglea.com/en/blog/tag/chatgpt)
- [codice sicuro SAP (1)](https://www.aglea.com/en/blog/tag/codice-sicuro-sap)
- [consulenti sap security (1)](https://www.aglea.com/en/blog/tag/consulenti-sap-security)
- [consulenza sap security (1)](https://www.aglea.com/en/blog/tag/consulenza-sap-security)
- [crittografia SAP (1)](https://www.aglea.com/en/blog/tag/crittografia-sap)
- [custom transactions (1)](https://www.aglea.com/en/blog/tag/custom-transactions)
- [cyber security (1)](https://www.aglea.com/en/blog/tag/cyber-security)
- [data loss prevention (1)](https://www.aglea.com/en/blog/tag/data-loss-prevention)
- [data privacy (1)](https://www.aglea.com/en/blog/tag/data-privacy)
- [documentazione sap security (1)](https://www.aglea.com/en/blog/tag/documentazione-sap-security)
- [emergency users (1)](https://www.aglea.com/en/blog/tag/emergency-users)
- [gxp (1)](https://www.aglea.com/en/blog/tag/gxp)
- [identity management system (1)](https://www.aglea.com/en/blog/tag/identity-management-system)
- [idm (1)](https://www.aglea.com/en/blog/tag/idm)
- [log sap (1)](https://www.aglea.com/en/blog/tag/log-sap)
- [mail security sap (1)](https://www.aglea.com/en/blog/tag/mail-security-sap)
- [microsoft (1)](https://www.aglea.com/en/blog/tag/microsoft)
- [parameter sap (1)](https://www.aglea.com/en/blog/tag/parameter-sap)
- [processi security (1)](https://www.aglea.com/en/blog/tag/processi-security)
- [profili (1)](https://www.aglea.com/en/blog/tag/profili)
- [profili sap (1)](https://www.aglea.com/en/blog/tag/profili-sap)
- [progetti security sap (1)](https://www.aglea.com/en/blog/tag/progetti-security-sap)
- [quotazione borsa (1)](https://www.aglea.com/en/blog/tag/quotazione-borsa)
- [rfc destination (1)](https://www.aglea.com/en/blog/tag/rfc-destination)
- [role translation (1)](https://www.aglea.com/en/blog/tag/role-translation)
- [s_tabu_dis (1)](https://www.aglea.com/en/blog/tag/s_tabu_dis)
- [s_tabu_nam (1)](https://www.aglea.com/en/blog/tag/s_tabu_nam)
- [s_tabu_rfc (1)](https://www.aglea.com/en/blog/tag/s_tabu_rfc)
- [sap FIORI (1)](https://www.aglea.com/en/blog/tag/sap-fiori)
- [sap btp (1)](https://www.aglea.com/en/blog/tag/sap-btp)
- [sap data masking (1)](https://www.aglea.com/en/blog/tag/sap-data-masking)
- [sap dati personali (1)](https://www.aglea.com/en/blog/tag/sap-dati-personali)
- [sap developer (1)](https://www.aglea.com/en/blog/tag/sap-developer)
- [sap earlywatch (1)](https://www.aglea.com/en/blog/tag/sap-earlywatch)
- [sap grc 12 (1)](https://www.aglea.com/en/blog/tag/sap-grc-12)
- [sap grc tables (1)](https://www.aglea.com/en/blog/tag/sap-grc-tables)
- [sap gui history (1)](https://www.aglea.com/en/blog/tag/sap-gui-history)
- [sap gui security (1)](https://www.aglea.com/en/blog/tag/sap-gui-security)
- [sap gxp compliance (1)](https://www.aglea.com/en/blog/tag/sap-gxp-compliance)
- [sap ilm gdpr (1)](https://www.aglea.com/en/blog/tag/sap-ilm-gdpr)
- [sap license auditing (1)](https://www.aglea.com/en/blog/tag/sap-license-auditing)
- [sap logon (1)](https://www.aglea.com/en/blog/tag/sap-logon)
- [sap patch (1)](https://www.aglea.com/en/blog/tag/sap-patch)
- [sap security blog (1)](https://www.aglea.com/en/blog/tag/sap-security-blog)
- [sap security teal (1)](https://www.aglea.com/en/blog/tag/sap-security-teal)
- [sap sos (1)](https://www.aglea.com/en/blog/tag/sap-sos)
- [sap splunk (1)](https://www.aglea.com/en/blog/tag/sap-splunk)
- [sap sso (1)](https://www.aglea.com/en/blog/tag/sap-sso)
- [sap tabelle custom (1)](https://www.aglea.com/en/blog/tag/sap-tabelle-custom)
- [sap tdms (1)](https://www.aglea.com/en/blog/tag/sap-tdms)
- [sap_all_only_view (1)](https://www.aglea.com/en/blog/tag/sap_all_only_view)
- [se16n (1)](https://www.aglea.com/en/blog/tag/se16n)
- [secpol (1)](https://www.aglea.com/en/blog/tag/secpol)
- [secure coding sap (1)](https://www.aglea.com/en/blog/tag/secure-coding-sap)
- [secure operation map (1)](https://www.aglea.com/en/blog/tag/secure-operation-map)
- [security awareness (1)](https://www.aglea.com/en/blog/tag/security-awareness)
- [security bridge (1)](https://www.aglea.com/en/blog/tag/security-bridge)
- [sentinel (1)](https://www.aglea.com/en/blog/tag/sentinel)
- [sicurezza codice ABAP (1)](https://www.aglea.com/en/blog/tag/sicurezza-codice-abap)
- [sicurezza dei dati sap (1)](https://www.aglea.com/en/blog/tag/sicurezza-dei-dati-sap)
- [slaw (1)](https://www.aglea.com/en/blog/tag/slaw)
- [social engineering (1)](https://www.aglea.com/en/blog/tag/social-engineering)
- [sost (1)](https://www.aglea.com/en/blog/tag/sost)
- [sql (1)](https://www.aglea.com/en/blog/tag/sql)
- [su25 (1)](https://www.aglea.com/en/blog/tag/su25)
- [super utenti sap (1)](https://www.aglea.com/en/blog/tag/super-utenti-sap)
- [system users (1)](https://www.aglea.com/en/blog/tag/system-users)
- [tabelle (1)](https://www.aglea.com/en/blog/tag/tabelle)
- [tabelle SAP grc access control (1)](https://www.aglea.com/en/blog/tag/tabelle-sap-grc-access-control)
- [ticket management system (1)](https://www.aglea.com/en/blog/tag/ticket-management-system)
- [training (1)](https://www.aglea.com/en/blog/tag/training)
- [transazioni sap (1)](https://www.aglea.com/en/blog/tag/transazioni-sap)
- [userid (1)](https://www.aglea.com/en/blog/tag/userid)
- [usmm (1)](https://www.aglea.com/en/blog/tag/usmm)
- [ust04 (1)](https://www.aglea.com/en/blog/tag/ust04)
- [zero trust security (1)](https://www.aglea.com/en/blog/tag/zero-trust-security)

[See all](https://www.aglea.com/en/blog/sap-query-security-0#)

## [SAP Security Blog AGLEA RSS Feed](https://www.aglea.com/blog/rss.xml)

Aglea s.r.l. P. IVA: IT 03868780960 - 2026  | Copy | [Note legali](https://cdn2.hubspot.net/hubfs/4422290/Aglea_November2018%20Theme/Pdfs/Privacy-policy-AGLEA.pdf)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Marta Ortona",
    "url" : "https://www.aglea.com/en/blog/author/marta-ortona"
  },
  "dateModified" : "2024-06-14T10:12:54.412Z",
  "datePublished" : "2022-08-11T22:00:00.000Z",
  "headline" : "SAP Query Security",
  "image" : [ "https://www.aglea.com/hubfs/Aglea/Imported_Blog_Media/SAP%20QUERY%20SECURITY-Jun-14-2024-10-10-04-6153-AM.jpg" ],
  "mainEntityOfPage" : {
    "@id" : "https://www.aglea.com/en/blog/sap-query-security-0",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject"
    },
    "name" : "Horsa S.p.A."
  }
}
```