Application Development and Automation 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: 
Read only

Variant Values during Run Time

Former Member
0 Likes
5,052

Hi

I am running a report as background job with a variant "VarOne" which has the following values

1. Duration Interval - value - 60

2. Program ID. - value - 00123

3. Current Date ( Value not saved while creating variant)

4. Current Time ( Value not saved while creating variant)

While the report is scheduled as background job with a particular variant value.. Is there a table that stores all the VarOne variant values....I want to know the values of 3 and 4. I know that looking at the job scheduling time I can get approximate values..But I need to know a place( like a table) where these variant values are stored.

I have checked the following tables but didnt find the runtime values

VARID

VARIT

TRVAR

TRVARVC

TRVARV

VARICONCI

VARICON

Hope My question is clear

Thank you

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,522

Hi,

All the system variants start with 'SAP&' or 'CUS&' and it is stored in client '000'

You can access to these through function modules of group SVAR Variant maintenance (most of them begin with RS_VARIANT_)

Look also at Creating Variants (SAP documentation) or search Sdn for SVAR

System variants (CUS&, SAP&) are not editable when Client has status 'not modifiable' (as it is in productions system)

Thanks..

Hi

I am running a report as background job with a variant "VarOne" which has the following values

1. Duration Interval - value - 60

2. Program ID. - value - 00123

3. Current Date ( Value not saved while creating variant)

4. Current Time ( Value not saved while creating variant)

While the report is scheduled as background job with a particular variant value.. Is there a table that stores all the VarOne variant values....I want to know the values of 3 and 4. I know that looking at the job scheduling time I can get approximate values..But I need to know a place( like a table) where these variant values are stored.

I have checked the following tables but didnt find the runtime values

VARID

VARIT

TRVAR

TRVARVC

TRVARV

VARICONCI

VARICON

Hope My question is clear

Thank you

9 REPLIES 9
Read only

Former Member
0 Likes
2,522

Yes values are saved in table but in Row format.

Check Table VARI

Read only

Former Member
0 Likes
2,523

Hi,

All the system variants start with 'SAP&' or 'CUS&' and it is stored in client '000'

You can access to these through function modules of group SVAR Variant maintenance (most of them begin with RS_VARIANT_)

Look also at Creating Variants (SAP documentation) or search Sdn for SVAR

System variants (CUS&, SAP&) are not editable when Client has status 'not modifiable' (as it is in productions system)

Thanks..

Read only

Former Member
0 Likes
2,522

If I remember correctly, they are in VARID but you cannot see them with the "nacked eye" in SE16.

Which release are you on? Otherwise you will need to write a program.

Transaction VARCH will help you further. Actually, you might as well just use VARCH...

Cheers,

Julius

Read only

0 Likes
2,522

Thanx for your inputs..I want to check these in Prod Sys...

Amit

I checked VARI table...CLUSTD attribute contains those values I guess...Only through program we can read those values..

Julius

In prod ,I dont have Auth to execute VARCH Tcode..

Is there any alternatives You guys can think of..

Read only

0 Likes
2,522

VARCH is much the same as any editor (e.g. SE38 or SA38.. or where ever you can display development objects from and choose "variants" from the "Other Objects" menu).

If you can display the variant from anywhere, but not from VARCH, then your concept seems to be a bit strange...

Note that from VARCH you can display and also maintain the variants (if authorized), but you cannot execute the programs (via their variants). That is what it is designed to do, particularly in production systems...

If your program concept in intact and correctly secured, then I recommend requesting standard VARCH to fullfill your requirement.

Your security folks should give you the correct authority to do your job, and not rely on silly tcodes to secure the variants...

Cheers,

Julius

Edited by: Julius Bussche on Jan 3, 2009 10:21 PM

Read only

Former Member
0 Likes
2,522

Check out the FM: RS_VARIANT_CONTENTS

Read only

Former Member
0 Likes
2,522

I need the same information.

How after a job completes can I see what was in the variant at the time of execution.

Is there a table that links the job to the variant and show the values at time of execution.

If I need to go back to previous runs, how can I tell what variant values were used.

This is especially needed if you use a TVARVC where you use current business date or an algorithm.

I have searched the same tables to no luck. I would expect some history table to exist.

Read only

0 Likes
2,522

Unless there are dynamic values in your variable, then after the job finishes you can go to SM37 click on STEP, then click on the program name and click on GO TO and select VARIANT, once the Variant comes up click on VALUES to see what was in the fields.

Read only

Former Member
2,522

I am not sure if I am missing something here but do you want to know these values inside the program while it is running or after the job is completed?

Inside the program, while it is running they are just parameters from your selection screen and all you have to do is write them out to the job log(through MESSAGE statement), or WRITE them out to the spool.

If you want to know their values after the job is completed (like when you are looking at SM37 job log), then the first entry in the job log is closest you can get).

The best option is to write them out to spool.