12-10-2008 8:42 AM
hi,
I am working on a report which fills the database and i had assigned variant called SYSDATE -1 bcoz it will update the database table for all the plants for the previous date. can anybody guide me that whether i should use the variable SYSDATE- 1 or the sy-datum-1 ,so that uploading the data can be performed.
12-10-2008 8:47 AM
While saving the variant try to have Selection Variable as 'D' and then you can set the date dynamically from any of the options in "Name of Variable" field.
Revert if you need anything further.
12-10-2008 8:47 AM
While saving the variant try to have Selection Variable as 'D' and then you can set the date dynamically from any of the options in "Name of Variable" field.
Revert if you need anything further.
12-10-2008 8:58 AM
Hi,
I didn't understood. I had checked the variant i am just taking Plant field and the date is set blank bcoz the schedular of the table is updates the table daily but it is not updating right now. plzz provide me guidelines to sove this problem.
12-10-2008 9:14 AM
You need some help in configuring the variant or the program ?
If the program had been running before and nothing has been changed then why the error ?
Could you reframe your problem a bit more clearly?
12-10-2008 9:21 AM
hi Ankesh,
I am saving a variant with having plant field filled and the date field parameter is left blank. I want to know how the program will update the data in to the database table with having Date field remains blank when the variant is saved for it.
If i specify the date field while saving the variant it will run always for that date only which is saved in variant. *What type of variant * to be saved so that execution of the program should run for everyday.
Please provide me guidelines for the solution of this problem.
12-10-2008 9:24 AM
use sy-datum for the current date which will show you the system date
SY-DATUM D System: Date. YYYYMMDD. (Appl.Server)
12-10-2008 9:33 AM
You want a dynamic variant that means.
All you have to do is save the variant and while doing so on the variant page make your date field "Save field without values" and "Selection Variable" = 'D' and "Name of variable" as current date +- days specifying whatever u want.
These settings are made in the variant of the program. The screen that opens when you press save on the selection screen. If I am still not clear please do tell me.
Also the reason your date field is getting blank is because you have saved it with blank and in yur program you must have written VALUES sy-datum - 1. You could simply Save the variant with "Save field without values" (Tick this field) and your problem would be sorted.
12-10-2008 9:57 AM
hi,
I am using just filling the Plant Selection screen and the Date parameters are being left blank and i am declaring vairant as SY-DATUM - 1 and saving it as it is.
I am not ticking any coloumn . please provide me guidelines for solving the problem.
12-10-2008 10:04 AM
Did u follow any of my instructions ? It is step by step if you try once.
12-10-2008 9:34 AM
These are few options you may try
1. Create a wrapper program which will first modify date in variant and save it again. FM RS_VARIANT_CONTENTS, RS_CHANGE_CREATED_VARIANT and
RS_CREATE_VARIANT, RS_VARIANT_DELETE will be useful.
Submit program with this changed variant.
2. Same as above except variant change program can be scheduled and dependent step can be created to run from that variant.
3. While saving the variant you may assign "Selection Variable". This will fetch data from table TVARVC. You will need to periodically update value of your date field in this table.
Regards,
Mohaiyuddin