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: 

Z Report need to start with specific variant

former_member293658
Participant
0 Kudos

Hi,

We have created a Z copy of report RFFOEDi1. Then assigned that program to a Z transaction in SE93. We want to be able to start the report (via the Z transaction) with a specific variant so that certain selection fields from the initial screen do not show out when executed. I cannot remove these from the selection screen of the Z program as they are populating from a logical database.

In SE93 I am using option Report Transaction. That option gives me the field 'Start With Variant'. I have created variants on the Z program using the normal SAVE varint option (ie run the Z program in SE38, click the SAVE button, in the popup tick the HIDE option to remove those fields that I don't want shwoing out, SAVE the variant).

However in SE93 those variants are not available as dropdown in the 'Start With variant' field.

Can you please advise if there is a way to pick up the variant of the Z program I have specified in SE38 so that it is the default variant selected when I run the Z transaction assigned to the report?

Thanks for your advice.

Mike

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

"I cannot remove these from the selection screen of the Z program as they are populating from a logical database." incorrect

you can hide screen fields coming from a standard logical database.

just use screen-active = 0.

10 REPLIES 10

Former Member
0 Kudos

Hi,

"I cannot remove these from the selection screen of the Z program as they are populating from a logical database." incorrect

you can hide screen fields coming from a standard logical database.

just use screen-active = 0.

0 Kudos

Hi SAP_Wiz,

Can you advise some more please on this screen active = 0 option? When I look though the code of the Z program there is nowhere that these specific screen fields are mentioned. I only want to blank certain fields coming from the logical DB (ie the 'Proposal Run Only' field, the 'Paying Company Code' and the 'Sending Company Code' fields. You will see these if you run the normal RFFOEDI1 program).

Where is the Z program code do I need to place the Screen Active = 0 command in order to blank/hide these specific fields please?

I don't want to alter the standard logical DB in any way.

Thanks

Michael

0 Kudos

hi,

you need to check the screen field name and then set it inviible.

eg:

loop at screen.
if screen-name = 'XXXXX".

screen-invisible = '1'.
screen-active = '0'.
endif.
modify screen.
endloop.

this would hide those fields.

0 Kudos

Hi sap_wiz,

I tried this code to blank out the 'Proposal Run Only' screen field. But it didn't seem to work. Do I need to place this code in a specific point of the program code? For example after an AT SELECTION SCREEN command?

LOOP AT SCREEN.

IF screen = '1000'.

IF screen-name = ZW_XVORL.

screen-invisible = '1'.

screen-active = '0'.

endif.

modify screen.

endif.

ENDLOOP.

Thanks again.

0 Kudos

Hi,

thats right.Use "At Selection screen output".

Best regards,

Burak

0 Kudos

Hi Burak and sap_wiz,

Thank you very much, this works well! I have assigned you both points, hopefully you can see and get those (sometimes I have trouble assigning points, it does not seem to take for some reason?)

Thanks once again.

Michael

0 Kudos

Hello SAP_WIZ, we are running report rffoedi1 and want to run the variant so it will print to archive(storage). We've set the variant up to archive only but everytime we run it, it defaults to print only. How can I get this to work do you know? I would really appreciate your expertise if you have some time? Please.

Thanks

Patricia

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Create other z-report (I call it zb-report) and call your first z-report (copied from RFFO*) with a SUBMIT. Do a selection screen with the fields that you want and with the behavior that you want (rule it in INITIALIZATION, AT SELECTION SCREEN and so on). It's an idea that I hope it helps you.

Regards

Eduardo

Former Member
0 Kudos

Michael,

For your program, just create a variant say V1 and hide the desired fields in it.

Using SE93, create a tcode T1 with option 'Program and selection screen' and mention the program name and variant V1 in it.

Now, this tcode T1 will show only the relevant fields everytime which you had designed in V1.

Let me know if I have misunderstood your problem.

Regards,

Diwakar

0 Kudos

Hi Diwakar,

Thanks for the response. Yes you have understood the issue correctly.

I have actually tried exactly what you said: in SE38 for the Z program, click SAVE, in the popup click HIDE on the relevant fields, then SAVE thevariant.

Then goto SE93, choose option 2 (Not option 1, Option 1 Program and Screen (dialog transaction) ) only allows me specify a program and screen but has no Start with Variant option).. In option 2, I input my Z program name. But when I do a dropdown in the START WITH VARIANT field it says that 'There are no variants for screen 1000'. Screen 1000 is auto-populated in the 'Selection Screen' field visible in this Option 2; if I blank that and then try do a dropdown again in the START WITH VARIANT field I still don't find any variants.

That is the issue I have, I am not able to find/select any variants I created for teh Z program in SE38.

can you advise why this is the case please? Is there some attribute setting etc I need to maintain on the Z program?

Thanks for your help.

Michael