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: 

Clarification on variant

Former Member
0 Kudos

Hi all,,,

I shall explain the scenario. Please let me know how to proceed on this.

The user has given this scenario:

when creating the variant, this will set up as a selection variable and the value will be pulled from z_sysdt entry found in TVARV table.

This explanation was given for a field date.

explain me on this..

should i need to manually add code for this.. or would it be settings on variant..

pls explain.

thanks in advance..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

1. Which version of SAP you are on ?

TVARV table are changed to TVARVC from ECC5.

TVARV will still exist but should not be used from ecc5.

2. z_sysdt already available in tvarv ?

Normal functionality is :

a. Make an entry in TVARV table.

b. in any report when you go to save varient button,

you have option of "maintain Sel.variable" which takes you to TVARV table to select already created fields.

c. When you call this program in batch job using that saved varient, it will dynamically pick up value of z_sysdt from TVARV & execute that report.

d. So whenever you run that program in batch job, you have a predefined value to pass.

e. Normally all companies Run one Batch program everyday, before running any other batch job. That program updates all TVARV records as per logic written in it.

2 REPLIES 2

Former Member
0 Kudos

1. Which version of SAP you are on ?

TVARV table are changed to TVARVC from ECC5.

TVARV will still exist but should not be used from ecc5.

2. z_sysdt already available in tvarv ?

Normal functionality is :

a. Make an entry in TVARV table.

b. in any report when you go to save varient button,

you have option of "maintain Sel.variable" which takes you to TVARV table to select already created fields.

c. When you call this program in batch job using that saved varient, it will dynamically pick up value of z_sysdt from TVARV & execute that report.

d. So whenever you run that program in batch job, you have a predefined value to pass.

e. Normally all companies Run one Batch program everyday, before running any other batch job. That program updates all TVARV records as per logic written in it.

0 Kudos

Hi ,

If you do not have the authorization for TVARVC table. then follow as below.

after executing your report, try to save the Variant ( just press save button for the selection screen values , then it will take you to give the name for the variant ).

in the same screen , you will get the options like protect field , hide field.... and selection variable .

select selection variable and press F4 it will ask you to select either 'T' or 'D' .

Select 'T' i.e. Table maintained values.

now If you try to save this variant then it will ask you to maintain 'Variable name '.

now go to 'Environment -> Main.Sel.Variables.

here you try to give the name for the variable eg., 'ZTEST' and give the value 'may be the date value/what ever the value you planned for selection screen. Parameter'.

save it and go back to the previous screen , here you assign the 'ZTEST' to the variant option 'Name of Variable (input only using F4 option ). ( which is next to ‘Selection Variable column )

that means , you have selected the option 'T' for selection variable

and assigned a name (i.e. Selection variable name ) for your selection screen parameter.

so when you run your program and if you select the variant name then it will prompt with the value maintained.

For next time , if you change the value in TVARVC table then it will pick that value for selection screen parameter.

Hope it is clear for you.

Kind Regards,

Ravi Sankar.Z