Date Variable

I have a detail object : =[L01 Sales document Cust. PO. Date (Key)]
which gives data like thsi: #, #, #, 25.10.2010, 23.10.2011, 22,10,2010 etc...
I am creating a variable like this:
=If Not([L01 Sales document Cust. PO. Date (Key)]="#") Then FormatDate([L01 Sales document Cust. PO. Date (Key)];"MM/dd/yyyy")
But it gives error like:
'FormatDate' function uses an invalid Date Type. I went to universe and change this object from 'Character' to 'Date'. But it still gives the same error.
In Bex Analyzer, it comes like 10/27/2010 though...
So, what are my possibilites to do:
1) Should I change the date format settings of WEBI/BO to MM/dd/yyyy ? Where should I do that ? In InfoView or in CMC ? I am also not sure whether I will be allowed to do so?
2) Does the BEx designer need to change the data type to Date ? I cannot see it in BEx whether it is Date/Character ? Does it mean that they need to do at Multiprovider ?
Please advise.

1) Should I change the date format settings of WEBI/BO to MM/dd/yyyy ? Where should I do that ? In InfoView or in CMC ? I am also not sure whether I will be allowed to do so?
Your date is read as string in WebI. Change the data type in the universe back to Character . Use either string manipulating functions at WebI level (eg. substr) or change the language setting of your universe connection. IF  you do not use SSO in your universe connection check the workaround described in SAP note 1503182
2) Does the BEx designer need to change the data type to Date ? I cannot see it in BEx whether it is Date/Character ? Does it mean that they need to do at Multiprovider ?
I assume that your field is defined as DATS or TIMS in the underlying cube. You have to change this at  infoprovider level (Transaction RSA1). This means that you are changing your data model and that you probably have to reload your data.
Regards,
Stratos

