Dynamic date in variant

Hi,
I need to create a dynamic date for my variant.
Date will be the select option - The from date should be the current date and the to date should be current date + 30 days.
When i am using the Selection variant and using the option D to calculate the current date+ 30 days. But that is getting stored in the from date but not in the to-date. My report will be running in back ground every day. So according to the requirment i need to have from date as current date and to-date as current date + 30 days.
I cannot use the logic in initialization as the report will be running based on the variant saved.
Thanks,
Raju

Hi Raj,
I can think of one thing,
just use parameters for start date and end date
and then set the their values in the variant as follows,
Press Save on the selection Screen and then put the name and short text then,
in the very last box called "Selection screen objects 1000" check on the fourth check box "Selection variable" for both start date and end date.
Then click on "selection Variable" Button on left hand top corner of the screen.
Then click on the D: Dynamic date calculation the must turn Green.
then click on the downward arrow that appears there you will have options to set the date.
there choose current date for the start date and Current date +/- ??? days  for the end date.
now while setting the end date it will ask you the number of days there you have to put 30(as it is your requirement) and SAVE.
Then test it .
otherwise you can go for this approach.
Keep your date in select-options only and use the following option while selecting "Selection variables"
"Current date - xxx,current date + yyy"
Hope it helps you,
Regards,
Abhijit G. Borkar
Edited by: Abhijit Borkar on Jan 7, 2010 7:31 AM

