SAP Query Security

Posted by Marta Ortona on Aug 12, 2022 8:15:00 AM
Marta Ortona

 

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

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:

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

 

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

 

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

 

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.

 

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: 
    1. Yes, it seems expensive. But actually, it isn't in terms of management and governance as it allows you to:
  • 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 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
  • 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

 

  • 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

 

  • 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

Iscriviti al blog se ancora non lo hai fatto!

 

 

 

 

 

 

Topics: governance, tabelle, sicurezza dei dati sap, sap consulenza security, sap query

Yes Subscribe!

Blog Aglea, what you could find out?

Every Friday a new post, interview or content related to SAP Security.

  • Tips on how to design SAP Security
  • How to
  • Checklist
  • Common error and pitfall on security SAP
  • Interview with experts
  • Who we are and Aglea vision on SAP Security

Recent Posts

Post By Topic

See all