Similar Messages

  • Date variable- delivery report

    Hi all,
    In my report, there are two structures designed :- Pending deliveries and Reservation deliveries.
    For Pending deliveries:
    I have used Confirmation Del Date(ZCNFDT) and Open Qty as the restrictions. The Date variable is built upon Confirmation Delivery Date, In selection screen if i input a date as Dec-1, i get the pending qty for week1, week2, week3.
    For Reservation deliveries:
    I am using Requirement Date(ZBDTER) and the Requirement Qty as restrictions.
    My doubt is if i create a variable as ZVAR_BDTER on Requirement date, i will be having another date input in the selection screen, asking for the desired date to be entered. If i enter a date for this date selection then the query will display wrong data.
    According to the Specs, the input date variable must be common for both Pending and Reservations, such that, if i enter Dec 1, it must give the data for both Planning and Reservations.
    I am planning to use 0DATE variable for both of the above structures. Requesting you to suggest on this
    Thanks

    y cant u use 0CALDAY and then create variable for it
    use same 0CALDAY in query design in rows below ur characteristic COMPANY CODE

  • How do i change the $Date variable format on an Ironport ESA to be DD/MM/YYYY

    I have an Ironport ESA running ASyncOS 7.6 and i use the $Date variable in notification emails.  It is currently formatted in the US way of MM/DD/YYYY but we need it to be formatted as DD/MM/YYYY.  Is there any way to do this?  The time zone is correct but i can't find anywhere to modify system variables.

    There doesn't appear to be any way to change the formatting of that variable.  Perhaps you can make use of $Timestamp or $GMTimeStamp instead?

  • 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

  • Calendar prompt for Date variable from bex

    Hi All,
    I have a Bex query where I have a variable on 0CALDAY
    - Customer exit (i_step = 1 to populate with current date)
    - Single value
    - Mandatory
    I created universe on this query and in webI selection screen i do see the variable prompt.
    I am not able to see the current date populated automatically since exit values are not populated to WebI at runtime.
    My problem is that in WebI selection screen we get list of date values from the info provider instead of Calendar prompt
    where user can enter the values directly.
    I am currently on BO XI 3.1 SP3.
    Is there any specific setting in Universe or bex query which is required to get this Calendar prompt instead of list of values for dates?
    Note: When we were on SP1 the universe created then had same variable from bex and it still shows us Calendar prompt but ever since we upgraded to SP3 for the query splitter functionality we not able to get the calendar prompt for date variable in new universe we create
    Thanks
    Ritesh

    Yep.
    Now tell me how you want to show that Prompt @ WebI report level.
    My problem is that in WebI selection screen we get list of date values from the info provider instead of Calendar prompt
    where user can enter the values directly. Exactly, i didn't get this??
    @Prompt:
    You have flexibility to show options like:
    Mono/Multi: User can select Single value or Multiple.
    BW Variable: Same we have (Single/Multiple)
    Free/Constrained: User can Enter his/her value directly or No change option.
    BW Variable: By defalut you will get this, once you made it to Optional input.
    Persistent/Not_Persistent: Refreshed report has to show last selected value means use Persistent otherwise Not_P.
    By seeing the Prompt syntax , I can say your Variable is after Customer Exit, Correct??
    Workaround for your Problem is:
    <FILTER KEY="ZV_DATE"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Date (Previous Day)','A','Date\LovDate (Previous Day)Base',mono,primary_key)"/></CONDITION></FILTER>
    You have to remove that Date class and objects from prompt syntax. Because of that it showing up LOV's not calendar.
    Like:
    <FILTER KEY="ZV_DATE"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Date (Previous Day)','A',',mono,primary_key)"/></CONDITION></FILTER>
    Why, It should be blank??
    Because Date needs no class\object to show up, by default you will get Calendar on the fly.
    Hope you got my point.
    Thank You!!

  • Adding 3 weeks to a Date variable

    Hi,
    In order to levy a fine,it must be calculated,
    it therefore makes sense for the system to check for overdue books.
    in order to use
    if Date.after(dob)=true{
    FINE$
    I must add 3 weeks to the date variable "dob" (date_of_borrow,stored on a database in dd-mm-yy format)
    How do i do it?
    The only other alternatives i have are Calander or milisec-day conversions.I'm unsure on using GregorianCalander & people have advised against milisec.
    (you can see why, in the forum post "Urgent:Html & Servlet").
    Anyway i hope this will work.
    Suggestions anyone?Thanks.
    Aesh83

    is it as easy as saying .getWeek()?Must i set the system date on it or is it anyway default?-
    Here is a something i cooked up ,in a hurry, (HELP!!: How do u use sdk with Kawa editor) ,i'm working in the dark hoping i can find the light..
    Ah here it is-
    int dob2;
    //it suposed to trigger whenever user opens borrow.htm//
    date.format(dd-mm-yy);
    dob.format(dd-mm-yy);
    rs=stmt.excecuteQuery("Select dob from LENT where UserN==User_N");
    LOOP
    getdata into a resultVector
    dob.elementAt(i);
    if Date.after(dob)=true{
    FINE$
    LOOP
    What do u think?Needs improvemnts.
    How do you get System date onto a Date variable?
    Will date.after(Date when) method work when Date variables are in milisecs?
    Thanks & Bye!
    aesh83

  • Assigning date value to a date variable

    Hi,
    How can I hard code a date (09/22/2006) in a date variable?  Help me out.
    Thank you.
    Regards,
    Dhana

    Hi,
    it depends if your input is already parsed and how you want to set the time (hours, etc.).
    Two sample ways :
            String s = "09/22/2006";
            SimpleDateFormat sd = new SimpleDateFormat("MM/dd/yyyy");
            Date date1 = sd.parse(s);
            Calendar c = Calendar.getInstance();
            c.set(2006, 8, 22); //month is zero based
            Date date2 = c.getTime();
    Btw for basic java programming I would suggest searching for some java tutorials on the net and reading on your own instead of posting in forums. At least for me that is better way to learn.
    HTH
    Peter

  • Date variable in BEx

    Hello everyone.
    In my report I have a characteristic type date.
    I made two date variables. In general properties I set them "optional".
    I restricted characteristic by these variables (from - to).
    But on the selection screen one of these variables is obligatory.
    What's wrong?

    I have activated two variables from business content.
    0P_SDO - Start Date (Optional)
    0P_EDO - End Date (Optional)
    I have restricted (Value Ranges - Between) my characteristic (0DOC_DATE) by these variables.
    Result is the same
    On the selection screen I have to fill End Date - mandatory.

  • Date variable in a query

    Hi all,
    Currently I'm working on a query and I'd like to put in a date variable. It has to be a monthly report and I'm building the query for it based on the attribute "TaxDate" (with format DD-MM-YY) from the table "ORDR".
    For the query I'd like to build in a variable where the user can put in the month and year, for instance 01-04. I know how to put in a variable, but how can i solve this problem?
    I thank you in advance!
    Edited by: Chief on Mar 12, 2008 1:23 PM

    Chief,
    The parameters in a SQL Query accepting a date works the same way as you would enter a date on DocDate or DocDueDate field on the form.
    But, you will need to filter the input and take only the Month.
    So test this simple query
    SELECT T0.DocNum AS 'Document Number', T0.DocDate AS 'Posting Date' FROM  [dbo\].[ORDR\] T0  WHERE MONTH(T0.TaxDate) = MONTH('[%0\]')
    Suda

  • Date Variable in Carryover jobs

    Is there a way to lock a date variable, in the parameter, for specific jobs that occasionally carryover? 
    The goal is to keep the date from flipping when a few specific jobs carryover.                  

    Hi Rick!
    you would need to set a variable... remember that parametes are calculated at runtime when the job goes active so you can't use on a job that could potentially carry over... so use a variable that you set like a processing date that flips at 5pm or something then if it did carry over it would retain the date...
    Also don't forget that file dependecies that use variables don't work the same way they calculate at insertion into the schedule (so it knows what to watch for) and that when using dates it can get tricky to make sure they match between dependecy and parameters... especially with jobs that may carry over... which is why we try to avoid wherever possinle
    Good luck!
    Marc

  • Creation of Dynamic Date Variables to be used in WebI reports

    What we are trying to achieve is to create 4 optional filters (Current Day, Current Week, Last Week, Last Month) on 4 different dates which will allow the users to use them in WebI reports.
    When using an optional SAP Customer Exit variable in BEx and creating a Universe on top, the filter becomes mandatory (i.e. the whole Universe is filtered by the SAP Exit, irrespective of whether the filter is used in the WebI report). Even if the filter is flagged as optional at the Universe level, it still behaves as mandatory.
    If each filter becomes mandatory then we'll have to create 16 different Universes (for each optional filter and date combination)! This is not feasible.
    I've seen in other posts that MDX Statements are not currently supported for Universes base on BW and SAP Exit should be utilized.
    So with the existing BO version, is it possible to create optional dynamic date variables or is that a product limitation?
    We are on XI3.1 SP3 FP3.1
    Thanks

    Hi Adam,
    In BEx, I would create this query very easily using the "Amount" key figure twice in my results and restricting each with a different SAP standard out-of-the-box delivered variable. For your reference, the variables in BEx are: 0FPER and 0FYTLFP.
    If I expose these variables in my OLE DB for OLAP query, they are not transfered into the universe, but rather act as filters on the entire universe. I've seen in documentation that only "Ready for Input" variables can be transfered as options into the universe which is not something that I have seen mentioned in this thread.
    >> In the BEx Query you have the option to either make the variable "ready for input" or not. The behavior is the same in Bex or in the Universe / Web Intelligence. "Ready for input" means the user can actually provide an input and without the flag the user can not provide an input. Yes those variables are supported in the Universe.
    Why this is a problem: I can't create separate universes based on potential variable periods that users might want to see. Additionally, many financial reports require concurrent use of these measures in the same report. Also, in reality it's not 2 variables, but dozens.
    >> Which is a decision you make already on the BEx query level. if you decide that the variable is not ready for input then the user can change the timeframe in BEx either.
    Also, I don't have a good way to mimic the standard out-of-the-box functionality given with BEx in BO. If I custom create all my variables in the universe, how do I do a lookup from the system date to the fiscal calendar that is stored on the BW server? In other words, how does BO know which date belongs in which period? (the same would be true with factory calendars for a different functional area).
    >> Variable are created in the BEx query and the Universe will leverage those.
    If you want a dynamic date range then EXIT variable as part of the BEx query - ready for input or not - is the solution.
    regards
    Ingo Hilgefort
    The only work around I can see is to require users to enter the current fiscal period and have the BO reports filter based off that user entered value. This is unfortunate as the entire purpose of SAP Exit variables is to avoid having to require user input at report time.

  • To extract a day from a Date variable

    Hi
    I have a date variable and i want to get the day into a PL/SQL variable.Can you tell me how to do that .
    eg I have 12/30/2002 (MMDDYYY)
    and i want 30 in another variable ..
    Thanks in a advance

    SQL> declare
      2  ln number;
      3  begin
      4  ln := to_char(sysdate, 'DD');
      5  dbms_output.put_line(ln);
      6  end;
      7  /
    22
    PL/SQL procedure successfully completed.
    SQL>
    [pre]
    Piece of cake.  No, thanks, I've just had breakfast.
    APC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can i add one month to a date variable ?

    Unlike the week which always 7 days, month may change from 28 to
    31, so how can i add one month to a date variable ? Thanks in
    advance.

    Adding 365 won't always work because of leap years.
    You could use the following SQL statement:
    SELECT
         TO_DATE(
              TO_CHAR(TO_DATE(SYSDATE), 'DD-MON-') ||
                (TO_CHAR(TO_DATE(SYSDATE), 'YYYY') + 1)) NEXT_YEAR
    FROM
         dual
    NEXT_YEAR
    08-JAN-03Or you could create your own function. You would use this
    exactly like add_months:
    CREATE OR REPLACE FUNCTION add_years
         (v_date DATE, num_years NUMBER)
    RETURN DATE AS
         v_year DATE;
    BEGIN
         v_year := TO_DATE(
                   TO_CHAR(TO_DATE(SYSDATE), 'DD-MON-') ||
                         (TO_CHAR(TO_DATE(SYSDATE), 'YYYY')
                                             + num_years));
         RETURN v_year;
    END;     
    SELECT
         add_years(SYSDATE, 1) new_year
    FROM
         dual
    NEW_YEAR 
    08-JAN-03
    SELECT
         add_years(SYSDATE, -1) new_year
    FROM
         dual
    NEW_YEAR 
    08-JAN-01

  • Error with Date Variable

    I am trying to create a process to import to import data using a date variable but when I use the date to get the data from SQL server I am getting a error.
    I have tried setting the variable as both a string and date - Select
    CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) and map it to the Variable. The date variable is working. It’s correct in the Watch and I am able to use the variable to get data from an Open Link database (row_date = ?)
    in the OLE DB Source query. I get a "Invalid character value for cast specification"
    error when doing the same thing to get data from an SQL Server OLE DB Source
    where the date field is DateTime (row_date = ?). I have tried making the variable as a date and string but get the same error regardless. To make it work, I have to duplicate the date
    calculation in the query - HAVING (row_date = CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) ) which works fine.
    HAVING (row_date = ?) gives the error with the Parameter mapped to the variable.
    Any suggestions as to how to make this work correctly?

    May I suggest to use style 111 instead of 101?
    From experience, yyyy/mm/dd date format will work most of the time for date conversion and
    It's due to different date format from mm/dd/yyyy to the system date format that SQL Server is using.
    Hope this helps.
    ~ J.

  • Not able to access the Date variable in Bex report after SP upgrade

    Hell Experts,
    We have upgraded the support pack to 27 and after that we are not able to access date variable in Bex report.
    We are not able to restrict the Posting date on variable, we are getting the message "Operation failed! No detailed error information from backend available".
    Thanks
    Chetan

    Hi,
    carry out basic checks like RSRV for the field,query ,Infoprovider on which this query is based..
    Check whether there is any in consistent value in the posting date..
    check whether objects are active correctly..
    else serach for SAP note or raise OSS to SAP..
    Thanks and regards
    Kiran

  • How to Include Date variables in the Attachments sent via ibots

    Hi Experts,
    I have a requirement that when i configure an i-bot , i need to get a mail with attachment as an excel say "attname".This is fine,but how to customize such that the attachment contains date variables like "attname_24April2010" when recipients receive the mail?
    Also if this is possible then when i open the attachment, then it should have the title with report name and date variables? Can we achieve this?

    You can put varables in several views in OBIEE (e.g., Narrative, Title, etc.). BTW, in the Title View, you can also use built-in variables that display the run date and time.
    Click on this link to get the syntax:
    http://shivabizint.files.wordpress.com/2008/10/obiee-variables-overview.jpg

