‎2008 May 06 8:21 PM
Hi All,
I have a dbt in setting variants. I have a screen which i get after running a transaction. This screen has to be inputted with values:
Date, Plant and storage location.
Now i want the variants to be
1. system's current date and plant 0007 and st loc 0001 as 1st variant.
2. system's current date and plant 0007 and st loc 0002 as 2nd variant.
3. system's current date and plant 0007 and st loc 0010 as 3rd variant.
I have made date as default systems date in code. But when i created variants for plat and location and when i selected that the date gets removed and plant and loc comes in.
Is there a way through which we can create a variant as described in above 3 points.
Thanks,
Bob
‎2008 May 06 8:49 PM
I don't really understand what the problem is? It is possible to create these 3 variants and schedule a job for your report. So what seems to be the problem??
Could you please rephrase this sentence:
'But when i created variants for plat and location and when i selected that the date gets removed and plant and loc comes in'
‎2008 May 06 9:01 PM
yes i can explain here it is:
date is coming by default from the abap code as i made it default sy-datum there.
then i created some variants on screen for plant and storage location. After successful creation of variants when i again run the program and select the variant which i created for plant and storage location then the date which comes by default goes away. So i want to develop a variant in such a way such that if i select it then systems current date, plant and storage location (which i define in variant) comes in.
‎2008 May 06 9:05 PM
In the variant attributes. select the option of selection variable for the date field. After doing this the program will take the current system date from the tvarv table and hence u will have the current system date everytime
‎2008 May 06 9:17 PM
Hi Boby,
The following might vary based on the R/3 version, mine is ECC6.0.
Fill the values in the plant and storage location fields and try to save the variant by pressing the save button on the selection screen. On the next screen, all the fields from selection screen are listed in a table control which has columns to set attributes for each of these fields. Use columns Selection variable, Option and Name of Variable(Input using F4 only) coulmns to set the current date for the date field.
The values for these coulmns for setting the current date should be 'D', '=' and 'Current Date' respectively. After this, save the variant and you should be all set.
For versions lower than ECC6.0, try to look for 'Selection variable' on the screen where variant attributes can be set.
Hope this helps.
Thanks
Sanjeev.
‎2008 May 06 9:19 PM
There are two ways of doing this:
1. The selection parameter for the date can be 'deleted' from the selection screen. In your report, make your selection using sy-datum and not the variable for the date from the selection screen.
2. If you create variants with plant and location, you will have to set the date as well, otherwise it will be overwritten by the variant. When creating a variant, you can also dynamically set the date to the system date. you will have to find out yourself how to do this, since I have no system I can use to tell you the exact steps.