How to generate variables whose name are in serial?

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

an array perhaps.... You want want to pick up a book on the basics.

Similar Messages

  • How to generate variable to receive name of database on B1if

    Hi Everyone,
    I need your help, I created a web service with B1if and I tried generate one variavel to receive a name of database to use work on my web service, but I could not.
    The client will set the name of database to receive to data from webservice.
    Can generate variable to receive name of database on B1if?
    I dont find nothing about this situation, Anyone tried make something like this?
    Sorry for my bad English.
    Thanks,
    Duoglas

    Hi
    I'm not sure if I understood you correctly:
    you will receive a database name as a part of the incoming message for your web service and then you need to choose a correct system from SLD based on this name? For example there will be a <dbName> tag in your and based on its value you would have to choose appropriate system in B1iF. Am I right?
    Kind regards,
    Radek

  • Creating a variable whose name is the value of a String

    Hi guys
    i want to create java variables dynamically whose name is the
    value of String .
    Such as
    String str="object";
    now i want to ceate a variable of
    type int whose name will be "object".
    in what manner i can do this.

    i want to create java variables dynamically whose
    name is the
    value of String .
    Such as
    String str="object";
    now i want to ceate a variable of
    type int whose name will be "object".
    in what manner i can do this.
    You can't. The best you can do is create a Java source file and compile it on the fly.
    Could you tell us why you want to do this? I have no doubt at all that you are working with a bad design, and maybe we could help you fix it.

  • How to call variable which name is stored in a temporary table...

    Hi there!
    Got a simple (?) question. I want to make an allocation like that:
    n#.temp_z1  := temp#; with the only Problem that the name of the variable is stored in another variable or a temporary table:
    temp#(1) := temp_z1; at the moment I have absolutly no idea how to resolve this Problem =( Need something like that (which don't work):
    n#.temp#(1)  := temp#; anybody there who could help me? Thanks in advance

    I think with dynamic SQL it won't work. Isn't there any solution just to handle this simple problem? =(
    ok, some more details to my Program:
    I have a table named "NN2_input" which will be filled dynamically. For the filling, a start and a finish number are given, and for every number between this, 3 columns will be created. Looks like that:
    min = 3; max = 5;
    => Columns:
    Z3_Gas, Z3_Dauer, Z3_Temp, Z4_Gas, Z4_Dauer, Z4_Temp, Z5_Gas, Z5_Dauer, Z5_Temp
    after the structure of the table is given, it should be filled. To see which columns are given, I select them in a temporary table:
    CREATE OR REPLACE PROCEDURE nn2_input_filling is
       type tab is table of VARCHAR2(15);
       gas#    tab;
       dauer#  tab;
       out#    tab;    
    BEGIN
       SELECT column_name BULK COLLECT INTO dauer# FROM sys.user_tab_columns
         WHERE table_name = 'NN2_INPUT' AND SubStr(column_name,4,5) = 'DAUER' ORDER BY column_name;
       SELECT column_name BULK COLLECT INTO gas# FROM sys.user_tab_columns
         WHERE table_name = 'NN2_INPUT' AND SubStr(column_name,4,3) = 'GAS' ORDER BY column_name;
       SELECT column_name BULK COLLECT INTO out# FROM sys.user_tab_columns -- gibt auch ein Z7_OUT2 zurück o.O
         WHERE table_name = 'NN2_INPUT' AND SubStr(column_name,4,3) = 'OUT' ORDER BY column_name;
    END;to fill this table, I must assign each field with this value. And that's where my Problem occurs...
    so I know all of the columns except the Numbers...

  • How to pass variable to content area from a PL/SQL procedure

    Hi,
    Can somebody tell me how to create a(Content area) folder based on a PL/SQL procedure that takes a variable as a
    parameter and returns data based on value of that parameter to the folder . Any help would be appreciated .
    Thanks and regards.
    Neeti.

    Somewhere, in one procedure, build a session identifier and save your variable there. If no session with that identifier is previously stored, it will create a new session instance with that ID for you.
    declare
    l_sess portal30.wwsto_api_session;
    varvalue number;
    begin
    varvalue := 100;
    l_sess := portal30.wwsto_api_session.load_session('MYSESSION','VARIABLES');
    l_sess.set_attribute('VAR_NAME',varvalue);
    l_sess.save_session;
    end;
    In your other procedure, or anywhere else needed within that same session, simply load the session and reference the variable. To reference the variable, use the following.
    -- assuming new procedure, so re-defining session variable and reloading session into it
    declare
    my_session portal30.wwsto_api_session;
    my_new_variable number;
    begin
    my_session := portal30.wwsto_api_session.load_session('MYSESSION','VARIABLES');
    my_new_variable := my_session.get_attribute_as_number('VAR_NAME');
    end;
    This will let you reference parameters across multiple portal applications and indirect calls.

  • How to read variable file name into ODI

    Hello everyone,
    I apologize in advance if this has already been answered - I've done searches both on Google and this OTN area and have not found an answer to my query.
    I would like to do the following via ODI:
    1) rename a file in a specific directory
    2) process the file
    2) move the file to a backup directory
    3) rename the file again
    The file name is going to change everytime this process runs, as date is appended to it. I could create a variable with a system date in it and concatenate that into the filename before processing it, but I am not sure when they will run the ODI routine. Therefore, I would prefer to play it safe by doing something like a wildcard search in DOS.
    Example:
    Filename = TestFile12072010.csv
    I would like to:
    1) rename TestFile12072010.csv to TestFile.csv
    2) process the file
    3) move the file to another directory
    4) rename the file to TestFile<processdate>.csv
    I was hoping to do the first step using a DOS command that reads in TestFile*.csv. Note: I would expect there to be only 1 file with this naming convention and file extension in the directory.
    I have tried creating a stored procedure that uses the Operating System type, but it runs without stopping. I have also tried ODIFileCopy and OS Command. Obviously, I am doing something wrong since I am getting errors.
    Any guidance would be much appreciated! :)
    Thanks!
    -OS

    Issue was due to a syntax error. Case closed.
    Thanks!
    -OS

  • How to check variable if chars are inside

    Hi fellow sufferers :)
    How can I accomplish to check if a variable a$ contains only chars like (A,B,C,D,E, ....) ... I need to make sure that my variable only contains numbers ....
    Thanks in advance for your help/ideas!
    Markus

    function Is-Numeric ($Value) {
    return $Value -match "^[\d\.]+$"
    Is-Numeric 1.23
    True
    Is-Numeric 123
    True
    Is-Numeric ""
    False
    Is-Numeric "asdf123"
    False
     Source from http://stackoverflow.com/

  • How to generate non-blocking commands to a serial device

    I have a serial device which accepts non-blocking commands. This is, if you send a command that takes 1 minute, while this happens, you can send more commands and they will be executed. Once a command is done, it sends back a code that relates to that command, so you know it is finished.
    I have a VI which tries to communicate with this serial device (see attachment). It does work, but it blocks the execution until a command is finished. So I can send commands one by one, but not in parallel, or in a delayed non-block way. The problem is the while loop which waits until the device outputs something.
    I need to do something similar, but non blocking. The VI should be able to send several commands while others are executed.
    This subVI is controlled from a main VI, which is just a State Machine with a few states, where each state is some action which is sent to this subVI, and then to the serial device.
    Attachments:
    blocking_vi.png ‏27 KB

    Use another loop that does nothing but read from the serial port.  Report the data to whoever needs it with a Queue.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How do you make an object, whose name is equal to a String?

    Ok, heres my situation, I have a vector full of strings which i've enumerated.. and i need to create a bunch of JCheckBox's whose names are equal to the strings in the Enumeration..
    I tried going:
              Enumeration Type = TypeList.elements();
              while(Type.hasMoreElements()){
                   String T = (String)Type.nextElement();
                   list.add(new JCheckBox(""+T));
    which makes them appear in the GUI, but i dont know how i would then be able to add an actionListener onto that checkbox, or indeed how i would go about accessing any of them when they dont have actual names.
    ANy Help would be appreciated.
    Thanks

    Yeh.. i dont get this.. I've got them to appear in the JPanel with:
              Enumeration Type = TypeList.elements();
         boxMap = new HashMap();
              while (Type.hasMoreElements()) {
                   String T = (String) Type.nextElement();
                   JCheckBox b = new JCheckBox(T);
                   boxMap.put(T,b);
                   list.add(b);
                   b.addActionListener(ch);
    Thats all well and good, but when i try and see which one has been clicked using a similar fashion:
                   if(ae.getSource() instanceof JCheckBox) {          //checkbox
                   Enumeration sourceCheck = TypeList.elements();
                   System.out.println((JCheckBox)ae.getSource().getAccessibleContext());
              Map SourceMap = new HashMap();
                   JCheckBox compare = (JCheckBox) ae.getSource();
              while (sourceCheck.hasMoreElements()) {
                   String T = (String) sourceCheck.nextElement();
                   System.out.println(T);
                   JCheckBox b = new JCheckBox(T);
                   SourceMap.put(T,b);
                   if(compare == b)
                        System.out.println("Oh My : "+T);
                   System.out.println("ZoomJ I have been clicked");
    in my action performed method it doesnt seem to be able to compare them.. its definately registering that its been clicked because it prints out the 'ive been clicked ' message, and it prints out all the correct names from the Vector, but it doesn't seem to compare them..

  • Variable file name through Receiver mail Communication channel

    I need to send a file through receiver communication channel   with the following name ( YYMMDD schema)  . The YYMMDD is current date .  I know how to create these file names throug FCC ( file communication channel) , I tried in the same manner to create this file through Receiver Mail CC , but it did not work  .  If you have any ideas , can you please share with me ?
    ABC_MMYYDD.TXT
    Thanks.
    Ritvik

    Hi Ritvik,
    Also, Please look at this link and see if it helps you. It is generating variable file name through a UDF
    Re: Problem in dynamically file name generation procedure
    Best Regards

  • How do I ensure user name is shown rather than 'another user' on the 'File in Use' dialog box?

    How can I ensure user names are shown rather than just 'another user' on the 'File in Use' dialog box that appears when attempting to edit a checked out document in Microsoft Word/Excel? 
    All suggestions welcome. 

    If I recall correctly, that dialog is generated by the Office client product supporting that file type. There would be no way to modify it.
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to generate credentials.

    Hello,
    I wanted to start an official topic on this. Please use this topic to share ideas about how to generate credentials.
    Here are some quick suggestions from me.
    1. Add the eduCourseMember attribute to user records. This attribute would contain all the credentials a user can have. Some other means would be required to generate the value of this attribute.
    2. Generate the credentials a user should have dynamically based on what groups a user is in.

    The group approach is a simple approach that works. There is no need to modify the schema, and it is straight forward to determine group membership.
    For example, create a group itunesuphilosophyStudents for students that are authorized to access philosophy class downloads.
    The dscl command-line utility can be used to retrieve group membership from all directories that a Mac OS X system is bound to:
    dscl /Search -search /Groups GroupMembership <user short name>

  • Using variable coulmn name in sql function

    Hi there,
    I am not an expert with PL/SQL and I can not figure out how to use variable column names in my function.
    My function is:
    CREATE OR REPLACE FUNCTION RESET_TRIGGERS(aTrigger VARCHAR2) RETURN NUMBER IS
    TEMP_ID NUMBER;
    TEMP_USER_ID NUMBER;
    BEGIN
    SELECT 'LIMS.'||'$aTrigger'||'.NEXTVAL' INTO TEMP_ID FROM DUAL;
    SELECT 'LIMS.'||'$aTrigger'||'_USER.NEXTVAL' INTO TEMP_USER_ID FROM DUAL;
    IF TEMP_ID > TEMP_USER_ID THEN
    LOOP
    SELECT LIMS.SQ_U_FINALRESULT_USER.NEXTVAL INTO TEMP_USER_ID FROM DUAL;
    EXIT WHEN TEMP_USER_ID = TEMP_ID;
    END LOOP;
    ELSE
    WHILE TEMP_ID < TEMP_USER_ID LOOP
    SELECT LIMS.SQ_U_FINALRESULT.NEXTVAL INTO TEMP_ID FROM DUAL;
    END LOOP;
    END IF;
    COMMIT;
    RETURN (TEMP_ID);
    END;
    What I want is that I pass a seqencename with aTrigger and that two triggers will be equal if not.
    eg ifaTrigger = 'SQ_U_FINALRESULT'
    than I want the triggers LIMS.SQ_U_FINALRESULT and LIMS.SQ_U_FINALRESULT_USER to be set equal.
    The above function will not work, but what will?????
    I hope you can help me out!
    Cheers

    A very strange function indeed.
    But here is what I think he meant to do:
    SQL> create procedure reset_sequences
      2  ( p_sequence_name in  varchar2
      3  , p_nextval          out number
      4  )
      5  is
      6    l_nextval1 number;
      7    l_nextval2 number
      8    ;
      9    procedure reset_sequence_value
    10    ( p_sequence_name in varchar2
    11    , p_current_value in number
    12    , p_new_value     in number
    13    )
    14    is
    15      l_dummy number;
    16    begin
    17      execute immediate 'alter sequence ' || p_sequence_name || ' increment by ' || to_char(p_new_value-p_current_value);
    18      execute immediate 'select ' || p_sequence_name || '.nextval from dual' into l_dummy;
    19      execute immediate 'alter sequence ' || p_sequence_name || ' increment by 1';
    20    end reset_sequence_value
    21    ;
    22  begin
    23    execute immediate
    24      'select ' || p_sequence_name || '.nextval,' || p_sequence_name || '_user.nextval from dual'
    25    into l_nextval1, l_nextval2
    26    ;
    27    if l_nextval1 < l_nextval2
    28    then
    29      reset_sequence_value(p_sequence_name,l_nextval1,l_nextval2);
    30    end if
    31    ;
    32    if l_nextval1 > l_nextval2
    33    then
    34      reset_sequence_value(p_sequence_name || '_user',l_nextval2,l_nextval1);
    35    end if
    36    ;
    37    p_nextval := greatest(l_nextval1,l_nextval2)
    38    ;
    39  end reset_sequences;
    40  /
    Procedure is aangemaakt.
    SQL> show err
    Er zijn geen fouten.
    SQL> create sequence testseq start with 5 increment by 1
      2  /
    Reeks is aangemaakt.
    SQL> create sequence testseq_user start with 2 increment by 1
      2  /
    Reeks is aangemaakt.
    SQL> declare
      2    l_new_value number;
      3  begin
      4    reset_sequences('testseq',l_new_value);
      5    dbms_output.put_line(l_new_value);
      6  end;
      7  /
    5
    PL/SQL-procedure is geslaagd.
    SQL> select testseq.currval from dual
      2  /
                                   CURRVAL
                                         5
    1 rij is geselecteerd.
    SQL> select testseq_user.currval from dual
      2  /
                                   CURRVAL
                                         5
    1 rij is geselecteerd.Regards,
    Rob.

  • How to perform a select op on a table whose name is contained by a variable

    I am using Oracle SQL*Plus client.
    declare
    tablename_var varchar(10); LOOK HERE
    date_var date;
    begin
    select sysdate
    into date_var
    from &tablename_var; LOOK HERE
    dbms_output.put_line('The system date is '||date_var);
    end;
    The above code prompts the user to enter a value for the variable tablename_var, once the user enters 'dual' on prompt... The system date is given as output.
    declare
    tablename_var varchar(10):='dual'; LOOK HERE
    date_var date;
    begin
    select sysdate
    into date_var
    from tablename_var; LOOK HERE
    dbms_output.put_line('The system date is '||date_var);
    end;
    This code fails and gives an error. I understand. Engine interprets it as... trying to perform a select operation on a variable, and says a table or a view is expected.
    Can someone please tell me what to do, to perform a select operation on a table whose name is contained by a variable, like above?

    Hi,
    Welcome to the forum!
    You need Dynamic SQL if the table- or column names are variables.
    Getting the current date isn't a good example; you could get that without a query simply by saying
    date_var := SYSDATE;Also, SELECT ... INTO will raise an error if the query does not return exactly 1 row.
    In the example below, let's get the latest entry_date from a given table:
    For example:
    declare
         tablename_var     varchar(10);
         date_var      date;
         sql_txt           VARCHAR2 (1000);
    begin
         tablename_var := 'table_x;
         sql_txt := 'select  MAX (entrydate)'
              || '  from  ' || tablename_var;
         dbms_output.put_line (sql_txt || ' = sql_txt');    -- Not essential, but recommended
         EXECUTE IMMEDIATE  sql_txt  INTO date_var;
         dbms_output.put_line ('The latest entry_date is ' || date_var);
    end;Dynamic SQL involves creating a string that contains the SQL statement. Displaying the string is purely optional, of course, but it's a very good idea when writing and de-bugging code. Remember to comment-out or delete the display before moving the code into Production.
    For an exercise, make the column name a variable, instead of the hard-coded entry_date.
    Edited by: Frank Kulash on Nov 5, 2009 9:20 AM

  • How to identify the textbox name if they are generated dynamically

    hi
    i want to know how to identify the textbox name when they are generated dynamically. the text boxes name may vary.
    if u know tell me.
    thanx

    Try the following Code :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </HEAD>
    <SCRIPT language="Javascript">
    function fnShowTextBoxNames()     {
         var count = document.formHeader.elements.length;
         for(i=0;i<count;i++)     {
              var objType = document.formHeader.elements.type;
              if(objType=="text")     {
                   alert("Name Of TEXTBOX NO "+(i+1)+" --> "+document.formHeader.elements[i].name);
    </SCRIPT>
    <BODY>
    <FORM name="formHeader">
    <CENTER>
    <INPUT TYPE="TEXT" name="box1" value="" >
    <br>
    <INPUT TYPE="TEXT" name="box2" value="" >
    <br>
    <INPUT TYPE="TEXT" name="box3" value="" >
    <br>
    <INPUT TYPE="TEXT" name="box4" value="" >
    <br>
    <INPUT TYPE="TEXT" name="box5" value="" >
    <br><br>
    <input type="button" name="btn" value="Show TextBox Names" onClick="javascript:fnShowTextBoxNames();">
    </CENTER>
    <input type="hidden" name="boxCount" value="5"/>
    </FORM>
    </BODY>
    </HTML>
    Hope this suffice ur requirement !

Maybe you are looking for