Pass current Date to variable thru Command Wizard

Hi ,
I have an date input variable for a query. I would like to pass the current date to this variable using the Command Wizard when the Web template is executed. Can someone please help me
Thanks

Hi,
0DAT will not solve my problem.
I have a 2 query variables ZDATE and  ZVARMTD. ZVARMTD is a user exit variable and will be populated based on the value in ZDATE(input).
Initially I want to default ZDATE with current date -1. I have the user exit coded to set this variable to (sys date -1). I thought of using the offset. But it shows only single values, I don’t see variables.
If the user then enters another value, the user exit will set the MTD based on the date entered.
In the Query , I have this variable ZDATE in the restriction of a key figure 0AMOUNT and ZVARMTD for 0CALDAY in the Filter..
(If i have ZDATE) in the filter, it only shows the values for the entered date.. Actually we want the report for Month to Date.
When i debug , i dont see this variable(ZDATE) in i_vnam and it is never going to my code. I only see those variable(ZVARMTD) i have in the 'filter' tab
So ithought I can populate using the Java Script while executing the Web ...
Any help ..

Similar Messages

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • Passing a date presentation variable in 'Invoke a Browser Script'

    Hi,
    I have a problem with passing presentation variable with Invoke a Browser Script.
    In my main report i set the filters and it works correctly:
    ColumnDate is greater than or equal to  @{vStartDate}{01/05/2015}
    ColumnDate is less than or equal to  @{vEndDate}{04/05/2015}
    (It works with different dates, i have tested, not only for the values between 01/05/2015 and 04/05/2015)
    i gave the same filters to the detail report.
    When i choose the action link to go the detail report, it only brings me the values between 01/05/2015 and 04/05/2015 .
    If i remove the default date values then both report gives the error :
    A date value was expected (received "vStartDate"). 
    Error Details
    Error Codes: GYYEWLWG 
    What i am doing wrong?
    Please help me.
    Thanks in advance.

    You should be using prepared statements.
    String scoredGoalsQuery = "SELECT count(name) from player_goal_rel where name = ? and pdate BETWEEN ? and ?":
    PreparedStatement pstmt = connection.prepareStatement(scoredGoalsQuery);
    pstmt.setString(1, pName);
    pstmt.setDate(2, startYear);
    pstmt.setDate(3, endYear);
    ResultSet scoredGoalsResult = pstmt.executeQuery();

  • Formula Variable: Current Date

    Can somebody let me know the SAP Delievered Current Date Formula Variable Name.
    Cheers!!
    Amit
    9990800302

    Hi.......
    As already said....you can use 0F_ADAY.....
    Usually global variables (as formula) are available for every query (and not specifically to a single provider)...in addition, you can find all the formulas when you build a new object (new formula) in your query (you can choose from formula hierarchy)...
    Check this..........
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/324de5a1-0201-0010-dc9a-a093cde87bb5
    Customer Exit.......
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
    Regards,
    Debjani.........
    Edited by: Debjani  Mukherjee on Oct 29, 2008 4:47 PM

  • ACCESS CURRENT DATE in IP - FOX formula

    Dear Experts,
                    I need to pass current date as the parameter in the ATRT function but I do not have access to any infoobject of type date. If I try to access the value of a variable defined by SAP like 0dat I couldn't save the formula. Please help.
    DATA ZPM_TODAY TYPE  D.
    ZPM_TODAY  = VARV( 0DAT ).
    The CHECK function results ok but SAVE fails and there is dump in st22 on CX_RSR_COB_PRO_NOT_FOUND . Please suggest.

    I defined a function module in ABAP to return the current date when invoked then. You may try "varv" and define a variable with replacement path pointing to any pre-defined variable that gives you the current-date. Hope it helps
    Suresh Reddy

  • Current date and time in narrative. html?

    Hello,
    I would like to include current time and date in the narrative of a report. The purpose of this is that when end-users export the report a time and date of export is inlcuded in the export so that I know when specific reports where exported.
    I now have a workaround with added hidden date and time columns and showing only first rows of these hidden columns. This is quite a lot of work since I have to update about 75 reports with this date and time values.
    Does any of you know how to include currentdat and time in the narrative with a html code?
    Or are there other ways to achieve what I am looking for?
    Thanks a lot

    Hi,
    We had similar kind of requirement.
    We have created a repository variable "CurrentDateTime" and added this in each and every report in the narrative view as below.
    Steps:
    1.Leave the existing Table view or chart view as it is.
    2.Add one narrative to the existing report.
    3.Modify the narrative view and paste the below logic in that.
    Current Date: @{biServer.variables.CurrentDateTime}
    Hopes this helps.
    Thanks,
    Pramod

  • Create current date variable at universe level

       Hi Everyone
    I have created report regarding to daily car sales. However there is records registered for further months, 2015 December for instance.
    Actually they are error records, but I can't delete them since data transfer is realizing automatically and updates hourly.
    That is why I have decided to use prompt for report: date is less or equal to current date. But couldn't find way how to create current date variable.
    Please help with this.
    Regards...

    Yes.
    Create an object called Today as:
    cast(convert(char(10),getdate(),23) as datetime)
    Note that it will not parse because it does not reference a table. Don't associate it with a table just to get it parsing as you will then have that table in every query that uses the Today object, whether you want it or not!
    It will work fine when you use it in your query. In your example, create a condition of Ship Date Less Than Or Equal To Today where Ship Date and Today are the names of the two objects. This will then translate into SQL as:
    WHERE orders.ship_date <= cast(convert(char(10),getdate(),23) as datetime)
    This will parse because the table orders is in the statement.
    I hope that is clear.
    Regards,
    Mark

  • How to assign current date/time to a formula variable in Query Designer

    How do I assign the current date to a formula variable in Query Designer? I need to use current data in a calculation and just need the date the report was run.
    Thanks

    Hi Philip,
    There is an SAP formula variable to supply the current date in a formula. I think it is 0F_ADAY...install it from business content if you cannot see it in the query designer (formula box, under formula variables) and try using it.
    Hope this helps...

  • Current date as default date in bind variable (jdev 10.1.3.3.0)

    Hi,
    I would like to initialize a bind variable with current date -7 days
    I saw the post regarding this request but it was for jdev11 and the solution doesn't work in jdev10.
    Have you any idea to do that in jdev10
    Thanks.

    A bind variable used in SQL statement
    It's the same problem discussed in this post : current date as default date
    The only difference is that i'm using Jdev 10 !
    Dan.

  • Default current date in the variable

    Hi Friends,
                     I have developed an Ageing Query. Now the requirement is, as soon as the query is executed, by default the variable should have the current date. I have the restricted Keyfigures as 0-10, 11-25 etc in the Column. Can someone tell me, how to go about it.

    If u want to populate it through variable then-
    Create a formula variable
    In processing by give customer exit.
    Then goto T.code CMOD
    Create a project and assign the component RSR00001 to the project(Do not repeat if already done).
    Open components.
    Goto include of exit.
    Writ the code in include.
    Sample code
    CASE i_vnam.
      WHEN 'DEF_DATE'.
        IF i_step = 1.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          l_s_range-low  = sy-datum.
          APPEND l_s_range TO e_t_range.
       End if
    ENDCASE.
    Then use this variable in the report.
    Assign points if usefull.
    regards,
    Rajendra

  • Create a formula variable using replacement path for current date

    Hi All,
    I created a formula variable using replacement path for current date.
    But when i used this variable am getting an error message saying .
    " This Variable cannot be used in this query".
    Could you please let me know the reason?
    Thanks,
    Zehra

    Hi All,
    Thanks for all your help...
    I just found a solution via the below link
    in Bex Formula variabel, Current calander day(sap exit) missing.
    Here he is trying to use the existing formula variable.
    My doubt here is, Even i could not find this varaible in BEX formula variable, But could see this in BI Content path as mentioned in the above link.  DO i have to transport this varaible , or i simply can activate it in production?
    I just could find this in BI Content but not in MetaData Repository.
    Thanks,
    Zehra

  • Caching Query in Portal - Variable set to System Current Date

    Hi,
    I am facing issue on caching for query in portal in Production. I have query called ABC in production with variable Master valid on for user to chooce the date. This variable is hardcoded value in General Precalculation in variable assigment session. Eg. If i run OLAP Cache today then it will hardcoded to 18.9.2008. I cannot change the production query to set to System current date unless I use new technical name for any changes eg XYZ.
    Can i use different technical name for query in portal eg. XYZ in order to capture master valid default to today date ? I will do Broadcaster - OLA Cache for XYZ and does it also cache for ABC (query in portal)
    The purpose of caching is to happen to query ABC in portal. Please advise.
    PY

    name_in gets the value of the item. So you should use copy.
    copy('',:system.current_block||'.'||:system.current_item)

  • Current date should be populated when executing the hierachy variable.

    Hi bw Pro's
    I have a customer hi-erachy.For that hierachy i created a variable.
    The variable name is hieraachy date.
    the variable will be executed with  user entry/default value.
    the characteristic i used for thata variable is date.
    Now the requirement is the date should be populated with current date when ever i executed the variable automatically
    I thk i need to develop customer exit for this. I am not so comfort with coding.
    can anybody will help me on this issue. suggest me with logic or any further idea.
    any help is appreciated .
    Thanks,
    suri

    Hi Jasprit,
    Below is the erro when i added the code and i restrict the customer exit variable.
    ERRORS:
    INCORRECT FORMAT WITH KEY DATE FOR ELEMENT "43Z6K6807CL51WZ025Q1GPHER"(VALUE "&&" IS INVALID).
    Below is the diagnosis for the error.
    You are using a key date specification in the query. This can be either in the query key date directly or in the key date for a selection or presentation hierarchy. the element, in which this error was found, is called "43Z6KGHDHHJ5VYWJU8UEVBRRK". The invalid value is called "&&".
    System response
    The problem is reported with the check.
    Procedure
    Check the incorrect format in the specified element and correct it.
    Technical name (UID) of the element: "43Z6KGHDHHJ5VYWJU8UEVBRRK".
    I am checking the UID in rsa1> transprot connection>query element-->variable.But system is not showing any UID. Any idead on the above issue.
    Can you please help me in this.
    thanks
    suri

  • Create a BEx variable which should by default contain current date, etc

    Hi,
    I need to create 2 variables: ZDATE01 and ZDATE02.
    They will be used in the following situation:
    0DATETO >= ZDATE01
    and
    0DATEFROM <= ZDATE02
    to only display records on a current "key" date.
    ZDATE01 should be a variable that has current date pre-populated in it on the variable entry screen in BEx Web Analyzer, so that users do not have to type in the date themselves.
    ZDATE02 should be a replacement path variable to be replaced by whatever is the value of ZDATE01.
    How would I accomplish ZDATE01 variable having current date pre-populated in it on the variable entry screen?
    I tried creating ZDATE01 variable with having SAP exit variable as replacement path, but it did not let me.
    Thanks

    Sorry, the previous link was wrong...
    Here you go...
    Current System date in report
    WHEN 'XXXX'.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'YYYY'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = sy_datum.
    clear L_S_RANGE-HIGH.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.

  • I am passing my itab data to variable declared in global declaration.

    Dear All,
                  I am passing my itab data to variable declared in global declaration, i am getting column one data in all eight variables declared. but column two data having 8*10=80 data i.s. for 1 entry of column there is 10 entries of column two of field two ,
    but when i am passing that data to a variable i am getting only 1st entry of column 2 instead of 10 entries, plz help me in solving this query. i am working on Smartform.

    Definetly you will get only one record...
    instead of variable decalre and internal table of type variable definition in the global defination and append the values into it..
    now you will get all the entries which you want..
    Regards
    Satish Boguda

