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: 

How to create a tcode using sap query

Former Member
0 Kudos

Hi

I have created a query using SQ01. It is working fine. But I want to create a transaction code for that. How can we achieve this?

Regards.

Hari

1 ACCEPTED SOLUTION

former_member188827
Active Contributor
0 Kudos

after activating da query execute it, go to system...>status.

copy program name,

den go to se93.

give ur tcode and click create

click on second radio button(program and selection screen),

and paste the program name copied earlier...

activate the tcode..

4 REPLIES 4

Former Member
0 Kudos

Hi,

Go to se93 and select the create button.

You will then be asked to writed down the tcode of your choice then create a short text for that tcode.

Select the 2nd option button w/c is the "Program and Selection Screen (report transaction)." Press enter.

Then key in the program name and the variant you saved in the program.

When transporting to Prod, Save the variant there as well.

If you placed "DEFAULT" in the creation of tcode, you should also save "DEFAULT" variant in production

Thanks,

Reward If Helpful.

Former Member
0 Kudos

Execute the query, the enter the code /nse38. This will show you the program that the query has generated. You will need to copy this to a Z program and assign a transaction.

That is the only way I know.

Former Member

GO TO SE93....

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.

former_member188827
Active Contributor
0 Kudos

after activating da query execute it, go to system...>status.

copy program name,

den go to se93.

give ur tcode and click create

click on second radio button(program and selection screen),

and paste the program name copied earlier...

activate the tcode..