Reset/Initialize variables in SAPui5

Dear All,I
Is there a way to initialize/reset all declared SAPUI5 variable (ex: Textfield values / Table data) all at once when an event triggered ? ex : on Buttonclick?
Plz help

Hi Tharu,
You can bind the values of your controls to a model like this?
And restore the values of the model if you want to reset/initialize them.
Thanks
-D

Similar Messages

  • How reset a variable into a BPM process

    Hi all,
    I'm trying to reset a variable(process data object) using a Script task into a BMP 11g process...but no luck.
    The variable is used many time as a counter and I need to initialize it with a predefinite value.
    Can you tell me how can I do that?
    Thanks.
    Fairlie

    Hi Fairlie,
    Is it the counter used within the context of a single work item instance?  Is it that you're having trouble getting the value of the predefined value?
    Dan

  • Resetting a variable deletes cache in all subject areas.

    I have a static variable as maxdatadate which I use in only one BM LTS to filter data. (There are about 30 BMs in the repository) When I reset this variable to a new date, I lose cache related to all the BMs. Has anyone experienced the same? Version is 7.8.4. Is this corrected in newer versions?
    Thank You

    No need to available it , you just need to use it using expression where ever it is possible.
    Check this http://docs.oracle.com/cd/E23549_01/bi.1111/e10540/variables.htm
    To keep it Physically as you need you may need to create a new logical column Time Logical table in BMM and then use expression as repository variable and put that column in all subject areas
    ~ http://cool-bi.com

  • Could not initialize variable. An error occurs while initializing BPEL .

    I have the following error:
    **Could not initialize variable. An error occurs while initializing BPEL variable inputVariable; the schema processor cannot find the element {http://xmlns.oracle.com/MRTApplicationWorkflow/Project1/BPELProcess1}processRequest in the following schemas: oracle.fabric.common.wsdl.SchemaManager@e92e05. The XSD element on which the variable was based was not properly defined in XSD or the WSDL. Ensure that the element named in the error message is valid in the XSD or the WSDL.**
    My process input xsd below:
    <?xml version="1.0" encoding="UTF-8"?>
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/MRTApplicationWorkflow/Project1/BPELProcess1"
         xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:q1="http://schemas.datacontract.org/2004/07/WM.Services.MRTPortfolioService.BusinessObjects">
    <import schemaLocation="MRTWorkflowService.svc_xsd_xsd2.xsd"
    namespace="http://schemas.datacontract.org/2004/07/WM.Services.MRTPortfolioService.BusinessObjects"/>
    <element name="processRequest">
              <complexType>
                   <sequence>
                        <element name="institutionid" type="int" />
    <element name="brokerid" type="long"/>
    <element name="accountid" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="processResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="q1:ArrayOfMRTProposedOrder"
    />
                   </sequence>
              </complexType>
         </element>
    </schema>
    Please help me with this isssue.
    I am using BPEL 2.0.

    Please check your XSD and dependant XSD's whether it contains any special characters.
    I solved the same issue in my BPEL process by commenting the special characters included in <documentation> element of XSD.

  • How can i initialize variables and append variable in bpelx:exec

    I want to know how to initialize variables in bpelx:exec.
    I try to use java embedded activities for dynamic sql query. But I meet some problems that cannot assign the data to tempVariable. because I don't initialize tempVariable. but I can't initial variables in java embedded actitvities. How can i initialize variables in bpelx:exec ?
    and I want to know to extend child Elment of tempVariables dynamically in bpelx:exec ?
    here is my source.
    <bpelx:exec name="callEmpDB" language="java" version="1.5">
    <![CDATA[
    String url = "jdbc:oracle:thin:@127.0.0.1:1521:wonchoi";
    String user = "scott";
    String passwd = "tiger";
    int index = 1;
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    Node node = null;
    try{                             
    conn = DriverManager.getConnection (url, user, passwd);
    stmt = conn.createStatement();
    String wherescript = "";
    Element empno = (Element)getVariableData("inputVariable","payload", "/client:selConnectDBProcessRequest/client:empno");
    Element ename = (Element)getVariableData("inputVariable","payload", "/client:selConnectDBProcessRequest/client:ename");
    Element job = (Element)getVariableData("inputVariable","payload", "/client:selConnectDBProcessRequest/client:job");
    Element deptno = (Element)getVariableData("inputVariable","payload", "/client:selConnectDBProcessRequest/client:deptno");
    String sql = "select empno, ename, job, mgr, hiredate, sal, comm, deptno from emp where 1 = 1 ";
    if(empno != null && empno.getTextContent() != null && !empno.getTextContent().equals("") )
    wherescript = wherescript + " and empno = " + empno.getTextContent() ;
    if(ename != null && ename.getTextContent() != null && !ename.getTextContent().equals("") )
    wherescript = wherescript + " and ename like '" + ename.getTextContent() +"' " ;
    if(job != null && job.getTextContent() != null && !job.getTextContent().equals("") )
    wherescript = wherescript + " and job = '" + job.getTextContent() +"' ";
    if(deptno != null && deptno.getTextContent() != null && !deptno.getTextContent().equals("") )
    wherescript = wherescript + " and deptno = " + deptno.getTextContent() ;
    sql = sql + wherescript;
    System.out.println("sql : "+sql);
    rs = stmt.executeQuery(sql) ;
    while (rs.next())
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:EMPNO", rs.getString("empno"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:ENAME", rs.getString("ename"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:JOB", rs.getString("job"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:MGR", (rs.getString("mgr")==null? "": rs.getString("mgr")));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:HIREDATE", rs.getString("hiredate"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:SAL", rs.getString("sal"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:COMM", rs.getString("comm"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:DEPTNO", rs.getString("deptno"));
    index++;
    }catch(SQLException sex){                          
    System.out.println("sql error");
    }catch(Exception ex){                             
    System.out.println("error");
    }finally{                             
    try{                      
    rs.close();
    stmt.close();
    conn.close();
    }catch(Exception ex){}
    }]]>
    </bpelx:exec>
    and here is tempVariable examples and schema.
    <tempVariable>
         <part name="payload">
              <selEmpOutputCollection>
                   <selEmpOutput>
                   <EMPNO/>
                   <ENAME/>
                   <JOB/>
                   <MGR/>
                   <HIREDATE/>
                   <SAL/>
                   <COMM/>
                   <DEPTNO/>
              </selEmpOutput>
              <selEmpOutputCollection>
         </part>
    </tempVariable>     
    <xsd:element name="selEmpOutputCollection" type="selEmpOutputCollection"/>
    <xsd:element name="selEmpOutput" type="selEmpOutput"/>
    <xsd:complexType name="selEmpOutputCollection">
    <xsd:sequence>
    <xsd:element name="selEmpOutput" type="selEmpOutput" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="selEmpOutput">
    <xsd:sequence>
    <xsd:element name="EMPNO" type="xsd:decimal" nillable="true"/>
    <xsd:element name="ENAME" type="xsd:string" nillable="true"/>
    <xsd:element name="JOB" type="xsd:string" nillable="true"/>
    <xsd:element name="MGR" type="xsd:decimal" nillable="true"/>
    <xsd:element name="HIREDATE" type="xsd:dateTime" nillable="true"/>
    <xsd:element name="SAL" type="xsd:decimal" nillable="true"/>
    <xsd:element name="COMM" type="xsd:decimal" nillable="true"/>
    <xsd:element name="DEPTNO" type="xsd:decimal" nillable="true"/>
    </xsd:sequence>
    </xsd:complexType>
    thanks

    My bpel project flow is as follows.
    First, I initalize the temp varialbe like this.
    <assign name="setInitialVar">
    <copy>
    <from>
    <ns1:selEmpOutput xmlns:ns1="http://lgesoa.lge.com/EmpSpec/types">
    <ns1:EMPNO/>
    <ns1:ENAME/>
    <ns1:JOB/>
    <ns1:MGR/>
    <ns1:HIREDATE/>
    <ns1:SAL/>
    <ns1:COMM/>
    <ns1:DEPTNO/>
    </ns1:selEmpOutput>
    </from>
    <to variable="tempVariable" part="payload"
    query="/ns1:selEmpOutputCollection/ns1:selEmpOutput"/>
    </copy>
    </assign>
    Second, get Data(ex. 10 Employee Information List) from DB for useing Java embedded activity.
    Third, assing employee info to tempVariable, then BPEL assign just only one Employee Information. and next data can't assign and the BPEL make an error.
    here is my error message..
    <2007-03-02 11:23:26,125> <ERROR> <default.collaxa.cube.engine> <BPELXExecLet::setVariableData>
    com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
    messageType: {null}
    parts: {{summary=oracle.xml.parser.v2.XMLElement@15f80b}}
         at com.collaxa.cube.xml.dom.DOMUtil.copy(DOMUtil.java:536)
         at com.collaxa.cube.engine.ext.BPELXExecLet.setVariableData(BPELXExecLet.java:721)
         at com.collaxa.cube.engine.ext.BPELXExecLet.setVariableData(BPELXExecLet.java:700)
         at bpel.selconnectdb.ExecLetBxExe4.execute(ExecLetBxExe4.java:160)
         at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__executeStatements(BPELXExecWMP.java:49)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3271)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1697)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:269)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5244)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1083)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:132)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:161)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    I analyzed the problem. and I find the reason that is I just assing one XML flag to the temp variable. If i don't initalize the varaible like first step, BPEL make an error above error message.
    thanks
    Won.

  • Resetting a variable in an event structure (dynamic event)

    I'm working on moving an event structure into a sub VI. This means I have to register dynamic events. 
    The event structure is handling some button clicks. The state of the button (mechanical action = latch when released) resets itself automatically as long as the variable is placed within the value change case.  Leaving the button in this case is not possible when the event structure is put in a sub VI and the variable is located in the parent VI.  How do I make sure the button unlatches after clicking on it?  I have attached an example where all the code is in one VI (the local variable must be moved outside the event structure in order for it to be moved into a sub VI).  Any ideas?
    If you open the VI and run it, you can click Start which will cause the counter to start incrementing.  The button only unlatches as long as the variable is located in the value change case.
    (Btw, how do you put images inline in a post?)
    Rob
    LV2011,LV2012,LV2013
    Attachments:
    img.png ‏18 KB
    main.vi ‏17 KB

    Race conditions are the primary reason not to do that. But since your treating your variable as a latch, I doubt your using the value you read from it anywhere, and in that case it can't create a race condition. There's also the possibility that the control's reference could become invalid. But since this is a sub VI of the control's VI that can't happen (even if it could you can check the error out of the value property node to see when it happens and deal with it).
    I'm not sure about the flickering, Since I can't seem to duplicate it with a simple test case on my machine. It might related to whatever else you're doing in the event apart from reseting the value to false.

  • Using Decode to initialize variables.Help please

    I need to initialize a variable to a value of Y or N
    depending upon the argument passed in the function.
    If the argument has the value 'Y',the variable in
    the function is set to Y else it is set to N.
    For this,I'd like to use the DECODE statment.
    Can anyone please help me please?
    CREATE OR REPLACE FUNCTION generate_type(
            a_cmpy_num              NUMBER,
            a_boolean               VARCHAR2
    RETURN VARCHAR2
    AS
       v_boolean              VARCHAR2(1) := Could be Y or N depending upon
                                             argument a_boolean?
                                             How to use the DECODE function here?
    BEGIN
    END;Invoke the function by
    generate_type(1,'Y');

    Because he only wants Y if it is Y and he wants N if it anything else, like G.
    So he would do something like
    v_boolean varchar2(1) := 'N';
    begin
      if a_boolean := 'Y' then
        v_boolean := 'Y';
      end if;

  • How to initialize variable? (ArrayList String [])

    How to initialize this variable correctly, without getting a type safety warning?
    ArrayList<String>[] var = ?
    Thanks & Best regards,
    Kristian
    Message was edited by:
    Kriskra

    I need to use an array in this case... Thanks for
    your advice anyway...And the answer still is arrays and generics don't mix so your request is impossible without ignoring the warning.
    Try@SuppressWarnings("unchecked")
    ArrayList<String>[] var = new ArrayList[10];

  • Setting Scale Markers On Charts Based on Initialization Variables

    I'm currently building a chart and would like to set scale markers based on some variables I have created in an initialization block.
    I've tried setting a variable expression for the scale marker and using the name of the variable, but it's not showing on the chart.
    Any suggestions?

    Thanks for the suggestion, but that is not really feasible.
    Maybe there is a better way to do it though, my problem is that I want to color code sections of my chart based on various statistical data.
    I've created several SQL queries to get this information and am currently populating repository variables with the data.
    I'm aware that I can use the queries directly in the scale marker customization window, but given the volume of what I'm processing this may cause slowdowns in displaying the data ( and also cause needless repetition in the queries)

  • How to reset a variable in RTF templete.

    Need help on this.
    I have a template where i declared a variable(FORMAT_Sal) like this
    <?variable:FORMAT_Sal ;format-number(number(PRO_SAL), '###,###,###,###,###,###,##0.00')?>
    and i am calling the variable(FORMAT_Sal) as show below
    <?xdofx:truncate(ltrim($FORMAT_Sal) ||'/'||P_BASIS , 30)?>
    for the whole templete, i have only one main group <?for-each:invoice?> the variable is not getting reset for each group, it is taking the value of first group.
    <invoice>
    <PRO_SAL>32.892</PRO_SAL>
    </invoice>
    <invoice>
    <PRO_SAL>40</PRO_SAL>
    </invoice>
    <invoice>
    <PRO_SAL>59.326</PRO_SAL>
    </invoice>
    my variable is taking the 32.89 and repeating the same value for all the invoices(group).
    i tried by using variable@incontext and variable@section while declaring it, but it is throwing the variable not found error while previewing.
    thank's in advance.

    Hi Sandy,
    can you paste the entiire xml and put the for loop and the location where you use this variable

  • Resetting presentation variable set by prompt

    Say I have 2 prompts, State and City, driven by a single go button. The State prompt sets a presentation variable called STATE_VAR and the City column prompt filters its choice list values based on the STATE_VAR and sets its own presentation variable CITY_VAR when the user selects a choice from the list. Both prompts have defaults - the STATE_VAR prompt defaults to a specific state on initial page load and the CITY_VAR defaults to nothing (None option in the prompt dialogue).
    This issue I want to solve is resetting the CITY_VAR presentation variable to nothing (as per the default None option in the prompt dialogue) when the user selects a different state in the State prompt. The sequence I want to achieve is listed below.
    1) On page load STATE_VAR and State prompt choice are set to Michigan and both the CITY_VAR and City prompt are set to nothing (blank option)
    2) User selects Detroit as one of the cities in the City prompt and clicks the GO button.
    3) On page load, the STATE_VAR presentation variable and corresponding State prompt are set to Michigan, but now the CITY_VAR and City prompt are now set to Detroit
    4) User selects a different option in the State prompt, say Nebraska, and clicks on the GO button
    5) On page load, the STATE_VAR presentation variable and corresponding State prompt are now set to Nebraska, however, the default selected option in the City prompt and corresponding CITY_VAR presentation variable are still Detroit though the choice list now contains different values.
    Is there anyway to reset both the CITY_VAR and City prompt to the default nothing (None) selected state, essentially resetting the presentation variable?
    Thanks.

    i am afraid .. you wont be able to achieve this...
    The best thing that you can do is to check the constrain checkbox in the city prompt..
    Thanks
    Ashish

  • Multiple calls of same function module do NOT initialize variables ?

    Hi all,
    ..so its my fist post here, this is a bit strange problem for me and maybe someone knows whats happening.
    So I have in SAP Solution Manager a function module 'Z', which calls a standard SAP class CL_SPROJECT_SOLAR_BASE_REPORT, which in turn calls the standard function module 'SPROJECT_GET_ADMIMP_SCREEN_BP'.
    During development, things worked fine, but now I run my Z-Program for more than one instance and even I do all FREE for the Class, apperently the function module SPROJECT_GET_ADMIMP_SCREEN_BP, which is called by the class CL_SPROJECT_SOLAR_BASE_REPORT, does not get it's variables from the global data of the function pool re-initialized, when it is called for the second, 3rd, ... time.
    This is a bit strane behavior for me, I would have expected that variables in a function module (or even in the global data of that function pool) get re-initialized each time that function module is called ?
    Actually, this is the only function in that function pool.
    Well, if not, does anyone has an idea how I can get the variables of this module pool re-initialized between the calls ? More concrete, the global data of function pool SAPLSPROJECT_SOLAR_ADMEVAL_BP define:
    DATA: g_v_with_var TYPE char1.
    In the function module line 36 (no reference to g_v_with_var, no module call, no changes to g_v_with_var before the IF-statement at all) it is querying:
      IF g_v_with_var IS INITIAL.
    So this is my problem, the second time I am calling the class  (which is 'free'ed and re-created between the calls) which calls this function module the 'g_v_with_var' is not initial and there seems to be no way to have it set to initial again ?
    So even thought this is in SolMan, I think the question & problem is a ABAP technical one ?
    Any thoughts, help or support would be very much appreciated,
    thank so much,
    Frank

    Hi Mae,
    ..thanks a lot for your fast reply, unfortunately there is only one function and no functions or forms at all for initializing. The variable I am fighting with is g_v_with_var and that is referenced only 4 times in the whole function pool:
    Global Data:   101 DATA: g_v_with_var TYPE char1.
    Function Module SPROJECT_GET_ADMIMP_SCREEN_BP (which is the only function module):
        36   IF g_v_with_var IS INITIAL.
       127       g_v_with_var = airep_true.
       193         CLEAR g_v_with_var.
    If in line 36 g_v_with_var is 'X', which it is always after the first call, the function will exit with an exception, so line 193 to clear it will actually never be executed...and it is not cleared  the next time the function module is called, so you never get back to have the function run...
    All the best,
    Frank

  • Accessing Row-Wise Initialization variable in OBIEE Answers 11g

    Hi All,
    I need to access row-wise initialized session variable in answers fx section, i came to know from following blog
    http://carpediemconsulting.wordpress.com/
    that i can use VALUELISTOF(NQ_SESSION.ROW-WISE-VAR)) function to get the list of values in answers, but i m getting syntax error in obiee 11.1.1.3
    Any work arounds for this. Please help!!
    Thanks,
    Sreekanth

    You can't, it's only intended for use in the RPD initblocks, it's mainly used to restrict data acces:
    http://www.orastudy.com/oradoc/selfstu/fusion/doc.1111/e16816/biapps_security.htm
    regards
    John
    http://obiee101.blogspot.com/
    http://obiee11g.com/

  • "Reset" declared variables to initialized state?

    Hiya!
    This might sound like a very stupid question, but I have not figured out a way to do this. I am working on a "personal information manager", where users can enter a date in a lovely swing textfield, it get's parsed to Integer and a GregorianCalendar is created with it. Once I created the Calendar, the TextFields are emptied again, but of course the Integer instance variables are still declared with the old values. This leads to the fact that a user could click "add date" again and a date is created without entering any number at all.
    My question:
    Is it possible to set declared variables back to the state they had when initialized? They should be "empty"...
    I can`t set them null...
    Thanks for your help, it's much appreciated!

    The only type of variable where "empty" has any meaning is for an empty string: "". Otherwise there is no empty. Objects are by default initialized to null, numeric primitives to zero, and I think chars to '' but I could be mistaken about that one - I never use chars. So if you're using Integers, they could either be null, or an Integer - nothing else.

  • Resetting of variables in VIs

    See KnowledgeBase article: 1IF7T7X4 - If you replace the indicator with an indicator array it does not reset on repeated calls.
    Why does this behave differently.

    Patrick,
    That is an interesting observation. I am not certain why the behavior is not seen with arrays, but if I had to guess, I'd say because an array starts off defaulted to null values, whereas a scalar value defaults to having an actual numeric value (usually 0.00). The scalar will go back to the default value as described in the KnowledgeBase entry, but I guess since the array's default value was null, it simply keeps its current values.
    That is the best explanation I can come up with. I hope it made sense.
    Have a good day.
    Sincerely,
    Darren Nattinger
    Applications Engineer
    National Instruments
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

Maybe you are looking for

  • How to initialize the Select Options

    Hi, I have 5 select-options and 3 parameters in my selection screen. I have to assign default values to the select-options. I have S_VKORG for Sales Organization. The default values for this select-option are 'KF11', 'BH13', 'KF26'. How to assign the

  • Best practice to integrate UPK modes in a separate eLearning module? Specifically Lectora

    I have several elearning modules to develop. For richness of content (and standards in my firm) these will be built either in Lectora or in Flash. I'd like to include some process simulations in those modules. If I use UPK to generate the simulations

  • INterface not viisble in sxi_monitor

    Hello Everyone, I have created a  JDBC to IDOC scenario. .. All the configurations are made and i tested the xi objects  as well.. I could see that in QX1, i have the successful message in SXI_MONITOR . However,. when i try to check the message in QE

  • New Mac pro for gaming?

    Well I bought a MacPro last week and after talking to Apple I am returning it to get a new one. So here's my question: I would like to use it for gaming as well, so what video card would be best? 2xGeforce or 1 of the new ATI cards Didn't know which

  • Illustrator CS2 resizing issue

    My ability to resize anything when it is selected with the direct selection tool has gone away. The white squares at the center and corner points are never present. I am running Mac OS X 10.3.9. Is there a way I can turn this feature back on? Thanks!