09-30-2005 11:49 PM
When I run an ABAP4 program, there is one input field called Time Stamp. If I run the program directly (without selecting a variant), this Time Stamp field is filled with a field value from a table called TVARVC, but if I select a variant of this program, this Time Stamp field is filled with another field value of the table TVARVC. It seems that the variant value can be filled with a value in system table, am I right? If this is the case, then how it is programmed?
Thanks
Message was edited by: Kevin Smith
10-01-2005 12:39 AM
Hi Kevin
In the table TVARVC you should insert a new record which name (field NAME) have to begin with SAP_SCMA_ and the type (field TYPE)is P for parameter or S for select-options and the values (field LOW and/or HIGH) are your value.
So you have to create a variant and for input field Time Stamp set flag SELECTION VARIABLE and then push button SELECTION VARIABLES. Now you have to insert the name of your record of TVARVC.
So when user choose this variant the input field Time Stamp is filled with value you have entered in TVARVC.
Now in TVARVC you can insert another record (if you want it isn't avaible for SELECTION VARIABLE function in the variant, you should give it a name it doesn't begin with SAP_SCMA_) and put this value in the input field Time Stamp during INITIALIZATION event:
INITIALIZATION.
SELECT * FROM TVARVC WHERE NAME = ......
Time Stamp = TVARVC-LOW.
........
Max
P.S. you have opened two post with the same problem, close older one.
Message was edited by: max bianchi
10-01-2005 5:15 PM
We use the TVARV table a lot at my company, we have 30 some different variables, some parameters, so select-options. Most of which are date calculations. I wrote a program which looks at all of these variables are updates them via a BDC call transaction SM30. This program runs every night to update all of the variables. Maybe you could do something simular for updating your variables.
Regards,
Rich Heilman
10-02-2005 4:17 AM
Hi Kevin,
I think you have multiple posts with the same question and you have marked one of them as being answered. Could you please close all these other posts as well?
Thanks,
Srinivas