How to generate serialized variable name?

I want to dynamically generate a serial of varials, like var1, var2, var3... How can I do this?

Perhaps using arrays would suffice?
Example:
int[] int_array = new int[10];
Or if you want more flexibility, you can consider the container classes (such as Vector), which provide more flexibility for dynamically sized lists.

Similar Messages

  • How to generate a variable-name from a string

    I want to name some variables automaticly. The names are read from an ArrayList and converted to string.
    I tried it this way, but I failed.
    for(int m=0; m<tags.size(); m++){
         System.out.println("javax.swing.JRadioButton "+tags.get(m).toString().toLowerCase()+"RadioButton;");
         String temp = tags.get(m).toString().toLowerCase().concat("RadioButton");
         javax.swing.JRadioButton temp.toString() = new JRadioButton();
         buttonList.add(m, temp.toString());
    Can anyone help me, please?!

    Because of the Exception I printed the content of temp and of hsh.get(temp) and both are not null:
    temp: authorRadioButton
    hsh.get(temp)): javax.swing.JRadioButton[,0,0,0x0,invalid,layout=javax.swing.OverlayLayout,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@7dd60e50,flags=1184,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2],paintBorder=false,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=]
    So I really don't know why this Exception occurs when trying to use the hsh.get(temp)-method.

  • How to generate Serial numbers using JAVA SCRIPT

    how to generate serial numbers(incrementing by 1) using JAVA SCRIPT
    thanking you,
    pola pradeep

    i am afraid that whether ur looking for this. bcoz its a simple for loop
    <script language="JavaScript">
    //count = limit value for u
    for(i=0;i<count;++i){
         alert(i);
    </script>
    or if ur looking for something else, pls mention ur requrment precisely
    aleena

  • How to generate serial number in group by sql

    I need the query output with record serial number by a group,
    Sr No by dept Dept Id Emp Name
    ========= ===== =======
    1 10 aaaaa
    1 11 abndddd
    2 11 sdfffffff
    3 11 s sdfe
    4 11 ggg
    1 12 dDEWQ
    1 13 xccc
    2 13 DSAFG
    How to generate the first column in the above output using sql?
    Thanks in advance
    Shrinivas

    use the analytic function ROW_NUMBER
    here is a small example
    SQL> select row_number() over(partition by deptno order by empno) rno, deptno, empno
      2    from emp
      3  /
           RNO     DEPTNO      EMPNO
             1         10       7782
             2         10       7839
             3         10       7934
             1         20       7566
             2         20       7788
             3         20       7876
             4         20       7902
             1         30       7499
             2         30       7521
             3         30       7654
             4         30       7698
           RNO     DEPTNO      EMPNO
             5         30       7844
             6         30       7900
    13 rows selected.

  • Added dynamic text; How do I stop variable name from showing?

    I am creating a simple game for kids.  On the first page, I added an "input text" field for their first name.  I called the variable firstname.
    When they move to the next page, I used a "dyanamic text" field so I can call them by name on this page.  It works.  However, When I test the game, on the first page, where the firstname is input, it shows    _level0.firstname          instead of just a blank space for them to input their name.
    I know I fixed this in the past and it was something simple, but I can't remember how to do it.  I'd appreciate anyone's help!
    Thanks.

    Beginning with Flash MX (version 6), you assign the text field an instance name using the Property inspector. Although you can use the variable name method with dynamic text fields for backwards compatibility to Flash 5 and earlier versions, Macromedia doesn't recommend this, because you can't control other text field properties, or apply style sheet settings

  • How to define a variable name in ABAP?

    Field name         numer
                             1.000
                             5.000
                             3.000
    How to declare this variable x_numer?
    "select single numer into <b>x_numer</b> from TableName"
    Thanks!

    While declaring, you assign type. You can also assign default value or make it constanrt also.
    Like this:
    DATA: USER LIKE SY-UNAME.
    DATA: text_buffer TYPE string VALUE `Text`,
          count TYPE i VALUE 1,
          price TYPE p DECIMALS 2 VALUE '1.99'.
    Go to Se37 or Se38.
    Type RS* and drop down and you will see bunch of programs and FMs. choose any of them.
    this will display the program.
    In that press f1 and you will get the abap help and you can search by key words.
    Ravi Thothadri

  • How to show argument variable names to webservice client

    Hi java expert(S)!
    This is sri, i am creating a webservice using sun java studio enterprise 8.1 IDE, my problem is consumer(from .net) say ,parameter names are not clear or visible. say, for example, my webservice method look like
    public java.lang.String login(final String clientid, final String password) throws java.rmi.RemoteException {...}
    to me but for webservice client String login(String_1, String_2). so how to show argument variables to client
    webservice client needs to know argument names for proper usage.
    Any body knows how to do this, Any help will be appreciated!!!!!
    Thanks & Regards,
    SRI.

    hI
    i have posted my wsdl below
    If you go through , you can find that in order to call a method , we have to supply string or int arguments but those names are not shown
    for example to call login , you need to supply 2 string arguments but how do you know first one is username and second one is for password.
    it shows simply string_1 and string_2 as arguments, instead if it shows login(String username,String password) for caller(webservice client), it will be easy to handle you know.
    How to do this????
    <definitions name="mysws" targetNamespace="urn:mysws/wsdl">
    &#8722;
         <types>
    &#8722;
         <schema targetNamespace="urn:mysws/types">
    &#8722;
         <complexType name="getData">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    <element name="int_3" type="int"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getDataResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getMoreRows">
    &#8722;
         <sequence>
    <element name="int_1" type="int"/>
    <element name="int_2" type="int"/>
    <element name="int_3" type="int"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getMoreRowsResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="insertData">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="insertDataResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="login">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    <element name="String_3" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="loginResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="logout">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="logoutResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <element name="getData" type="tns:getData"/>
    <element name="getDataResponse" type="tns:getDataResponse"/>
    <element name="getMoreRows" type="tns:getMoreRows"/>
    <element name="getMoreRowsResponse" type="tns:getMoreRowsResponse"/>
    <element name="insertData" type="tns:insertData"/>
    <element name="insertDataResponse" type="tns:insertDataResponse"/>
    <element name="login" type="tns:login"/>
    <element name="loginResponse" type="tns:loginResponse"/>
    <element name="logout" type="tns:logout"/>
    <element name="logoutResponse" type="tns:logoutResponse"/>
    </schema>
    </types>
    &#8722;
         <message name="myswsSEI_getData">
    <part name="parameters" element="ns2:getData"/>
    </message>
    &#8722;
         <message name="myswsSEI_getDataResponse">
    <part name="result" element="ns2:getDataResponse"/>
    </message>
    &#8722;
         <message name="myswsSEI_getMoreRows">
    <part name="parameters" element="ns2:getMoreRows"/>
    </message>
    &#8722;
         <message name="myswsSEI_getMoreRowsResponse">
    <part name="result" element="ns2:getMoreRowsResponse"/>
    </message>
    Regards,
    Sri

  • How to generate Serial(Unique) Number for finished goods?

    Guru's,
    How do i generate Serial(Unique) Numbers for finished goods.Suppose,if we get an order for a finished good A of 10 qty.We want to generate unique number to identify each and every A item separately for quality purpose.Any help is much appreciated.
    thanks Guru's

    Depending on serial control of item, you will need to generate serial numbers at the time of WIP Completion transaction using Serial Entry window (i.e. if serial control is At Receipt) or at the time of job creation (i.e. if you are using serial control as predefined)
    In latter case, you will have to use MES or MSCA screens to perform serialized WIP completion.
    Thanks,
    Hrishi

  • How to Search for Variable Name in an Apex Page

    Hi,
    Whenever I am writing code and I need to remove a reference to a variable name, I just to a search and replace on the source.
    With Apex, is there a way to do that on the Apex page definition? I have click on every validation, process, report to comb each region for the variable reference. Thanks.

    Hi Samuel,
    Have a look at the APEX views ( Utilities > APEX Views ).
    You can select most (all?) of the information associated with a page and then search the result set(s) for the variables you are looking for.
    I hope this helps.
    Cheers,
    Patrick Cimolini

  • How to change dinamically variable name?

    Is it possible to change variable name dinamically into loop?
    loop at itab.
    move itab-item to field_x.
    endloop.
    I would copy my itab-item into field_1, field_2......field_x at each loop.
    Thanks
    Alfonso.

    You have to use the field symbol for the field giornoX not for the structure
    DATA: BEGIN OF wa_alv OCCURS 0,
            pernr            LIKE pa0001-pernr,
            persk            LIKE pa0001-persk,
            des_grado_abbrev LIKE zhr_descr_grado-des_grado_abbrev,
            vorna            LIKE pa0002-vorna,
            nachn            LIKE pa0002-nachn,
            giorno1          TYPE char12,
            giorno2          TYPE char12,
            giorno3          TYPE char12,
            giorno4          TYPE char12,
            giorno5          TYPE char12,
            giorno6          TYPE char12,
            giorno7          TYPE char12,
          END OF wa_alv.
    data tb_alv like table of wa_alv.
    field-symbols: <giorno> type any.
    data: name_giorno(13).
    LOOP AT tb_alv ASSIGNING wa_alv
      LOOP AT tb_orario.
       do 7 times.
        concatenate 'wa_alv-giorno'  sy-index into name_giorno.
         assign (name_giorno) to <giorno>.
         giorno  = tb_orario-orario.
        enddo.
        ENDLOOP.
    ENDLOOP.
    bye
    enzo

  • Important: how to generate serialS of char in JSP instead of Serial nos

    Hai all,
    in the following JSP Code, im generating an index number i.e. "rowcount"
    now i need to change to chatacters. i.e. instead of serial number 1,2,3... i need to get a,b,c........etc
    in the following code according to logical iterate the rowcount is incremented nothing has to be done but when we have to change to characters whts the process...... also after reaching a......z, it has to continue like aa, ab, ac,......az, ba,bb,bc.......bz.....
    <div id="div1" style="overflow:auto; width:100%; height:135; position:relative; border-left:1px solid gray;">
    <% int rowCount=1;%>
    <logic:present name="freqCollect">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="tblSample">
    <logic:iterate id="freqMasId" name="freqCollect">
    <tr>
    <td align="center" width="10%">
    <input type="hidden" name="freqChk" value=""/>
    <logic:notEmpty name='freqMasId' property='freqDesc'>
    <logic:empty name='parentQipSeqId'>
    <logic:equal name='freqMasId' property='freqDelete' value='Y'>
    <input type="checkbox" name="freqChkBox" checked="true" tabindex=""/>
    </logic:equal>
    <logic:notEqual name='freqMasId' property='freqDelete' value='Y'>
    <input type="checkbox" name="freqChkBox" tabindex=""/>
    </logic:notEqual>
    </logic:empty>
    <logic:notEmpty name='parentQipSeqId'>
    <input type="checkbox" name="freqChkBox" tabindex="" disabled/>
    </logic:notEmpty>
    </logic:notEmpty>
    <logic:empty name='freqMasId' property='freqDesc'>
    <input type="checkbox" name="freqChkBox" tabindex="" disabled/>
    </logic:empty></td>
    <td align="center" width="10%"><input type="text" name="freqCode" id="txtblue" value="<%= rowCount++%>" size="5" tabindex="" readonly/></td>
    <td align="center" width="50%"><input type="text" name="freqDescription" id="txtblue" value="<bean:write name='freqMasId' property='freqDesc'/>" size="40" maxLength="80" tabindex=""/></td>
    <td align="center" width="15%"><input type="text" name="freqSample" id="txtblue" value="<bean:write name='freqMasId' property='freqSample'/>" size="5" maxLength="9" tabindex=""/>
    <input type="hidden" name="freqSeqId" id="txtblue" value="<logic:notEmpty name='freqMasId' property='freqId'><bean:write name='freqMasId' property='freqId'/></logic:notEmpty>" tabindex=""/>
    </td>
    </tr>                    
    </logic:iterate>
    </table>
    </logic:present>                         
    </div>

    Hai all,
    in the following JSP Code, im generating an index number i.e. "rowcount"
    now i need to change to chatacters. i.e. instead of serial number 1,2,3... i need to get a,b,c........etc
    in the following code according to logical iterate the rowcount is incremented nothing has to be done but when we have to change to characters whts the process...... also after reaching a......z, it has to continue like aa, ab, ac,......az, ba,bb,bc.......bz.....
    <div id="div1" style="overflow:auto; width:100%; height:135; position:relative; border-left:1px solid gray;">
    <% int rowCount=1;%>
    <logic:present name="freqCollect">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="tblSample">
    <logic:iterate id="freqMasId" name="freqCollect">
    <tr>
    <td align="center" width="10%">
    <input type="hidden" name="freqChk" value=""/>
    <logic:notEmpty name='freqMasId' property='freqDesc'>
    <logic:empty name='parentQipSeqId'>
    <logic:equal name='freqMasId' property='freqDelete' value='Y'>
    <input type="checkbox" name="freqChkBox" checked="true" tabindex=""/>
    </logic:equal>
    <logic:notEqual name='freqMasId' property='freqDelete' value='Y'>
    <input type="checkbox" name="freqChkBox" tabindex=""/>
    </logic:notEqual>
    </logic:empty>
    <logic:notEmpty name='parentQipSeqId'>
    <input type="checkbox" name="freqChkBox" tabindex="" disabled/>
    </logic:notEmpty>
    </logic:notEmpty>
    <logic:empty name='freqMasId' property='freqDesc'>
    <input type="checkbox" name="freqChkBox" tabindex="" disabled/>
    </logic:empty></td>
    <td align="center" width="10%"><input type="text" name="freqCode" id="txtblue" value="<%= rowCount++%>" size="5" tabindex="" readonly/></td>
    <td align="center" width="50%"><input type="text" name="freqDescription" id="txtblue" value="<bean:write name='freqMasId' property='freqDesc'/>" size="40" maxLength="80" tabindex=""/></td>
    <td align="center" width="15%"><input type="text" name="freqSample" id="txtblue" value="<bean:write name='freqMasId' property='freqSample'/>" size="5" maxLength="9" tabindex=""/>
    <input type="hidden" name="freqSeqId" id="txtblue" value="<logic:notEmpty name='freqMasId' property='freqId'><bean:write name='freqMasId' property='freqId'/></logic:notEmpty>" tabindex=""/>
    </td>
    </tr>                    
    </logic:iterate>
    </table>
    </logic:present>                         
    </div>

  • How can I use variable name as a prameter value in HOST Command ???

    Hi All,
    How can it possible to use variable value in parameter in HOST command ??
    Following in my code:
    host('rwclient server=reptest report=c:\cust_print.rdf p_1= s_sam_cust_id userid=wh1/wh1@dwh desformat=pdf desty=file desname=c:/temp/'||v_sam_cust_id||'.pdf');
    Regards

    Hello,
    The Syntax of the builtin HOST is :
    SyntaxPROCEDURE HOST
    (system_command_string VARCHAR2);
    PROCEDURE HOST
    (system_command_string VARCHAR2,
    screen_action NUMBER);
    So , you can build the system_command_string as any VARCHAR2
    Example are provided in online help :
    http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builth_m/host.html?tp=true
    Regards

  • How to compare substitution variable name to static member names (not data)?

    Is there a way to write a BSO member formula that compares a substitution variable against the name of a static member (not the data value of the member)
    For example, I have a BSO database that has the sub variable &CurrMth (which is set the real current month), and I am trying to use it in the Q1/Q2/Q3/Q4 member formulas
    IF(&CurrMnth <> "Jan" AND &CurrMnth <> "Feb")
       "Mar";
    The intention of the above is: if &CurrMnth is neither Jan nor Feb, then the Mar value will be used. However, the system is actually comparing the values of &CurrMnth and Jan/Feb, rather than the names/text string of "Jan"/"Feb".
    I have been looking around the tech references, but I was unable to find any functions that will compare the text strings of member names as they all appear to compare against the data itself.
    Please let me know if there are any ways to compare the member names themselves in a member formula, not the data values.
    Thanks!

    Thanks Celvin, that looks like it works!
    However, I do need to do the same function in the equivalent quarter members in our ASO cube as well. Do happen know know if there's a similar MDX function I could use in the ASO cube to acheive the same result? I was using the following to achieve this in ASO (which obviously did not work):
    IIF([Time Periods].[Jan] <> &CurrMth AND [Time Periods].[Feb] <> &CurrMth,
       [Mar],

  • How to display the variable name in right side of the graph

    Hi All,
    i have defined a scatter chart. my requirement is to show the values of the Z-axis or level axis beside the scatter chart. this is already present for the OBIEE pie chart. can we configure the same for the scatter chart.
    thanks in advance.

    Hi Paul,
    Following customized code displays Full Names on my portal:
    private String GetWelcomeMsg(IPortalComponentRequest request, String welcomeClause)
        IUserContext userContext = request.getUser();
        if (userContext != null)
              String firstName = userContext.getFirstName();
              String lastName = userContext.getLastName();
              String displayName = userContext.getDisplayName();
              String salutation = userContext.getSalutation();
              if (displayName != null)
                   if(salutation != null)
                        return java.text.MessageFormat.format(welcomeClause, new Object[] {displayName, salutation, " "}).toString();
                   else
                        return java.text.MessageFormat.format(welcomeClause, new Object[] {displayName, " ", " "}).toString();
              else if ((firstName != null) && (lastName != null))
                   if(salutation != null)
                        return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, salutation}).toString();
                   else
                        return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
              else
                   return java.text.MessageFormat.format(welcomeClause, new Object[] {userContext.getUniqueName()," ", " "}).toString();          
        return "";
    Regards,
    Sergei

  • How to specify a variable in the script logic

    I want to pass a variable from the process chain using the prompt statement.
    I  want to refer to the variable name in the script. When I used the following statement in the script file, I got an error when validating the statement below:
    //Increase Wage and Salary & Personnel Exp. by entered percentage
    [P_ACCT].[#CE0004020] = [P_ACCT].[CE0004020] * ( 1 + $WS_PERCT$ / 100)
    Syntax error:Reference Error: $WS_PERCT$  is not defined
    One of the how-to guides indicated that I should use the dollar sign before and after the variable name.
    Can someone explain how to specify a variable name in the script.
    Thanks.

    Thanks, Pravin.
    I tried using the syntax with the # sign (as shown below) but when I validate the code I get an error. The message indicates there is an issue with $WS_PERCT$.
    Syntax error:Reference Error: $WS_PERCT$ is not defined
    P_ACCT].[#CE0004020] = [P_ACCT].[CE0004020] * ( 1 + $WS_PERCT$ / 100)
    Can you please advise if am missing something here in the code.
    Edited by: Sanjay Kumar on Sep 24, 2009 10:06 PM
    Edited by: Sanjay Kumar on Sep 24, 2009 10:08 PM

Maybe you are looking for

  • Help with Moodle on Mac OS X server - PhP issue

    I am a server newbie.  I am setting up a server on a mac for the primary purpose of running a website for my students to use.  I have a hosted site now, but the version of php they offer is not high enough to run moodle.  I want to install moodle 2.4

  • Retrieve Material group item in Purchase Order.

    Hi all, I would need to retrieve the material group from item in Purchase order to compare in Step condition in workflow. I have a copy of WS14000075. The container from this WF hasn't this field, at least that I know. How can to retrieve this value

  • Adobe Reader conflicts with Adobe Acrobat?

    It looks like there are some conflicts between Adobe Reader and Adobe Acrobat: I just downloaded Adobe Reader 9 without problems but when running the downloaded file(.exe) the seup is interrupted before Adobe Reader 9 could be completelly installed.

  • Its been a month since the last firmware upd

    Any status on the next one, there are quite a few suggestions out there for new features, I am just wondering when the next firmware update will be released.

  • Adding or Deleting Rows and Columns from Tables

    I have notices that you can't delete or add a row or columns from a table in iWeb without having problems. You may get two added or deleted. I should indicate that the table comes from Excel. Does anyone know of a work-around?