Similar Messages

  • BMBC Dynamic Date selection Variant

    Hello Team,
    I want to create variant in BMBC -Batch Information Cockpit with Dynamic Date Selection. But it do not find the screen the to set-up variant attributes
    This is the field where I want to have dynamic date selection, 1st Day of the month to Last day of the month.
    Field name and program
    I am using SE80
    As you can see screen number 0100 is not showing up. and I have gone though all available screen but i could not find the field.
    Please advise if dynamic date selection for this field is possible at all or there is other way.
    Thanks

    I don't think that it is possible to have dynamic date selection here. The whole selection screen is just dynamic, it has only place holders and you define in customizing which field is on the selection screen.
    You actually save a selection variant via this extra big button for selection variants, which is quite different to the disc icon where you usually save your selection variants and where  you have the option to define dynamic date fields.

  • How to set dynamic date in variant

    Hi,
    I'm going to create a variant for report RBDAPP01, I want to set the create on date dynamically, create on from should be one day before current day, to should be currently day, how to create this variant?

    Hi Rakesh,
    As sekhar explained, select options using F4 on date selection.
    There will be options like current date - days , current days + days , first day of current month, last date of current month like vise.
    Eg. Time evaluation should be run for 3 month back with ref to current date.
    Hence, select current date - days option using F4. Then system will ask for days. There we provided 90 days (3 Months).
    So if current date is 07/09/2014 then system will run from 7/6/2014 ( 90 Days ).
    Hope this will clear.
    Please let me know if further details required.
    Best Regards,
    Ketul

  • Dynamic field in Variant

    Hi,
    I have to make Period (from),Year (from),Period (to)
    and Year (to) as Dynamic in  the Variant for Program RKKRCO02.These are of type Parameters.
    Please let me know how I can get it done.
    Thanks in Advance,
    Savitha

    HI Savitha,
    If u open the variant and observe, there some options like hiding parameters and select-options. The same thing we can do my some function modules which will play the dynamic operation with variants in the selection screen.
    And if u want to fix some values in the variant for any date field, you can do by this way.
    To set the dynamic date:
    Save variant on the selection screen.
    In the vairant screen, press F4 against your field in the column "Selection Variable"
    Select D here.
    In the column Name of the variable, press F4 to have the list of the possible rules.
    Here you can select "Current date - xxx,current date + yyy" if you want to have certain period.
    When you select this system will pop up to put the values for XXX and YYY.
    Say for last 7 days, you can set the values XXX as 7 and YYY as0.
    But the best way is to change the program, if possible, and fill the select option in the initialization event.
    Reagrds,
    Raghu.

  • Tricky dynamic date variant in ABAP query

    Hello All,
    In an abap query there is a date field in the selection screen with from & to values.
    I am trying to create a dynamic variant that will fill the following data into those fields:
    From date: will be left blank
    To date: will show today's date - 90 days
    For example, if today's date is 01/12/2006 the variant should fill the following data into the fields:
    From date: <blank>
    To date: 01/09/2006
    I have tried all the methods I know with dynamic dates calculation in the variant definition but did not manage to create such variant.
    Any help will be very appreciated and points would be rewarded generously !
    Thank you very much,
    Ronen

    If the "from" date is meant to be left blank (beginning of time) and the "to" date is some date plus or minus number of days from today, you use the "current +/- days" dynamic date calculation format as was mentioned earlier.  Likewise if the "from" date is some date plus or minus today's date, and the "to" date is infinity -- you only need the one Dynamic Date calculation.
    To do this, first don't think about this as a date range, think of your Dynamic Date calculation as if this were a single parameter and not a select-option.  You are really saying "my date is anything LT/LE this date" or "my date is anything GT/GE this date" -- not a range
    In the Save Variant screen, find the desired date select-option and:
    1. Choose in column "Selection Variable", a "D" (Dynamic date calculation)
    2. Use F4 in the "Name of Variable" column
    3. Find "Current date +/- ??? days" or "Current date +/- ??? work days" in the popup, as appropriate
    4. For "I/E" (include/exclude) column select as appropriate
    5. For "Option" column, choose "LE", "LT", "GE", "GT", "NE" as appropriate
    6. After clicking green check mark, enter your plus or minus days (and factory calendar if using work days).
    7. Finish saving your variant.
    8. You may not see your changes in your variant until you back all the way out of the variant and then redisplay it.  You'll see a greyed out date along with the symbol matching your choice (LT, LE, etc.)
    Unfortunately if you don't have infinity on either end of the date you are limited to 999 days differences as far as I am aware.  If that is the case you can populate TVARVC table with parameter or selection variables, maintain them with STVARV transaction by hand, or use an ABAP program in batch to regularly calculate the values.  Then you can reference the TVARVC values in your variant instead of the Dynamic Date calculation.
    If someone knows a way to bypass the use of TVARVC for date ranges that are more than 999 days apart please let me know.  TVARVC works well but it is extra effort whereas Dynamic Date calculation would be much easier to maintain if the date range could be made larger than 999 days.

  • Dynamic date variant in selection screen

    I have a selection option s_date in my program where I want to use the dyanmic variant with.
    it is a date range and for the lower range, I would like to have a static value of 04/01/2010 and for the higher range I want to have last date of the prev month.
    I see last date of the prev month in the drop down (F4) Dynamic table, but selecting that is overwriting the s-date-low instead of s_date-high. How can I use the dynamic variant for this ? Can i create my own custom drop downs for these dates?
    S_DATE      FROM  (_04/01/2010_)  TO (LAST DATE OF PREV MONTH)
    Thanks in advance..

    In variant you can specify dates dynamically.
    When you save a variant, system ask you enter variant name and Meaning. On the same screen you can specify these dynamic values.
    For the parameter/select-option where you want to specify dynamic value, press F4 on 'Selection Variable' column.
    Choose type of variable as 'D' (Dynamic date calculation).
    Press F4 on 'Name of Variable(Input only using F4) column and select 'Current date +/- ??? days' on next screen.
    On input screen enter -1.
    Repeat same for To Date' field.
    Prabhudas

  • Fiscal Calendar in Report Variant Dynamic Date Calculation

    We are switching from the standard calendar to a 4/4/5 calendar for our fiscal calendar. We have a number of batch reports that use dynamic date calculation in the variant to get Month-To-Date or Previous Month date ranges. Is there a way to convert these variants to use the new FiScal calendar instead of the regular calendar?

    thanks to answer , praveen.
    I know, VARI has name of FM , but not has Calendar ID.

  • Dynamic date in the selection according to fiscal year variant

    Hi
    Is it possible to set dynamic date input parameter from the fiscal year variant sap table (OB29 transaction).
    For example when I run valuation (F.05) I want the value date input field to be the last day of the previous period.
    Thanks
    Ofer

    Hi,
    The dynamic dates on the selection parameters may come from the variant.
    You need to create the variants accordingly to your requirements and specify how the date on the selection screen has to be calculated.
    You have different options for this purpose.
    T     T: Table Variable from TVARVC
    D     D: Dynamic date calculation

  • Activating dynamic date calculation in variant

    Per the link below, I used to be able to activate "dynamic date calculation" in variant.
    <link to blocked site removed by moderator>
    Our system has been upgraded to 6.0 and now we do not the same variant attribues screen where I can activate the "D" variable.  It brings me to program/screen SA38/281. 
    Any suggestion how I may activate the "D" dynamic date calculation variable in a variant?
    Edited by: Thomas Zloch on Oct 14, 2011 11:34 AM

    Actually I meant the relevant code of your custom report, you just provided me with the info of the standard variant screen.
    You can go to SE38, enter your custom report name, display the code, and paste the definition of that parameter. (It would be something like
    PARAMETERS: P_DATEHG TYPE XXX_TYPE.
    What I am interested in is to know which data type is being used, since this functionaliy will only apply to date type fields. So, bottom line: this field must definitely be a date, which makes me think that either something has changed in the custom report or after the upgrade to ECC 6.0 this data type might have changed as well.
    Best regards.
    Edited by: Jose Maria Otero on Oct 14, 2011 5:26 PM

  • Dynamic Date calculation in Variants

    Dear SAP Guru's,
    I am creating variant for Planning Run by maintaining the . I n this, I want to select the horizon as from 1st day of next month and to date as last day of next month. But I am not finding the Last day os next Month in the F4 list.
    Please any one explain me the way of creating the "Last day of Next month".
    The available list is like below..
    Current Date
    Current date +/- ??? days
    current date +/- ??? work days
    First day of current month
    nth working day of current month
    First day of next month
    First day of previous month
    Last day of previous month
    Last Day of the Current Month
    How can I create, one more like 'Last day of Next month'?
    Regards,
    Sree

    In the dynamic date period selection options there is also an option for " (Beginning of mth-xx months, end of mth+yy months)"  You can double-click on this line and enter in a value for xx and yy.  If you enter "1" in for the yy value, then the end of the range should be the end of the next calendar month.

  • Dynamic Date Variant for SAP Job

    Hi Guru
    We have a program to be ran in the Background .
    I am unable to create a Variant for Date ( Current year Jan 01st to  Current Date).
    Could you please advice how to create a Variant with Dynamic Date Calculation for above date range.
    Thanks in Advance.
    Thanks
    Ravi

    Hi,
    I guess that you know how manage dynamic dates in a variant. (Please, tell me if you need help about it)
    You can try with two DATUM type fields in the ABAP program. Fix the first one with a fixed date u201901.01.2009u2019 and the second one will be fixed with the dynamic date u2018Current Dateu2019
    Regards,
    OLA

  • Dynamic date variant

    Hi Gurus,
    I've a dynamic system date variant for my program, which runs in background. I have no issue with variant, it works fine. But when I went to job log to check the old jobs that has dynamic date variant, it always refer to current system date. Anybody can suggest me how to fix it to show the actual variant at the time of job run?
    Regards, Raju.

    The dynamic date overwrites the value that it was saved with at the time of processing.  What you see when you display it is the value at the time it was saved (the non-dynamic value).  There is no way to see the value at the time it was run.  At least not that I know.
    You can however compute it if you know that the variant hasn't been changed since it was run.
    Neal

  • Dynamic Date Variant in SAP ver 3.1

    How to create a dynamic date variant in SAP ver 3.1 ?

    Hi,
    I guess that you know how manage dynamic dates in a variant. (Please, tell me if you need help about it)
    You can try with two DATUM type fields in the ABAP program. Fix the first one with a fixed date u201901.01.2009u2019 and the second one will be fixed with the dynamic date u2018Current Dateu2019
    Regards,
    OLA

  • Variant with Dynamic Date Calculation

    I have a variant that includes a dynamic date calculation.  I'm using the Current day -1 date calculation. Does the dynamic date calcuation use the time zone of the system or the time zone designated on the user id for the calcuation?

    time zone of the system.. if you want to use the user time use Sy-timlo

  • Defining variant for report for job with dynamic date Gui 6.40 patch 21

    The system does not take over my choice for the dynamic date.
    I choose in the variant-attirubute-screen for a certain parameter: "type selection variable": D and then in the column "name of the variable" > I choose via F4: current date +/- days. OK and then I fill in 1 or 1- or whatever.  The system however does only react with the message "Upper date of the interval is > than upper date". It does not matteer what I choose.
    In the initialization I do not have any initialization of that parameter.
    I connot save the variant.

    Go through this link...
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802cfc454211d189710000e8322d00/frameset.htm
    In this page
    ABAP Workbench tools -->
                      VARIANTS  -->
                            VARIABLE VALUES IN VARIANTS.
    Hope this helps u a lot...
    reward if it helps u...
    sai ramesh.

Maybe you are looking for

  • Printing only Text and Subtotals lines in A/R Invoice not Regular lines

    How can I create in PLD for A/R invoice that only prints the Text and Subtotals lines in A/R Invoice but not the regular lines the A/R Invoice ?

  • Error while trying to access to Displays prefrences

    Hi all, I'm reporting a strange behavior. I don't really know how to deal with it. A few days ago i wanted to adjust the resolution of the external screen i'm using with my 2011 MBP and the Displays preference pane had disappear from the System Prefe

  • I can't see older photos events of iPhoto on my Apple TV 2

    I can't see older photos events of iPhoto on my Apple TV 2nd Gen. Only recent events are shown and I have selected to see all photos, events and faces from the sharing preferences in iTunes. Does anybody have any idea how to solve it?

  • RSPOR_SETUP  = Different ABAP and Java support packages.

    Hi all, We have an ECC 6.0 system with abap+java stacks. When we run the RSPOR_SETUP report we get this error: Different ABAP and Java support packages. Combination of support packages invalid And with some more clicking we find this: 6. Compare vers

  • Errors in Logfile on CFB Startup

    Hi, Every time I start CFB I get the following error in the log file. Running CFB standalone with latest update on WinXP sp3. Also happens  with Win 7 too. Any ideas what is causing this on my systems and is it really important? CFB seems to run ok o