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: 

Variant assignment to Tcode of Report

Former Member
0 Kudos

Hi All,

Please go through my whole query. It's bit confusing but I tried to explain in detail what is my requirement and what all I did.

My requirement is, to execute a particular REPORT directly using Variant (Execute with Variant option of SE38-> SHIFT + F6).

I created a Variant for Report. Same Variant I assigned to the TCODE which I am using to execute the Report.

But while executing a Tcode I was encountering an error "Transaction cannot be tested due to inconsistencies".

So, I tried using the System Variant (using prefix CUS&) and it worked. But after transporting the TR to Quality server, I am getting error "Variant not found". Please help me.

P.S.: This is not a simple report which I am executing. As per requirement, I created one SAP Query using SQ01. And the code generated out of it is pasted in the above mentioned report.

16 REPLIES 16

lijisusan_mathews
Active Contributor

Did u transport the variant separately ?

0 Kudos

Thanks Suzie for your concern.

No I didn't transport the variant separately. While creating the variant I didn't get any option of saving it in TR.

Also I read somewhere that if I create System Variant(CUS&___) it gets automatically transported with the program.

Can you please tell, what should me my approach now?

0 Kudos

i had encountered the same situation. In that case, I created a new normal variant, inserted it into a request and transported the same. Initially it had an issue with transporting due to some language Key, but it got resolved and the variant was transported and available in production.

0 Kudos

How to assign a variant to the TR?

Where does variant get saved, once it's created?

0 Kudos

I believe you are saving your variant from SE38. Now take SE38, enter your program name, select the Variant radio button and click change. you will be taken to the variant create and change screen. Now if you haven't created your variant, create it otherwise if you already have it, just display it and check, then come to the variant main screen. Now go to Utilities and there will be an option 'Transport Request'. Click it, and you will be taken to the relevant screen. Follow any instructions that come, and you will be prompted to enter the Request. Now transport this request and try,.

0 Kudos

For transporting a variant, either execute the program RSTRANSP OR use the path as suggested by Suzie.

0 Kudos

Thanks guys for your help.

The path Suzie suggested is fine and works with simple variant.

But I am working with System Variant. I think we need to handle system variant in different way.

Because even though I am creating the system variant for program, it is not being listed in the variant list of my program (after clicking on Utilities-> Transport Request). And so unable to assign it to the TR. So, can you please let me know how to handle that?

0 Kudos

Thanks guys for your help.

The path Suzie suggested is fine and works with simple variant.

But I am working with System Variant. I think we need to handle system variant in different way.

Because even though I am creating the system variant for program, it is not being listed in the variant list of my program (after clicking on Utilities-> Transport Request). And so unable to assign it to the TR. So, can you please let me know how to handle that?

0 Kudos

System variant will not be listed there.. It is supposed to go with the program automatically.. Since it was not working in your case, i recommended you try the other one. In your production, does the variant exist?

0 Kudos

Hi Suzei,

If I don't use System Variant, I am unable to execute Tcode. So, its mandatory for me to use System Variant, because that is the only solution I have to execute the transaction. And yes System Variant is expected to get transported automatically with program. But in spite of that I am getting error in Quality server.

So, I cant use simple variant. And if I use System Variant, I have no solution to add it to the TR. What to do in this case?

0 Kudos

hey justfun did you try what i have said.

go to tcode shd0 and enter the required tcode and save your required variant and activate it.(here you can assign it to tr also)

next transport the request number to another server and open tcode shd0 in that server (say quality) then enter the variant name and you need to activate it again in the quality server and your variant wil work.

like wise repeat it for production and activate the variant.

hope your purpose wil be solved.

0 Kudos

After you create your variant. Goto Se93 for that Tcode, and fill the field Start with Variant with your variant name. If even that is not working, try achieving your goal creating a transaction variant ( as mentioned by koolspy) .

Then you can create a variant transaction. This should solve your problem.

0 Kudos

Thanks guys for your replies.

@Suzie: I didn't try your last solution.

@Koolspy: I couldn't try your solution because I didn't had authorizations for another server.

Somehow I managed to solve my query. Here is what I did,

1) I opened the System Variant in Change mode.

2) Tried saving it.

3) Got option of providing the TR number, which was the only catch.

4) Moved the TR in Quality.

5) Now its available to run the program in Quality.

But new problem encountered

My all Selection texts and Message texts are not getting displayed in Quality.

Because I created a SAP Query and pasted the generated code into new Z Program, there is no specific message class available. So I can't move it. Am I supposed to handle the texts in different manner?

0 Kudos

All the issues have been solved now. Thanks a lot for your guidance Guys.

koolspy_ultimate
Active Contributor
0 Kudos

hi justfun please try to use the following method

go to tcode shd0 and enter the required tcode and save your required variant and activate it.(here you can assign it to tr also)

next transport the request number to another server and open tcode shd0 in that server (say quality) then enter the variant name and you need to activate it again in the quality server and your variant wil work.

like wise repeat it for production and activate the variant.

hope your purpose is solved.

Former Member
0 Kudos

As the query raised is bit confusing, I can't summarize the answer because scenario here is bit confusing. Please go through the whole question asked at first and you can find the solution in the posts below.