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: 

standard variant of SAP query is loaded automatically

former_member699400
Active Participant
0 Kudos

Hi!

I have created SAP query and standard variant via SQ01.

When I run my query (via transaction) values of variant are loaded automatically in a selection screen and in my case I need empty selection screen at the beginning and values should appear in a selection screen only after choosing a variant, but not before this.

Probably it is something about attributes of variant? Any ideas?

<b><REMOVED BY MODERATOR></b>

Mindaugas.

Message was edited by:

Alvaro Tejada Galindo

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

What type of custom transaction code did you create?

Was Dialog Transaction or Report Transaction?

For your purpose, you can create with dialog transaction with specifying program name and screen number. If you want to execute with specific variant then choose report transaction.

Regards,

Ferry Lianto

10 REPLIES 10

Former Member
0 Kudos

in SQ01 while you go with test the query...or just execut the query with out variant it will ask for the variant don't give the variant name there ... it will execute the query with blank values

0 Kudos

yes, but let's say I am executing my query not in SQ01 but via custom tcode and I'm not asked for variant, it still fills selection screen....

Mindaugas

ferry_lianto
Active Contributor
0 Kudos

Hi,

Did you create custom transaction (report transaction) in SE93 with specifying start with variant option?

Regards,

Ferry Lianto

0 Kudos

I have created report transaction in SE93 that calls a report ZSAP_QUERY_CALL_Q1 and this report calls my query.

By the way, report ZSAP_QUERY_CALL_Q1 is modifyed copy of SAP_QUERY_CALL.

Mindaugas

0 Kudos

here is main part of this program:

<i>DATA:

p_ugroup type bgname VALUE 'PC', " query group

p_query type quname VALUE 'Q1', " query name

p_vari type vari VALUE ''. " variant</i>

so I do not pass variant here...

Mindaugas

0 Kudos

Just like for any normal ABAP report, you will find this info in the TRDIR table. The field SSET will be 'X' if the Query needs to be started with a Variant, where NAME = "Query name.

may be helpful for you..........

0 Kudos

strange, but SSET is empty....

I guess in this case probably query has some settings that it is to be started with variant.

Mindaugas

0 Kudos

check this link may be further helpful for you....

0 Kudos

ferry_lianto
Active Contributor
0 Kudos

Hi,

What type of custom transaction code did you create?

Was Dialog Transaction or Report Transaction?

For your purpose, you can create with dialog transaction with specifying program name and screen number. If you want to execute with specific variant then choose report transaction.

Regards,

Ferry Lianto