Maybe you are looking for

  • IPhone 3GS w/ iOS4 Not Recognized by Windows or newest iTunes

    I have two friends who have iPhones that will not sync with their computers. Both run Windows XP and iOS4 on iPhone 3GS. One is recognized but cannot sync any calendar items from Outlook 2007. The other one is completely unrecognized by either Window

  • IPhone 5s - Lightning 30 pin 0.2m Apple official adapter is not Woking.

    I have the smaller block type adapter and that works fine and everything works without error. I've just bought the 0.2m extended cable, as I need the extra flexibility and length. However it won't work and just comes up with the following message:  "

  • Moving from Entourage to Mac Mail

    Hey All, I'm moving all of my mail accounts over to mac mail so that when the time comes that I have my iPhone (few months hopefully) all my mail will go to the mac mail app, and thus to my phone as well. First is there a way I can move all of my mes

  • Block GL / cost element to be use in purchase order

    hi expert, i want to ask is there any way to block GL been use in purchase order but in meantime can use in FI posting? I heard can done with cost element block for integration posting? Can any expert advice the detail? Thanks.

  • IPhoto 9.2.3 update is incorrectly shown in App Store

    iPhoto 9.2.3 update.   I can not get this update badge to go away.   I have never purchased iPhoto through the App store so I don't know why it even shows up.  I knew I had updated iPhoto already but wanted to see what it said when I clicked on the u