How can I use a variable in BEx of type date ?

Hello,
I have an infoprovider with a key figure of type "date" and I want to display for example all the data where the date is lower than a date entered by the user.
So I want to create for that a date variable and use it in conditions.
When I try with "manual entry", I can't get the type "date" : it proposes quantity, amount, number but not date.
When I try with "customer exit", I can get the type "date" but when I get it on the selection screen, the date is seen as a number so it doesn't work.
Does anybody have an idea.
Thanks for your help.
Regards,
Vanessa Roulier

Hi!
if you are using a cube then there will be at least one time char. I think you can just add 0calday to your cube , even if you are not filling it.
  Once this is available in cube  it can be used in query (free chars) where we can define a variable on this 0calday. But we it will not have any effect on query results as you are not storing anything in your query.
then in your conditions you create a variable with USEREXIT type. then in your ABAP code you can access the value stored in variable(which is entered by user) and copy it to the USEREXIT variable. Then your condition works because it is having a date type and the value is date.
I don't see any problem in implementing this scenario.
with regards
ashwin

Similar Messages

  • How can I use environment variables in a controller?

    Hi all,
    How can I use environment variables in a controller?
    I want to pass a fully qualified directory and file name to FileInputStream and would like to do it by resolving an env variable, such as $APPLTMP.
    Is there a method somewhere that would resolve this??
    By the way,Did anyone used the class of "oracle.apps.fnd.cp.request.RemoteFile"?
    The following is the code.
    My EBS server is installed with 2 nodes(one for current,and other is for application and DB).I want to copy the current server's file to the application server's $APPLTMP directory. But the result of "mCtx.getEnvStore().getEnv("APPLTMP")" is current server's $APPLTMP directory.
    Can anyone help me on this?
    private String getURL()
    throws IOException
    File locC = null;
    File remC = new File(mPath);
    String lurl = null;
    CpUtil lUtil = new CpUtil();
    String exten;
    Connection lConn = mCtx.getJDBCConnection();
    ErrorStack lES = mCtx.getErrorStack();
    LogFile lLF = mCtx.getLogFile();
    String gwyuid = mCtx.getEnvStore().getEnv("GWYUID");
    String tmpDir = mCtx.getEnvStore().getEnv("APPLTMP");
    String twoTask = mCtx.getEnvStore().getEnv("TWO_TASK");
    // create temp file
    mLPath = lUtil.createTempFile("OF", exten, tmpDir);
    lUtil.logTempFile(mLPath, mLNode, mCtx);
    Thanks,
    binghao

    However within OAF on the application it doesn't.
    what doesnt work, do you get errors or nothing ?XX_TOP is defined in adovars.env only. Anywhere else this has to go?
    No, it is read from the adovars.env file only.Thanks
    Tapash

  • How can we use Session Variable in Answers or Analysis?

    How can we use Session Variable in Answers or Analysis?

    Again, duplicate cross-posting!
    See rukbat 's post here: Re: BI Apps 7.9.6.3(Agent Issue)

  • How can we  use java variable in javascript code on JSP page?

    How can we use java variable in javascript code on JSP page?
    Pls help

    Think about it:
    JSP/Java is executed on the Server and produces HTML+JavaScript.
    Then that HTML+JavaScript is transfered to the client. The client now interpretes the HTML+JavaScript.
    Obviously there's no way to access a Java variable directly from JavaScript.
    What you can do, however, is write out some JavaScript that creates a JavaScript variable containing the value of your Java variable.

  • How can I use the Variable Delay VI (From DSP Module) to Deploy Variable Delay on Speddy-33

    Dears,
    I dont Understand How Can I Use the Variable Delay to Deploy Variable Delay on a Speedy-33 Kit

    Hello,
    Thank you for posting to the NI Forums!! You should be able to incorporate the Variable Delay.vi into your vi and then build as normal and the functionality of the vi should translate to the build. What type of build are you doing? Are you receiving any specific errors? Thanks!
    Regards,
    Margaret Barrett
    National Instruments
    Applications Engineer
    Digital Multimeters and LCR Meters

  • How can i use substitution variable

    Hai All
    This is my sql statement
    SELECT (TO_DATE(TO_CHAR(Intime,'DD-MON-YYYY')||' '||
    TO_CHAR(0815,'0000'),'DD-MON-YYYY HH24:MI')-intime) * 24*60
    from dail_att where to_char(intime,'hh24mi') between 0700 and 0815 ;
    Here my table name called Dailyattendance
    Intime field is declared as Date Type
    So now i have hardcoded 0815 and now my intime is subtracted from this time so i can calculate the employee
    coming late so how can i use substitution variable here to give the value at run time
    Ie i need to give 0815 instead or any other time at runtime
    Thanks In advance
    Srikkanth.M

    Where exactly are you planing to use it? Is sqlplus or at any other front end?
    One way is to use below given SQL
    SELECT   (  TO_DATE (   TO_CHAR (intime, 'DD-MON-YYYY')
                         || ' '
                         || TO_CHAR (:TIME_VAR, '0000'),
                         'DD-MON-YYYY HH24:MI'
              - intime
           * 24
           * 60
      FROM dail_att
    WHERE TO_CHAR (intime, 'hh24mi') BETWEEN 0700 AND 0815;*009*
    Edited by: 009 on Apr 6, 2010 2:15 AM

  • How can I use jbo:InputSelect for a char type filed?

    How can I use <jbo:InputSelect for a char type filed?
    I have two tables. One is room (primary key is room(type is char)), another table is responsibility (foreign ker is room(type is char)). Both tables have same length for room column.
    There is a problem:
    If I use (in the "DataEditComponent.jsp" file)
    <jbo:InputSelect multiple="false" datasource="dsEdit" displaydatasource="roomData" displaydataitem="ROOM" displayvaluedataitem="ROOM" ></jbo:InputSelect>
    to get the room input for responsibility from combobox(Datasource roomData is from room table). In the form the room field cannot bind the data in combobox, alway select the first item. And if I select one item and click the update button.There is an error message:
    Error Message: JBO-27010: Attribute set with value H409 for Room in Responsibility has invalid precision/scale
    I found If I changed the field type from char to varchar2 in database also change the entity objects, it works well. I wonder if there are any diffrence using <jbo:InputSelect tag in char and varchar2 type. How can I use <jbo:InputSelect for a char type filed as i don't want to change my datatype in database at this stage.
    I try this in JDeveloper 9.03, 9.034, 9.04. The result is the same.

    If I were in your shoes, here's how I would do it:
    <%-- Assuming you have dsRoom and dsResponsibility --%>
    <%-- Select is an HTML tag --%>
    <select name="ROOM" size="1">
    <% char roomID =""; // Init your character var
    // Open a rowsetIterator to get the records and add them to the LOV
    <jbo:RowsetIterate datasource="dsResponsibility" changecurrentrow="true" >
    <% roomID = (char)dsResponsibility.getRowSet().getCurrentRow().getAttribute("ROOM"); // Grab the char value
    // add the value to the LOV
    %>
    <option value="<%=roomID%>"><%=roomID%></option>
    </jbo:RowsetIterate>
    </select>
    If you are using this as part of an edit page you may want to utilize the "selected" option of the <option> tag. In one instance I am doing this on an edit page because the use may open an existing record. If I don't account for it, then it will change the DB to contain the first value from the list! You can do a simple check like:
    //Set the current record's char
    char curRecord = (char)rowEdit.getAttribute("ROOM");
    // inside the iterate:
    if (curRecord == roomID) {
    <option value="<%=roomID%>" selected><%=roomID%></option>
    } else {
    <option value="<%=roomID%>" ><%=roomID%></option>
    Hope that helps!

  • How Can I use a Variable  in Data Controls query. Frank Kindly check...

    Hii,
    I am using JDeveloper 11g ADF BC.
    My Requirement is that I hv a login screen which is taken from [http://blogs.oracle.com/shay/simpleJSFDBlogin.zip].
    I hv attached BC in this application. I want to use the login usercode in the next pages after login screen. Next screen contains 3 list items which will be populating based on the user. So I created &lt;af:selectOneChoice&gt; using the BC( Just drag & dropped the column into the page from the data controls). But in the data control i want to use this usercode for passing the condition. Now Data is coming without any condition.
    So How can I use the usercode in the Data controls query.
    When I tried to display the usercode in the next page it is showing by binding the value. its code is follows
    &lt;af:outputText value="#{backing_getUser.uid}"
    The program for checking the username & Password is follows.
    package login.backing;
    import oracle.adf.view.rich.component.rich.RichDocument;
    import oracle.adf.view.rich.component.rich.RichForm;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.component.rich.layout.RichPanelFormLayout;
    import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
    import java.sql.*;
    import java.util.List;
    import java.util.Map;
    import oracle.adf.view.rich.component.rich.output.RichMessage;
    import oracle.jdbc.OracleDriver;
    public class GetUser {
    private RichInputText uid;
    private RichInputText pid;
    private RichCommandButton commandButton1;
    private RichInputText inputText1;
    private RichInputText inputText2;
    public void setUid(RichInputText inputText1) {
    this.uid = inputText1;
    public void setPid(RichInputText inputText2) {
    this.pid = inputText2;
    public RichInputText getUid() {
    return uid;
    public RichInputText getPid() {
    return pid;
    public void setCommandButton1(RichCommandButton commandButton1) {
    this.commandButton1 = commandButton1;
    public RichCommandButton getCommandButton1() {
    return commandButton1;
    public String login_action() {
    // Add event code here...
    String user = this.getUid().getValue().toString();
    // String pass = inputText2.getValue().toString();
    String pid = this.getPid().getValue().toString();
    Connection conn;
    conn = getConnection();
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery ("SELECT usercode FROM guser where usercode = '"+user.toUpperCase()+"' and pwd=F_TEST('"+pid.toUpperCase()+"')");
    if (rset.next()) {
    conn.close();
    return "good";
    conn.close();
    } catch (SQLException e) {
    System.out.println(e);
    return "bad";
    public static Connection getConnection() throws SQLException {
    String username = "ACCTS";
    String password = "ACCTS";
    String thinConn = "jdbc:oracle:thin:@SERVER1:1521:G5PS";
    DriverManager.registerDriver(new OracleDriver());
    Connection conn =
    DriverManager.getConnection(thinConn, username, password);
    conn.setAutoCommit(false);
    return conn;
    public void setInputText1(RichInputText inputText1) {
    this.inputText1 = inputText1;
    public RichInputText getInputText1() {
    return inputText1;
    public void setInputText2(RichInputText inputText2) {
    this.inputText2 = inputText2;
    public RichInputText getInputText2() {
    return inputText2;
    -----

    Hi,
    I didn't look at the example, but if you want to secure your application then you should use container managed security. Read this .
    Anyway, you could add this before return "good"; in your login_action()
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("username", user);Then, you can access this from anywhere in the application by using #{sessionScope.username}.
    Pedja

  • How can I use local variable in LabVIEW-Action?

    Hi All!
    There is local variable (for example "MyVariable") in local scope of project. There is Action-step, created by LabVIEW. One of input terminals step is "Sequence Context".
    How can I access to MyVariable by Sequence Context? Unbundle? It does't work.
    Thank you.

    On the TestStand palette there is a VI called TestStand - Get Property Value.vi.  Use that.  Attached is an image showing how to use it.  The trick is making it produce the correct data type.  Do that by right clicking on the VI and selecting Select Type.  Then you can choose the type.  I think in LV 2010 and TS 2010 it is a polymorphic VI and you can just change it.  I wrote an example here for Chaz: http://forums.ni.com/t5/NI-TestStand/How-to-execute-two-steps-in-parallel/td-p/1449874
    It's the second example that's attached.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    AccessLocalVar.JPG ‏67 KB

  • How can I use a variable for an interface log and error fle

    I want to use a variable for the interface's log and error file so that when I migrate from Dev to QA to Prod I don't have to do a lot of editing.
    Specifically on the "flow" tab for the "target", I want a variable to be the first part of the path for the log (\\sundev1\fnd1-hypd1) and join this with the rest (\update\log\logfile.log) within the LOG_FILE_NAME field.
    Thank you!

    Hi,
    It is quite simple....
    just use the <%=odiRef.getSchemaName("D")%> before the file name and configure both path in the topology linked to each context.

  • Can we use session variables in BI publisher's Data Model SQL Query?

    Hi Experts,
    We need to implement Data level security in BI Publisher 11g.
    In OBIEE we do so by using session variables, so just wanted to ask if we can use the same session variables in BI Publisher as well
    ie can we include the where clause in the Data Models SQL Query like
    Where ORG_ID = @{biServer.variables['NQ_SESSION.INV_ORG']}
    Let me know your views on this.
    PS: We are implementing EBS r12 security in BI Publisher.
    Thanks

    Read this -> OBIEE 11g: Error: "[nQSError: 23006] The session variable, NQ_SESSION.LAN_INT, has no value definition." when Creating a SQL Query using the session variable NQ_SESSION.LAN_INT in BI Publisher [ID 1511676.1]
    Follow the ER - BUG:13607750 - NEED TO BE ABLE TO SET A SESSION VARIABLE IN OBIEE AND USE IT IN BI PUBLISHER
    HTH,
    SVS

  • How can I use a READ statement for the checking date =sydatum?

    Hello,
         I need use a READ statement on an internal table ITAB (with feild var1) and check whether feild var1<= sydatum(i.e. var1 greater than or equal to sy-datum)....how can I implement this??
    Regards,
    Shashank.

    Hi,
    try this short example.
    DATA: BEGIN OF ITAB OCCURS 0,
            DATE LIKE SY-DATUM,
          END   OF ITAB.
    ITAB-DATE = '20000101'. APPEND ITAB.
    ITAB-DATE = '20010101'. APPEND ITAB.
    ITAB-DATE = '20020101'. APPEND ITAB.
    ITAB-DATE = '20030101'. APPEND ITAB.
    ITAB-DATE = '20040101'. APPEND ITAB.
    ITAB-DATE = '20050101'. APPEND ITAB.
    ITAB-DATE = '20060101'. APPEND ITAB.
    ITAB-DATE = '20070101'. APPEND ITAB.
    ITAB-DATE = SY-DATUM.   APPEND ITAB.
    ITAB-DATE = '20080101'. APPEND ITAB.
    LOOP AT ITAB WHERE DATE < SY-DATUM.
      WRITE: / 'before', ITAB-DATE.
    ENDLOOP.
    LOOP AT ITAB WHERE DATE = SY-DATUM.
      WRITE: / 'equal ', ITAB-DATE.
    ENDLOOP.
    LOOP AT ITAB WHERE DATE > SY-DATUM.
      WRITE: / 'after ', ITAB-DATE.
    ENDLOOP.
    Regards, Dieter

  • How can I use a variable in webi query filter

    I created a webi report using the fiscal year/month(period) field as a filter to show a window of 18 periods.  The report works just as requested using a between filter on fiscal period with prompts for both the start and ending periods.  Now I'd like to calculate the start period based on what was entered in the prompt for the ending period (e.g. enter 201106 for the TO prompt on the between statement and have the FROM statement filled in as 201001.)  I can create variables in the report to display both the user response to the ending period prompt and the calculated starting period, but I cannot figure out how to incorporate that calculated starting date into the FROM side of the between query filter.
    Any suggestions? 
    Thanks,
    Doug
    Sorry I got my froms and to's mixed up in the first draft. Edited by: Doug Roswold on Mar 4, 2011 6:27 PM

    Let me understand what you want to do.  You don't want to use two prompts, just one, insn't it?
    I mean, instead of:
    Filter area:
    Date between "From prompt" to "To Prompt"
    You want something like:.
    Filter area:
    Date between Variable  to "To Prompt"
    if I'm not wrong that's not possible to achieve in Webi Query  Panel.
    Can you modify your universe? The only way to achieve it is modifying your universe, creating your formula in the universe and assigning it to an object, so you can use this new object in your filter area like this:
    Date between MyUniverseObject  to "To Prompt"
    Edited by: PadawanGirl on Mar 4, 2011 8:15 PM

  • How can I use a variable as an array's name?

    Ok I have several arrays in my code (lets call them "array1", "array2" etc) and I want to load them based on the users input. So if the user enters array1, I want the first array to be loaded, and the same with the other arrays.
    I tried saving the user's input on a string variable called ARRAY_NAME, so that each time the user enters a different array name, the corresponding array is loaded. Something like this:
      ARRAY_NAME[c1][c2]; but I get this error:
    array required, but java.lang.String found
              ARRAY_NAME[c1][c2];
    ___________^
    Can you please tell me what is the correct way of doing it?
    Thanx!

    The short answer is you can't. An object name can't be
    variable and must be known at compile time. But you
    could associate the user input name with a particular
    array, for example, using a HashMap with the user name
    as the key to an array. However, you'd need to use a
    container class (Vector, ArrayList, etc.) rather than
    a raw array, because containers only take class
    instances as elements.Maps can't deal with primitives, that is true. However, arrays are full scale objects, so they can be put into maps.
    Also, my code had a bug in it. Try this:
    int userIndex = getUserIndex();
    String userInput = getUserInput();
    Field array = getClass().getDeclaredField(userInput);
    Object item = Array.get(array.get(this), userIndex);

  • How can we use  form variable in where clause while personalization

    Dear,
    I have a requirment for using select in personalization, actully we have created temporary table, now we want to get data from select satatement on event"when-new-record-instance' trigger, now in action tab i have selected action which is property and message, in message column showing value "${item.q_res.transaction_id.value}" it shows on validate button but when this form variable use in action type(property) which is consist on select statement "=SELECT to_char(QTY) FROM TEST_TABLE where transaction_id = ${item.q_res.transaction_id.value}" system didn't get value pressing validate button although there is a single record in customize table while without where cluase was getting data perfectly.
    please advice.

    >
    I am looking for to decode the actual db value something in different for my report.
    like if A then Accepted
    elseif R then Rejected
    elseif D then Denied
    these conditions I have to check in where clause.
    >
    what are you trying to do?
    may be you are looking for
    select * from tab1,tab2
    where a.tab1 = b.tab2
    and
       (decode(:code, 'A','Accepted') = <table_column>
        or
        decode(:code, 'R','Rejected') = <table_column>
       or
        decode(:code, 'D','Denied') = <table_column>
       )

Maybe you are looking for

  • Printing causes Office 2013 applications to crash

    We've a fresh installed Windows 8 Pro and Office 2013. Printing works correctly in every application but Office 2013. Word, Excel, Outlook - printing causes the application to crash. Any idea if this is a known issue? Regards. Peter Peter Van Keymeul

  • Disk Utility and Disk Repair function

    I ran the "Verify" function on the hard drive and came up with an Error, but can't figure out what to do next. The option of "Disk Repair" is grey. I found an older discussion about the specific error message - "Incorrect size for file YellowPushBtn_

  • Remove the comment time stamp in a PDF document

    Does anyone know what's the best way to remove the comment time stamp from a document? thanks

  • WLC AP Failover Priority

    We use WCS to migrate AP's to "backup" controllers prior to making changes to our primary wireless controllers. However, this process is long and arduous when your AP's number in the hundreds, a 5-minute failover per AP can take hours. Changing the f

  • Table of contents missbehaving

    Hello, I always seem to encounter the same problem when setting-up the TOC of multi chapter books. When I generate my TOC, the Heading 2 (flow A) title which is at the top of the page, always ends up placed after my Sideheads (flow B) which are lower