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: 

can i create tcode with variant for sap query

Former Member
0 Kudos

Hi ,

I want to create a Tcode for SAP query with default variant in development,but the query is available in production but not in developement. i am able to create tocde for query, but not with variant.

Please help me...

thanks,

srinivas

3 REPLIES 3

former_member182010
Active Participant
0 Kudos

Hello Srinivas,

1. First you need to get the report program name for query. Assuming you already created the variant for the query, use t-code SQ01 and select pushbutton With variant. On the selection screen for the query, go to menu System->Status. You will see report program name for query in field labeled "Program*. Copy the value in this field

2. Call t-code SE93 from new window.

a. On popup window labeled Create Transaction, select radiobutton Program and selection screen (report transaction).

b. On Create Report Transaction screen, enter report program name for query in field labeled Program (Paste the value you found in step 1). Enter variant name in field labeled Start with variant. Save your new t-code.

3. Transport t-code to production.

Kind Regards,

Rae Ellen Woytowiez

0 Kudos

@Rae Ellen: That is NOT the correct way to create a query transaction...

@Srinivas: Why don't you create the variant in your DEV system or at least a dummy variant with the same name?

0 Kudos

Hello,

After further research on assigning a t-code to a SAP query, I found the links below to explain why the method I explained above should NOT be used.

@Brad: Thank you for alerting me to better programming practices.

Kind Regards,

Rae Ellen Woytowiez

Link: [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=393160]

Link: [http://www.plinky.it/blog/2009/08/28/associate-sap-query-to-a-transaction-code/#axzz1M4COQLaq]

Edited by: Rae Ellen Woytowiez on May 11, 2011 8:23 PM