Associate SAP Query to a Transaction Code
So many times I saw Transaction Code for SAP Query defined in a strange way; many ABAP developers uses to create a TCode for SAP Query as they do for common reports.
This is dangerous because the report is auto-generated and sometimes this report changes (especially after a system upgrade) or it does not contains new implementations (you have to force regeneration).
The right way to create a Transaction Code is to refers directly to the SAP Query (AQQU object type).
From transaction SE93 create a new Object as shown in the image below

in the next screen complete the fields
Transaction START_REPORT
Skip initial screen X
Box “Classification” (as you want)
Box “Default value” add the following parameters:
| D_SREPOVARI-REPORTTYPE | AQ |
| D_SREPOVARI-EXTDREPORT | <sap query name in SQ01> |
| D_SREPOVARI-REPORT | <user groups belonging to the query> |
If user group is in global area you ave to add “<space>G”.
For example if you want to use the query ZQUERY in global user group area ZUSERGR you have to set:
| D_SREPOVARI-REPORTTYPE | AQ |
| D_SREPOVARI-EXTDREPORT | ZQUERY |
| D_SREPOVARI-REPORT | ZUSERGR G |
Further informations on SAP Query could be found on OSS note “393160 – SAP Query Using queries.pdf”.












Hi,
I have tried your solution but it doesn’t work. The problem is that D_SREPOVARI-REPORT should be: first 12 chars name of the user group and than the “G” flag; more exactly:
“ZUSERGR G” -> total of 13 chars
BR,
This is not a solution, it is the standard behavior. Btw I don’t understand your comment
ZUSERGR -> 7 chars
space -> 1 char
G -> 1 char
Total 9 chars
Indeed in table SREPOVARI (ECC)
Field Data element
REPORT PROGNAME CHAR 40 0 ABAP Program Name
Regards,
Ivan
Hi,
I’m trying associate a transaction to a view.
I have build a view, ZMATPRICE, with se11, the view includes camps of MARA, MAKT and MBEW, and i want call him from a transaction.
What transaction can i use?
Hi,
you have to create your own Custom transaction code from SE93 calling a table maintenance. and SHOW ‘X’
1 – Create a new Transaction with parameters
2 – Associate transaction SM30 with skip initial screen
3 – add the following parameters: VIEWNAME
Regards
Ivan
Hi,
thanks.
,regards
J