Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Assign SAP Query to a transaction

Former Member
0 Kudos

Hi ,

How do I assigne a SAP Query to a transaction ?

Please advise.

Thanks very much.

1 ACCEPTED SOLUTION

Former Member

No need to use small report

No need to use generated program name (it really can change)

Just create a parameter transaction with reference to START_REPORT transaction. When creating a parameter transaction you have to set the following parameters:

D_SREPOVARI-REPORTTYPE = AQ

D_SREPOVARI-REPORT = precisely the first 12 characters - query user group (including trailing spaces), 13-th character is G for global queries

D_SREPOVARI-EXTDREPORT = Query name as shown in SQ01.

That's it.

Well, and do not forget to check the flag "Skip first screen".

To all others interested: just try to add some SAP query into a role via PFCG, then run it, and then via System -> Status look into the definition of the transaction generated, and you'll see the answer.

9 REPLIES 9

Former Member

No need to use small report

No need to use generated program name (it really can change)

Just create a parameter transaction with reference to START_REPORT transaction. When creating a parameter transaction you have to set the following parameters:

D_SREPOVARI-REPORTTYPE = AQ

D_SREPOVARI-REPORT = precisely the first 12 characters - query user group (including trailing spaces), 13-th character is G for global queries

D_SREPOVARI-EXTDREPORT = Query name as shown in SQ01.

That's it.

Well, and do not forget to check the flag "Skip first screen".

To all others interested: just try to add some SAP query into a role via PFCG, then run it, and then via System -> Status look into the definition of the transaction generated, and you'll see the answer.

0 Kudos

Excellent Kisan thanks.

0 Kudos

I defined a t-code below. But I met message 'User group ZATH_3 has not yet been saved'. Please let me know your suggestion or solution. Thank you.

T-code:zath_4,

package, $tmp

Transaction: start_report

skip initial screen is checked.

D_SREPOVARI-REPORTTYPE: AQ

D_SREPOVARI-EXTDREPORT: ZATH_1

D_SREPOVARI-REPORT: ZATH_3

0 Kudos

The root cause is I missed G at the end of the user group as the user group is one global area. So the system gave such message. while I add the G, it is OK. This issue is solved. Thank you.

Former Member
0 Kudos

Hai Sandeep

SET PARAMETER ID 'BES' FIELD IT_EKKO-EBELN.

CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.

Thanks & regards

Sreenivasulu P

former_member188685
Active Contributor
0 Kudos

Hi,

first generate the program for your Query, then Use the Program name and create the tranaction code from SE93

Regards

vijay

sbhutani1
Contributor
0 Kudos

Hi Sandip,

Just follow these simle steps:

1. Create a transaction with Parameters.

2. Define Transaction START_REPORT

Select “Skip initial Screen”

3. Select all options for GUI Support.

4. Define the following three fields:

Screen Field Value

D_SREPOVARI-REPORTTYPE AQ

D_SREPOVARI-REPORT User Group

D_SREPOVARI-EXTDREPORT Query Name

That's it

Regards

Sumit Bhutani

Ps Reward points if helpful

0 Kudos

D_SREPOVARI-REPORT must have letter 'G' on the 13 position.

i.e. your group name is "MY_GROUP" then

MY_GROUP(4 spaces)G

i.e. your group name is "MY_GROUPLONG" then

MY_GROUPLONGG

Regards