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: 

ABAP Query Execution via Custom Transaction Code - Not working

Former Member
0 Kudos

We have created an ABAP Query in our DEV client and we then created a transaction code to run that query. We have done this because the customer does not want anyone to have access to SQ01, SQ02 in production. This works great in DEV but we can not get it to work in production.

The ABAP Query was exported to our Prod client successfully. I say exported because you do not do direct transports with queries.

We then transported the new transaction code to run the query to production and it was successful.

However, when we run the transaction is production we get a sys dump stating it can not find the query.

We believe the problem is the TRDIR table is missing an entry for the program in production (it has an entry in DEV).

I would have thought that the export on the query would have brought in this entry -but obviously not.

Any suggestions on how we can get this entry into the production client? Did we miss a step on the export that would do this? We want to only bring over this entry - not the entire TRDIR table for obvious reasons (size (1.5 million entries, programs not ready for production, etc.).

Please help!

Thanks.

Scott

1 ACCEPTED SOLUTION

Former Member
0 Kudos

While creating the custom transaction code, what program name did you assign?

For ABAP Query, system create the program name. Usually it starts with AQZ***.

Please go to SE38, give <Query name> in the program name and check the search list. You will see one program name , which is created by SAP. This you need to assign to the Custom transaction code.

ashish

6 REPLIES 6

Former Member
0 Kudos

While creating the custom transaction code, what program name did you assign?

For ABAP Query, system create the program name. Usually it starts with AQZ***.

Please go to SE38, give <Query name> in the program name and check the search list. You will see one program name , which is created by SAP. This you need to assign to the Custom transaction code.

ashish

JozsefSzikszai
Active Contributor
0 Kudos

hi Scott,

if you used the generated program name in the transaction code, that could be the problem, because the generated program name contains the client number as well. If these differ between DEV and PROD, than it is easy to understand why does not work...

ec

Former Member
0 Kudos

Hi Scott,

Apart from other suggestions check if

1) Have you created the Query using SQ01 or SQVI ??..

2) the query name exists in ' AQLQCAT ' table by giving your query name...

Does the generated program has the name ' Q20SYSTQV00***Z***************== '

or AQ20**********Z**********== ' ??

Regards,

Vivek

0 Kudos

hi Vivek,

Whats the difference between program starting with

name ' Q20SYSTQV00***Z**************== ' or AQ20*********Z**********== ' ??

could you please explain.

regards

Ambichan

Former Member
0 Kudos

Answer is all within the transaction creation. You create the trans with a parm and then use the transaction 'Start_program' and fill the parms (under values) with the correct values to execute a ABAP query using a variant.

Former Member
0 Kudos

Hi,

The above solution will work if you assign the transaction in one server, If you want this will not work in quality/production boxes when transported the query..the program name will not be the same in all the servers...

For this. Do the below:

In SE93, Create a Paramter Transaction

-> Transaction = Start_report

-> In default values, give the below details:

     D_SREPOVARI-REPORTTYPE = AQ

     D_SREPOVARI-EXTDREPORT = Name of the Query

     D_SREPOVARI-REPORT = User Group

Save the transaction..Now if the program is generated with different names in the quality/proudction, this will still work..

Regards

Vijay Hebbal