Current date as variant

Hi
i am having
SELECT-OPTIONS: s_erdat FOR vbak-erdat.
i am getting s_erdat - low value from one table which is  from program logic . high value = sy-datun -1.
when you run this program it is coming good.
now, the  problem is, i want to crate a variant and run the background job. when ever i run the background job that variant should automatically take values mention from program logic
Message was edited by:
        sudhakara reddy

Hi Sudhakar..
This is the Logic.
SELECT-OPTIONS:s_erdat FOR vbak-erdat.
INITIALIZATION.
S_ERDAT-SIGN = 'I'.
S_ERDAT-OPTION = 'BT'.
SELECT SINGLE <DATEFIELD>
FROM <TABLE> INTO S_ERDAT-LOW.
WHERE <COND> .
S_ERDAT-HIGH = SY-DATUM.
APPEND S_ERDAT.
<b>Reward if Helpful.</b>

Similar Messages

  • Current date - x in variant

    Hi,
    I want to use program RHALEINI (tcode PFAL) with a variant.
    In the field "Data selection period from" I want to have a value like current date - x.
    In the Variant Attributes I select "D" for Selection variable (Dynamic date calculation) and as Variable name I select Current date +/- 30.
    Then I get the message "Lower limit of interval is greater than upper limit"
    Could somebody help?
    Thanks and regards
    Patrick

    Hi,
    at the moment I have selected "Current date" for "Name of Variable" of the field "Data selection period from".
    If I try to select for example "First day of previous month" nothing happens.
    If I select "Current date - 30" I still have the same error message mentioned above "Lower limit of interval is greater than upper limit".
    But the lower limit should be less than before.
    I would be very thankful if someone could explain this behaviour.
    It works in ERP 5.0 but it's not working in ECC 6.0.
    Regards
    Patrick
    Edited by: Patrick Koehnen on Aug 28, 2008 3:28 PM

  • Dynamic current date variant with static date

    I have a report that I want to execute with a variant that defaults dynamically to today's current date, but I also want to select based on if that date field is initial too.  In one execution.  So select record if date is either today's date (dynamically calculated) or date is initial.
    Anyone know how I can do that?
    Thanks so much
    Cathy

    hi
    Did you try to force value in the variant in the multiple value with a value equal to space? So it will be like default date as today's date and fixed values as space.
    Force value in the sense we use fixed values in the selection screen.
    If this is not working then do coding in infoset
    Br
    Vijay V

  • Dynamic variant creation, Current date "-NNNN" *(4 digit number)*

    Hi,
    Is there any way of creating "-NNNN (4 digit number)" for dynamic date calculation in variant variables?
    I need to set 4 digit number in the "DLFL to Change Date (Old ver: To Change date)" field but system only allow total 4 digit including +/-.   I'll be using the "Current date +/- ??? days" option to set date dynamically.
    In order to set deletion flag for PM orders older than 6 years, I need "Current date -2190".
    Or is there other way to set it as MONTH when calculating the change date?
    I'm using PM order initial archiving job whose report name is RIARCORV.
    Thanks in advance,
    Alex
    Edited by: Alex Kwon on Jul 16, 2009 2:44 AM
    Edited by: Alex Kwon on Jul 16, 2009 2:45 AM

    Alex,
    I dont think its possible to do the same using the variant functionality. You will have to do some workaround to accomplish the same by either using other fields like Order number.You could also look at enhancing the code implicitly in the RIARCORV program, if you are in ECC6.0 or above versions.
    Regards
    Narasimhan

  • Dynamic Variant -Current date  in selection screen - for batch jobs

    Hi Experts,
    My report runs in batch job with a variant, daily.
    One of the filed in selction screen should hv CURRENT DATE, with out providing as input explicitly by user.
    So, How Can I get it done?
    Its some thing with Dynamic variants + Selection Variables +  date selection, but, I forgot the navigation etc.
    pl. let me know
    thanq

    thanq.
    and pls. let me further clarify that,
    programitically am populating the date as current date minus 1 in the field of my_date in the selection screen.
    now, they wanna to run the report in back ground, daily.
    now, I followed ur tip/link and saved with_date_variant, fine.
    so, pls. let me know that,
    1) if the report runs in back ground tomorrow with with_date_variant(which is i created by seeing ur link), Is the selection screen my_date(prog. populates as June 5th) will be override with current date(i.e. June 6th)?
    In broad, Is the selection criteria wuld be over writes with the Dynamic varints?
    thanq

  • Variant must get the current date from the system.

    Hi All,
    I really appreciate your help on below please;
    I need to create a variant and schedule a report program once a day.
    But variant must get the current date from the system (sy-datum).
    The program should run for the values in the variant in schedule job run;
    Can I do this using SAP variants (for Report Program) and schedule the job.
    Many thanks
    Iver

    Standard functionality.
    http://help.sap.com/saphelp_nw70/helpdata/en/c0/98039be58611d194cc00a0c94260a5/frameset.htm
    Thomas

  • Create Variant for dynamic population of current date

    hi,
      How do i create a variant for a DATE to populate the current date in the selection screen?
       Please let me know
    Thanks in advance.

    Hi,
    Go to SE38..
    Press F8..
    Press save button..
    Give the variant name..and description..
    For the corresponding date column Check the check box under the column "L" which says selection variable..
    Press the selection variable button in the application toolbar..
    Click the hotspot Under the column D..Now it will be green..
    Press the drop down ...Choose the current date...
    Save the data and save the variant..
    Now if you choose that variant...The date will automatically be set to the current date.
    THanks
    Naren

  • Option to show values up to last closed fiscal period or up to current date

    Hello,
    How would I create a query that would ask if I want it to calculate values 'up to the current date' or for the 'latest closed fiscal period'.
    Currently I have setup a report, within which, has restricted key figures that will give the 'Period to date', 'Year to Date', and 'Last Year Year to Date' values for some RKFs, however, it would be very helpful if this report could be setup so that the user could choose whether the report provides:
    1. Values only through the last closed fiscal period
    or
    2. Values up to the current date.
    <b>For example</b> if we are in period 7 of 2006, the user could have the report show all values up to the last closed fiscal period, which in this case would be period 6 of 2006.
    Or the user could have the report show all the values up to the current date.
    Hopefully I have been clear,
    Thanks,
    Nick
    Message was edited by:
            Nick Bertz

    Nick,
        What is the problem you are facing? As San mentioned you can only report till Last Fiscal Period using Customer Exit Variables(Calculate Current Fiscal Period using Current Month and Fiscal Year Variant).
    Or as you mentioned you can create restricted Key Figures using Date or month (YTD etc)
    If i miss your requirement, please guide me.
    Regards,
    Nagesh Ganisetti.
    *Assign Points if it helps.

  • 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

  • How to get the name of the currently used display variant

    Dear all,
    I found the user-exit EXIT_SAPLGRAP_001 for programming download authorization.
    With us no standard user is allowd to download data from R/3. With the user-exit it would be possible to allow certain downloads. one problem i solved already.
    For programming the second authorization i need the name of the currently used display variant in RKPEP000. Where can i get the name. I tried user-exits for RKPEP000, but i didn't find the name. I didn't find it in SYST either.
    Thanks and reargs
    Monika

    First you need to enter those names. Right-click the songs (Windows) or go to File>Get Info (All Platforms), then go to the second tab from the left to insert the information.

  • How to get list of orders for current date.

    Hi,
    My requirement is to get list of orders for the date on which order was created such that I don't have to change the date in my application.
    Every time I run my application it should generate orders created on that current date without manually giving current date.
    This has to be done directly using BAPI and without creating a RFC. 
    I tried with bapi " BAPI_ALM_ORDERHEAD_GET_LIST " using parameter OPTIONS_FOR_START_DATE  but there I can't enter sy-datum and hence, every time I hence to change the date.
    Please tell me if there is any possible way to get fulfil above requirement.
    Thanks.
    Shilpi Agarwal.

    Hi Shilpi,
    This looks simple to me.
    Just create a variant in IW38 with U_your UserId as shown in the picture (Dynamic date selection for Created On set to Current Date)
    The status settings obviously would be
    Jogeswara Rao K

  • Javascript code to add current date and time in a textfield on click of a button

    Hi,
    I have done a lot of googling .....But could not found a viable solution to populate a text field in LC Designer ES 8.2 and above at runtime with the current date/time. on click of a button. I need Javascript code and not formcalc.
    Please help .
    Thanks
    Kapil

    I have found a solution for you - 3 variants for you:
    Textfeld1.rawValue = util.printd("dd.mm.yyyy HH:MM", new Date());
    Textfeld2.rawValue = util.printd("dddd d. mmmm yyyy HH:MM ", new Date());
    Textfeld3.rawValue = util.printd("date{EEEE, D. MMMM YYYY} time(de){HH:MM:SS Z}", new Date(), true);
    I hope this is helpfull,
    Mandy

  • Dynamic Date Calculation for Current Date - 1

    I am trying to create a variant with a dynamic date calculation attribute.
    I am following the instructions as they are posted to the web but I get an error message.
    I want to get all data EQ to the current date -1
    In the object for selection screen I enter a D for Selection Variable, for Name of Variable I enter an I to include specific values and the option EQ for current date +/- ??? days.  Then I enter 1- for the number of days.  I have tried to enter this many times and in many ways but it doesn't work.  I keep getting this message "lower limit of interval is greater than upper limit"

    Hi,
    Welcome to SDN.
    Selection-screen has four values -
    SIGN
    OPTION
    LOW
    HIGH
    Pass your date value in the option low for the screen.
    Sign you have already pass as I and option as EQ.
    Regard,
    Amit
    Reward all helpful replies.
    Can you paste your code here.
    Message was edited by:
            Amit Khare

  • 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

  • Problem with current date field...

    I want to display the current date and time, but when I change the data format in the binding tab to "Date and Time" and assign a pattern that includes date and time, all I get is the current date, NOT the time. TIA!

    I have tried applying these scripts in the initialize event to all manner of objects, text field objects, date/time objects, numeric objects, current date objects, and it shows nothing. If I could just edit the date/time format of the current date object when it is set to "Runtime Property-Current Date/Time" I MIGHT be able to use it. I really appreciate your help thus far. Would it be possible for you to share a pdf file that you've made where this works so I might disect it? No matter what pattern I specify in the "Field" palette, it shows it's own formatting.
    UPDATE: I did go back after trying it a few times to change the value after Page1 to match the name of my field.
    UPDATE 2: Here is a link to what I've done. Take a look and let me know what I'm doing wrong, or change it and share it back. Thanks so much for your help!!!
    https://www.dropbox.com/s/1so2hcao372k37z/Script%20Examples.pdf
    Vipin Bhargava wrote:
    I have found 3 more variants. You can write below code on initialize event. It will automatically display the current data & time during the preview
    1.   xfa.form.form1.Page1.TextField1.rawValue
    = util.printd("dd.mm.yyyy HH:MM", new Date()); 
    2.  xfa.form.form1.Page1.TextField2.rawValue = util.printd("dddd d. mmmm yyyy HH:MM ", new Date());
    3.  xfa.form.form1.Page1.TextField3.rawValue = util.printd("date{EEEE, D. MMMM YYYY} time(de){HH:MM:SS Z}", new Date(), true);
    Hope this helps,
    Vipin

Maybe you are looking for

  • Cant Edit Message Body (outlook 2003 and 2007), Cant select text VIA click (word), Cant Edit Advanced Options (word)

    A number of my users are having similar problems across the entire network. These issues have started on 8/26/2014 This problem is not localized to a specific outlook version, the problem is happening on 2003 and 2007 alike. Also this problem is star

  • How to get Array elements

    Folks in my JSP i have a combo box where in user can select multiple values and in my Servlet i set them using a Serilizable object public void setSites(String[] sites) this.sites = sites; and in my EJB i get them as public String[] getSites() return

  • JTable - detecting double click

    i'm trying to detect double click on a row in a JTable and then find out the row number. i can get it to detect the double click with the table disabled but the row always comes back as -1. if i try setEnabled(false) it doesn't detect the double clic

  • Hardcode Logical Column

    Hi, I need to hard-code a logical column to hold 2 values "Pay" and "Buy" and i need this field in Prompt as multiselect. Any help will be greatly appreciated. Thanks

  • Multiple Keyword Sets (For Multiple Databases)

    I work with several different Lightroom databases and it would be nice to be able to have separate sets of keywords that go with each database. In my specific case, I use one database for my personal photographic endeavors and another for an image li