In an SAP-Query/InfoSet environment the “code” you are talking about is nothing more than an automatically generated ABAP report whose name starts with “AQ…”.
Whether a user can open (display) or even change that code is defined by the classic ABAP-Workbench authorisation objects – not by the SAP-Query authorisations themselves.
───────────────────────────────────────────────
- Transaction path to the code
───────────────────────────────────────────────
• SQ02 → choose the InfoSet → Extras (or Env.) → Generated Program → Display / Change
…or…
• SE38 / SE80 → enter the generated program name (AQ)
───────────────────────────────────────────────
2. Required authorisations
───────────────────────────────────────────────
A. SAP-Query specific (to be able to reach the Extras-menu in SQ02)
Authorisation object S_QUERY
• ACTVT – 03 = Display, 23 = Maintain
• OBJTYPE – ‘INFOS’ (InfoSet)
• OBJECT – * or concrete InfoSet name
→ This lets you maintain the InfoSet – but still NOT the ABAP source!
B. ABAP Workbench specific (to display or edit the generated program)
-
S_DEVELOP (current releases) ‑ or ‑ S_PROGRAM (very old releases)
Fields to fill:
• OBJTYPE = ‘PROG’ (Program)
• OBJNAME = ‘AQ*’ (or the exact name)
• ACTVT = 03 Display / 02 Change
-
Optional, but often present in developer roles
• S_ADMI_FCD value ‘SEED’ (ABAP Editor)
• P_ABAP (HR systems) if the InfoSet uses LDB PNP/PNPCE and the report will be executed in HR.
C. Delivered SAP roles that already contain the above
• SAP_ALL / SAP_NEW (obviously)
• SAP_QUERY_DEVELOPER (in many systems)
• Any custom PFCG role where the security team added S_DEVELOP for AQ* programs.
───────────────────────────────────────────────
3. Quick checklist
───────────────────────────────────────────────
✅ You can reach SQ02? → you have S_QUERY.
✅ “Environment → Generated program” is greyed out? → missing S_QUERY‐ACTVT 23.
✅ You press it but get “No authorisation to display program”? → missing S_DEVELOP (or S_PROGRAM).
✅ You can display but not edit? → S_DEVELOP present with ACTVT 03 only.
✅ You want to edit? → S_DEVELOP with ACTVT 02 as well (and a valid developer key in non-mod systems).
───────────────────────────────────────────────
4. Important warning
───────────────────────────────────────────────
NEVER modify the generated code directly.
Any change you make in SQ02 will re-generate the program and overwrite manual changes.
Use the InfoSet maintenance screens (field selection, coding include, record selection, etc.) instead.
That’s all – if your user ID gets S_DEVELOP (OBJTYPE = PROG, OBJNAME = AQ*, ACTVT 03/02) you can open the ABAP source behind every InfoSet in the system.