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

Using TVARV

Former Member
0 Likes
2,393

Hello ,

I have store a group email address which would be used in several programs.. There are 2 options..

1. Create a custom/bespoke table to store it

2. Creating an entry in TVARV table...

Which of this could fall under "Best Practice"

Regards,

Samir

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,355

Hi Samir,

Is this just one constant group email address? Then I would suggest putting it on your selection screen as a parameter, default its value and leave it. That way when you schedule a job for the program in production, you can save it as a variant. Whenever there is a change to the email address, then you can just change the variant. Maintaining TVARV will need SM30 access in production which basis people would not find comfortable.

Also, the purpose TVARV is to have variant variables, by which I mean, you define(or use standard ones) a variable in TVARV whose value changes everytime you run your program like a date parameter that should always default to today + 10 days.

Using this table to store a constant value like your email address is not the suggested use of it.

Srinivas

7 REPLIES 7
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,355

I would say that you should do it with a custom table, how do you propose you will do it with the TVARV table?

Regards,

Rich Heilman

Read only

0 Likes
1,355

http://help.sap.com/saphelp_47x200/helpdata/en/c0/98037ae58611d194cc00a0c94260a5/frameset.htm

This link explains it , basically I will define a variable in the table TVARVC..

SM31 --> TVARV

Create a new variable and assign a value to it..

Read the entry from using a select query..

Rgds,

Samir

Read only

Former Member
0 Likes
1,356

Hi Samir,

Is this just one constant group email address? Then I would suggest putting it on your selection screen as a parameter, default its value and leave it. That way when you schedule a job for the program in production, you can save it as a variant. Whenever there is a change to the email address, then you can just change the variant. Maintaining TVARV will need SM30 access in production which basis people would not find comfortable.

Also, the purpose TVARV is to have variant variables, by which I mean, you define(or use standard ones) a variable in TVARV whose value changes everytime you run your program like a date parameter that should always default to today + 10 days.

Using this table to store a constant value like your email address is not the suggested use of it.

Srinivas

Read only

0 Likes
1,355

Hello Srini,

I went through this link,,

http://help.sap.com/saphelp_47x200/helpdata/en/c0/98037ae58611d194cc00a0c94260a5/frameset.htm

Please note that all are not report programs, some are print programs as well.. And trigerring is through message control..

Regards,

Samir.

Read only

0 Likes
1,355

You could also maintain your group as a distribution list in SAP Office.

Cheers,

Ramki Maley

Read only

0 Likes
1,355

Hi Samir,

TVARV is meant for variants and variants are meant for report programs. So if you are using it for print programs, then that means you are just using it as a table that stores a value rather than the intended purpose of this table.

You can as well create a Z table and store it there. This way, in future, if there is a requirement for additional email addresses, you can easily add to this table. But if it is in TVARV, you need to create that many entries as you have the email addresses.

Hope this clarifies the use of TVARV.

Regards,

Srinivas

Read only

0 Likes
1,355

Hi guys,

I have a requirment to change the variant value whenever fiscal period changes.

I have gone through this thread and came to kbow abt table TVARV.

how can i use it to change a field in variant dynamically (eg date = first day of fiscal period)..