‎2010 Apr 17 12:48 AM
Hi All,
Is it possible to create a variable variant in a program. Suppose I want to create a variant for the program where the selection screen data will be auromatically changed while running the program in batch.
Kindly provide me any inputs if you have.
Thanks in advance.
Regards,
Lokesh
‎2010 Apr 17 3:29 AM
Hello,
You may create a program to dynamically update the variant using the function RS_CHANGE_CREATED_VARIANT and run this program prior to your batch program.
Thanks,
Venu
‎2010 Apr 17 4:18 AM
Dynamic variants are possible but the scope is limited.
the selection screen data will be auromatically changed while running the program in batch.
Can you be more specific in your statement ?
BR,
Suhas
‎2010 Apr 17 1:08 PM
Suhas, Thanks for the response.
Yes my requirement is that every month on a specific date job will be run for a last month all sales documents created. e.g. on 2nd of April program will run for all sales documnets created in the month of march from 1st Mar to 31st Mar. same it will do in the month of May for all docs in april. so this criteria I need for batch jod creation so that it picks up the date automatically.
Please suggest.
‎2010 Apr 17 11:10 PM
It isn't worth developing something as this can be done manually very easily by entering the date interval in the selection screen (with a select-options to enter 01.03.2010 to 31.03.2010), or maybe they want to suppress all humans maybe
‎2010 Apr 18 5:05 AM
We can do one thing here. Create a variant with blank/empty date.
In At Selection-screen output event, check if SY-BATCH is 'X' and selection screen date is initial.
Get the last month from SY-DATUM.
Get the first and last days of last month.
Modify selection screen dates with the first and last days of last month.
We followed this way in my project.
Regards,
Ganga
‎2010 Apr 18 6:03 PM
Hello Lokesh,
I partially agree with Sandra Since you are scheduling a monthly batch job you do not want to manually change the date range.
For me the simplest solution would be defaulting the first & last date of the previous month in the low & high values of the select-option.
I dont think creation of dynamic variant is available for SELECT-OPTION.
BR,
Suhas