Maybe you are looking for

  • RE: Strange Error.

    Tres, Make sure that the following file exist: /adedev1/userapp/daucbri/cl0/DAUBRI.a It might have compiled fine but might have not moved it to the userapp directory. This happens when you load the distribution from econsole. Another thing I noticed

  • WebLogic Server 8.12的SSL认证证书过期?

    我新建了一个WebLogic Server 8.12的域,并且为这个域加上了SSL.但是启动后,控制台出现错误信息,大致意思是"VeriSign, Inc.的证书到2004年1月7日已经过期".好像之前网上流传Symantec的产品也因为证书过期导致了一些问题. 那么,这个WebLogic的问题应该怎么解决呢?高手请现身!

  • FF 6.0 not opening a window from existing page. Typekit kit editor for example.

    If I am on a page such a typekit.com and click on a link to open an additional window, such as the kit editor in typekit, a blank window opens, but the page never loads. Happens on any page with a link to open a new window.

  • 10.4.7 for Intel has been revised...

    According to MacFixIt, the original 'Delta' update from 10.4.6 to 10.4.7 was 'missing a few things...' related to OpenGL performance. This sounds like it could lead to problems one might associate with a QuickTime error. So, if you used the Software

  • Flash player crashing my macbook pro

    I have a late 2007 mbp 3,1. Playing flash video *always* crashes my macbook pro, not immediately but after a few flash player clips. It does not crash the browser but the whole system, and I get a gray screen telling me in different languages I need