String separated by TAB

Hello ABAP-Experts,
System: NW2004s
ABAP: 700
I like to separate two strings with a tab. Therefore I´m using the following statement:
lv_text1(50) type c value 'Test'.
lv_text2(50) type c value 'TEXT'.
lv_tabtext(200) type c.
CONCATENATE lv_text1 lv_text2 INTO lv_tabtext
                          SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
I was expecting the string: 'Test      Text'
but I got the string: 'Test#Text'.
Can anybody help me with this issue?
Thank you very much in advance
Best regards
Axel

Hi,
some times it will look like that only,
again split the same string using cl_abap_char_utilities=>horizontal_tab, if it splits the string then it is correct.
reward if needful.
Thanks,
Sreeram.

Similar Messages

  • Splitting string separated by commas into words and assigning numerical values

    Project details :
    I have a project where a description field is being looked at and based on the values (multiple words) I have to do a vlookup from another spreadsheet to get the dates from the appropriate date fields.
    I have created a user defined function to extract keywords from a list from a table. It extracts words from the string separated by comma delimiter.
        I am thinking of assigning values something like this: cooler = 1, compressor = 2, frame = 2, change of order = b etc.
        So if there is a “cooler, compressor, frame, change of order” in the cell, then it should read as: b12 (unique values). Based on the values, I can do a vlookup on the dates. I tried sumproduct in conjuction with search function but did not
    work. Tried split function but did not quite work.
    Any help regarding this is greatly appreciated. Thank you, regards
    keywords
    engine, compressor, frame, cooler     =Keywords(Wordlist,A2) is the function I am calling
    frame, cooler
    engine, cooler, change order
    cooler

    Hi,
    You're asking this question in the wrong forum, this is a PowerShell forum.
    The Excel VBA forum is this way:
    http://social.msdn.microsoft.com/Forums/en-us/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    Side note to whoever voted up the OP - why??
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Separation of tab delimited string

    Hello,
    I want to separate a tab delimited field in a query. It consists of three names and I have to put each of these 3 names into a separate field. How can this be accomplished?
    Example:
    in field 1 we have the string 'John Anderson Smith'
    in field 2 to filed 4 I want to see the following values:
    field 2: John
    field 3: Anderson
    field 4: Smith
    It has to be done with many names having different length.

    Tab delimeted eh... ok, that's chr(9) in the ascii set...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'John    Anderson        Smith' as txt from dual)
      2  --
      3  -- end of test data
      4  --
      5  select regexp_substr(txt, '[^'||chr(9)||']+', 1, 1) as nm1
      6        ,regexp_substr(txt, '[^'||chr(9)||']+', 1, 2) as nm2
      7        ,regexp_substr(txt, '[^'||chr(9)||']+', 1, 3) as nm3
      8        ,txt
      9* from   t
    SQL> /
    NM1                 NM2                 NM3                 TXT
    John                Anderson            Smith               John        Anderson        Smith
    SQL>You just need to repeat the regexp_substr for the maximum number of names that can be in the string.

  • TYPE string VALUE 9 tab delimit in new version

    Moved to correct forum
    hi
    i need to provide tab delimit in new version ecc 6.0
    pls let me know the code for the same
    earlier we used to have the code
    DATA: var TYPE X VALUE 9.
    now in new version we use this below but this is not working as its displaying 9 in the output file befoer fields
    DATA: var TYPE string VALUE 9.
    pls suggest the code for same
    regards
    arora
    regards
    Nishant
    Edited by: Rob Burbank on Apr 7, 2009 11:08 AM

    Hi,
    Use the attribute HORIZONTAL_TAB of Class CL_ABAP_CHAR_UTILITIES. In the below code Tab delimitor is added after every field.
    Example :
    CONCATENATE wa_field1 wa_field2.....wa_fieldn INTO l_string SEPARATED BY
    CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

  • Long string in new tab url

    Firefox always used to open a new tab with a simple url, which if I clicked in it would automatically become selected, so it was easy to overtype an different url.
    Lately each new tab is opening with along string like this: http://www.google.com.au/firefox?gfe_rd=ctrl&ei=jlGcUpi5JquN8Qfz5YGYDQ&gws_rd=cr
    And when I click in it the cursor is placed at the end of the string, so I have to select the whole string with Ctrl and A or backspace to get rid of it. What changed and how do I get my short url with auto click / select back
    Also, I have opened in safe mode without any addons, didn't make any difference.
    Thanks

    Choose the ''final'' URL you want and paste that in as your newtab URL. If the site redirects your newtab URL in any way (whether to a secure connection, for example, or otherwise), then Firefox's selection code will be defeated and the cursor will appear at the end of the URL.

  • How to embed a browser displaying an xml string in a tab

    Hi,
    I have an xml string which i need to display it in a browser.
    But the browser should be embedded in one of the tabs of a tabstrip ui control and not as a pop up.
    Thanks in advace,
    ajay

    hi alex,
    I need to display the xml output in one of the tabs of a tab strip control.The output should be displayed in the same format like the way it would be displayed in the browser.
    Since it was mentioned in your previous post that it is not possible to embed the browser in a tab, is there a alternative way to display the same.
    thanks and regards,
    ajay

  • Loop over a list of string separated by ;

    Hello,
    i have a list of string in a varchar2 separated by ;
    i wanna make a loop over this list and extract all string inside
    any one has an idea ?
    Thanks
    Regards
    Sallemel

    user10393090 wrote:
    Hello,
    i tried it, i got this error :
    PL/SQL: ORA-00904: "REGEXP_REPLACE": invalid identifierWell we have to assume you've got 10g or 11g unless you specify otherwise as lower versions are unsupported.
    SQL> select substr( the_string
      2                , decode( level, 1, 1, instr(the_string,',',1,level-1)+1)
      3                , decode( instr(the_string,',',1,level), 0, length(the_string), instr(the_string,',',1,level) - decode( level, 1, 0, instr(the_string,',',1,level-1))-1)
      4                ) the_value
      5                from ( select '10,12,20,30,30,3,12,12,56' the_string
      6                       from dual
      7                     )
      8                connect by level < length(replace(translate(the_string,'01234567890','00000000000'),'0')) + 2;
    THE_VALUE
    10
    12
    20
    30
    30
    3
    12
    12
    56
    9 rows selected.
    SQL>

  • Mapping - Split string separated by value ;

    Hi,
    I have a mapping where 4 source values makes the key for 1 target value.
    In the target string (result after value mapping) i want to get the last value in the string "TargetValue1.
    <i>SourceValue1;SourceValue2;SourceValue3;SourceValue4;TargetValue1</i>
    Can this be done without UDF? If not how should the UDF look like?
    Best Regards
    /Claes
    Message was edited by:
            Claes Widestadh

    Hi,
    Yes I have concatenated 4 source values into one string to use them as key in a value mapping to get the target value. The result from the value mapping is a string with the 4 source value + the target value. What I want to do now after the value mapping is to spit this string to get only the target value.
    The string looks like this
    Source sting
    example 1) CC;-;ADJ;fre;
    example 2) CR;+;ADJH;TD;
    Target string:
    example 1) CC;-;ADJ;fre;<b>985</b>
    example 2) CR;+;ADJH;TD;<b>553</b>
    It is the value 985 or 553 that i want to map into the target field. The position for the target value (985, 553) is not a fixed position because of that the length of the source values can vary (see example obove). That means that I cant use the substring right?
    /Claes
    Message was edited by:
            Claes Widestadh
    null
    null

  • Display String in cross tab in place of blank cell

    Hi,
    I am using CR 2008  and my issue is when i run crosstab i am getting a blank values fro some data becuase which that criteria there is no data in Database . I need to display a string in that area. How can I achieve this?

    Hi Venkat,
    There is a Display String formula for fields, accessed by right-clicking the field and selecting Format Field.  This is used to tell Crystal exactly what should be displayed for the field.  Add the following logic (basic syntax):
    if CurrentFieldValue = 0 then
      formula = "your display srting"
    else
      formula = cstr(CurrentFieldValue, "0.00")
    end if
    This will cause all zero values to display as blank.  I added the "0.00" parameter to the cstr() function to show that's how you tell cstr() how you want the number formatted.  See the online help for cstr() for details.
    --Naga.

  • How to separate string into x strings separated by #

    Hi there
    I have the following
    drop table metteordrer2;
    create table metteorder2 as
    select
        '#p1,1525,1864,1880,1957,2036,2042,2043, 1525,1864,1920,1942,1948,1952,1957, 1525,1863,1943,1960,2030,2042,2046,2047,#p2,1525,1864,1880,1957,2036,2042,2043, 1525,1864,1920,1942,1948,1952,1957, 1525,#p3,4,5,6' produkter
        from dual
    ;The output should be:
    ID     PRODUCTS
    P1    1525,1864,1880,1957,2036,2042,2043, 1525,1864,1920,1942,1948,1952,1957, 1525,1863,1943,1960,2030,2042,2046,2047
    p2    1525,1864,1880,1957,2036,2042,2043, 1525,1864,1920,1942,1948,1952,1957, 1525
    p3    p3,4,5,6I need to solve it using recursive subf. since the code should be converted to SS2008 (and this does not support connnect by).
    Could you assist me?
    regards
    Mette

    Hello again.
    I just needed a piece of quiteness at home .... then I got what I needed ... nothing like a warm meal and som quiteness :-)
    This is a working solution in an 11.2 g environment - ready for minor ajustments for SS2008 (just change substr and instr function calls):
    I have made a couple of change in var names, since the now reflect real names, ready to be put infront of a larger query.
    drop table metteordrer2;
    create table metteordrer2 as
    select
        '#p1,1525,1864,1880,1957,2036,2042,2043, 1525,1864,1920,1942,1948,1952,1957, 1525,1863,1943,1960,2030,2042,2046,2047,#p2,2525,1864,1880,1957,2036,2042,2043, 1525,1864,1920,1942,1948,1952,1957, 1525,1863,1943,1960,2030,2042,2046,2047,#p3,4,5,6,#p100,1' alle_linier
        from dual
    select * from metteordrer2;
    WITH   
    ----- split input op i id, og de efterflg. "rækker
    alle_linier (id, linie, tilbage_linier)    AS
    SELECT  SUBSTR (alle_linier , 2, INSTR ( alle_linier  || ',' , ',' ) - 2 )    AS id
        ,    SUBSTR ( alle_linier , INSTR ( alle_linier ,  ',' ) + 1, INSTR (alle_linier || '#','#',2 )-(INSTR ( alle_linier , ',' ) + 1))    AS linie
        ,    SUBSTR ( alle_linier , 1 + INSTR ( alle_linier || '#'  , '#' ,2 ) -1 )   AS tilbage_linier
    FROM    metteordrer2
    UNION ALL
    select  SUBSTR (tilbage_linier , 2, INSTR ( tilbage_linier  || ',' , ',' ) - 2 )    AS id
        ,    SUBSTR ( tilbage_linier , INSTR ( tilbage_linier  , ',') + 1, instr(tilbage_linier || '#','#',2 )-(INSTR ( tilbage_linier, ',' ) + 1))    AS linie
        ,    SUBSTR ( tilbage_linier , 1 + INSTR ( tilbage_linier || '#'  , '#' ,2 ) -1 )   AS tilbage_linier
    FROM    alle_linier
    WHERE    tilbage_linier is not null
    select id, linie from alle_linier;
    {code}
    It produced this:
    {code}
    p1     1525,1864,1880,1957,2036,2042,2043, 1525,1864,1920,1942,1948,1952,1957, 1525,1863,1943,1960,2030,2042,2046,2047,
    p2     2525,1864,1880,1957,2036,2042,2043, 1525,1864,1920,1942,1948,1952,1957, 1525,1863,1943,1960,2030,2042,2046,2047,
    p3     4,5,6,
    p100     1
    {code}
    Best regards
    Mette                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Table as tab separated columns in a file using Java

    I want to design a general java procedure which will take a oracle table name as input and will store the fields of table separated by tabs in a file.
    For this i need to have access to field names of tables as i have to store them as headings.
    How to get field names as strings?
    I know that this can better be created by using file package of oracle and writing a PL/SQL procedure, but it will store it on oracle server machine and i want the file to be on client.
    Any suggestions?
    -Sameer

    In addition to having the data in the Oracle data dictionary, if you're writing a Java program you'll presumably be using JDBC which has a variety of MetaData classes that expose this sort of information.
    If you're looking for speed, you might also search asktom.oracle.com for "SQL Unloader" which is a Pro*C program Tom Kyte wrote for this sort of thing.
    Justin

  • Tab separated columns in sqlldr

    How do i load a file with columns separated by tab. Some people say mention FIELDS TERMINATED BY '\t' and some say FIELDS TERMINATED BY X'9'. Which is correct and what is the difference between the two.
    Oracle version 10.2.
    Please give suggestions. Thanks.

    The Oracle Server Utilities Manual would tell which one is correct,
    Please do not ask questions for which you can find the answer yourself at http://tahiti.oracle.com easily.
    Sybrand Bakker
    Senior Oracle DBA

  • A little help with tokenizing a string

    Have most of this working and i will add the code to the end of the for you all to look at.
    Essentially what i am trying to do is tokenize a string that looks like:
    program int ABC, D;
         begin read ABC; read D;
              while (ABC != D) begin
                                       if (ABC > D) then ABC = ABC - D;
                                       else D = D - ABC;
                                  end;
                             end;
              write D;
         endMy tokeizing stuff works just fine for simpler version of this but it screws up a little when it gets to the "special symbols" that are a combination of more then one special token. The special symbols are:
    ; , = ! [ ] && or ( ) + - * != == < > <= >=Now i obviously have to look for those as tokenizing points, but the problem comes when i get to double ones like &&, or, !=, etc.
    I was wondering if there was a way to make it look for the combination != instead of just the ! and then the =.
    If there is not an easy way to do it what would be the best and easiest way to go about parsing that string into tokens? I am kinda leaning towards string.split but am not quite sure on how to set it up. some examples or pointers would be welcome!!
    Thanks and here is the code of the relevant part:
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.io.*;
    * @author Kyle Hiltner
    public class KHTokenizer implements KHTokenizerInterface
         private String current_token; //used to specify current token
         private int token_count=0; //used to keep track of which token is being asked for
         private ArrayList<String> file = new ArrayList<String>(); //stores the parsed input file
          * Creates a new KHTokenizer with the name of the file as input
          * @param inputFileName the specified file to be read from
          * @throws IOException
         KHTokenizer(String inputFileName) throws IOException
              FileReader freader = new FileReader(inputFileName); //create a FileReader for reading
              BufferedReader inputFile = new BufferedReader(freader); //pass that FileReader to a BufferedReader
              String theFile = Create_String_From_File(inputFile); //create a space separated string for easier tokenizing
              StringTokenizer tokenized_input_file = new StringTokenizer(theFile, ";=,()[] ", true); //tokenize the string using ;, =, and " " as delimiters
              String_Tokenizer(tokenized_input_file, file); //create the array by adding tokens
              this.current_token = file.get(this.token_count); //set the current token to the first in the array
         //----Private Operations----//
          * Determines if the specified word is a special Reserved word
          * @param reserved_word the current token
          * @return true if and only if the reserved_word is a Reserved Word
         private static Boolean Is_Reserved_Word(String reserved_word)
              //determine is reserved_word is one the established Reserved Words
              return ((reserved_word.equals("program")) || (reserved_word.equals("begin")) ||
                        (reserved_word.equals("end")) || (reserved_word.equals("int")) ||
                        (reserved_word.equals("if")) || (reserved_word.equals("then")) ||
                        (reserved_word.equals("else")) || (reserved_word.equals("while")) ||
                        (reserved_word.equals("read")) || (reserved_word.equals("write")));
          * Determines if the specified word is a Special Symbol
          * @param special_symbol the current token
          * @return true if and only if the special_symbol is a Special Symbol
         private static Boolean Is_Special_Symbol(String special_symbol)
              //determines if special_symbol is one of the established Special Symbols
              return ((special_symbol.equals(";")) || (special_symbol.equals(",")) ||
                        (special_symbol.equals("=")) || (special_symbol.equals("!")) ||
                        (special_symbol.equals("[")) || (special_symbol.equals("]")) ||
                        (special_symbol.equals("&&")) || (special_symbol.equals("or")) ||
                        (special_symbol.equals("(")) || (special_symbol.equals(")")) ||
                        (special_symbol.equals("+")) || (special_symbol.equals("-")) ||
                        (special_symbol.equals("*")) || (special_symbol.equals("!=")) ||
                        (special_symbol.equals("==")) || (special_symbol.equals("<")) ||
                        (special_symbol.equals(">")) || (special_symbol.equals("<=")) ||
                        (special_symbol.equals(">=")));
          * Determines if the specified token is an integer
          * @param integer_token the current token to be converted to an integer
          * @return true is and only if integer_token is an integer
         private static Boolean Is_Integer(String integer_token)
              Boolean is_integer=false; //set up boolean for check
              //try to convert the specified string to an integer
              try
                   int integer_token_value = Integer.parseInt(integer_token); //convert the string to an integer
                   is_integer = true; //set is_integer to true
              catch(NumberFormatException e) //if unable to parse the string to an integer set is_integer to false
                   is_integer = false; //set is_integer to false
              return is_integer; //return the integer
          * Determines if the specified token is an Identifier
          * @param identifier_token the current token
          * @return true if and only if the identifier_token is an identifier
         private static Boolean Is_Identifier(String identifier_token)
              //rule out that it is a Reserved Word, Special Symbol, or integer so then it must be an Identifier; so return true or false
              return ((!Is_Reserved_Word(identifier_token)) && (!Is_Special_Symbol(identifier_token)) && (!Is_Integer(identifier_token)));
          * Determines which value to assign to the specified token
          * @param which_reserved_word_token the current token
          * @return token_value the integer value relating to the Reserved Word token
         private static int Which_Reserved_Word(String which_reserved_word_token)
              int token_value=0; //set initial token_value
              //run through and check which Reserved word it is and then set it to the correct value
              if(which_reserved_word_token.equals("program"))
                   token_value = ReservedWords.PROGRAM.ordinal()+1;
              else if(which_reserved_word_token.equals("begin"))
                   token_value = ReservedWords.BEGIN.ordinal()+1;
              else if(which_reserved_word_token.equals("end"))
                   token_value = ReservedWords.END.ordinal()+1;
              else if(which_reserved_word_token.equals("int"))
                   token_value = ReservedWords.INT.ordinal()+1;
              else if(which_reserved_word_token.equals("if"))
                   token_value = ReservedWords.IF.ordinal()+1;
              else if(which_reserved_word_token.equals("then"))
                   token_value = ReservedWords.THEN.ordinal()+1;
              else if(which_reserved_word_token.equals("else"))
                   token_value = ReservedWords.ELSE.ordinal()+1;
              else if(which_reserved_word_token.equals("while"))
                   token_value = ReservedWords.WHILE.ordinal()+1;
              else if(which_reserved_word_token.equals("read"))
                   token_value = ReservedWords.READ.ordinal()+1;
              else
                   token_value = ReservedWords.WRITE.ordinal()+1;
              return token_value; //return the token_value
          * Determines which value to assign to the specified token
          * @param which_special_symbol_token the current token
          * @return special_symbol_token_value the integer value relating to the Special Symbol token
         private static int Which_Special_Symbol(String which_special_symbol_token)
              int special_symbol_token_value=0; //set initial value
              //check to figure out which Special Symbol it is and assign the correct value
              if(which_special_symbol_token.equals(";"))
                   special_symbol_token_value = SpecialSymbols.SEMICOLON.ordinal()+11;
              else if(which_special_symbol_token.equals(","))
                   special_symbol_token_value = SpecialSymbols.COMMA.ordinal()+11;
              else if(which_special_symbol_token.equals("="))
                   special_symbol_token_value = SpecialSymbols.EQUALS.ordinal()+11;
              else if(which_special_symbol_token.equals("!"))
                   special_symbol_token_value = SpecialSymbols.EXCLAMATION_MARK.ordinal()+11;
              else if(which_special_symbol_token.equals("["))
                   special_symbol_token_value = SpecialSymbols.LEFT_BRACKET.ordinal()+11;
              else if(which_special_symbol_token.equals("]"))
                   special_symbol_token_value = SpecialSymbols.RIGHT_BRACKET.ordinal()+11;
              else if(which_special_symbol_token.equals("&&"))
                   special_symbol_token_value = SpecialSymbols.AND.ordinal()+11;
              else if(which_special_symbol_token.equals("or"))
                   special_symbol_token_value = SpecialSymbols.OR.ordinal()+11;
              else if(which_special_symbol_token.equals("("))
                   special_symbol_token_value = SpecialSymbols.LEFT_PARENTHESIS.ordinal()+11;
              else if(which_special_symbol_token.equals(")"))
                   special_symbol_token_value = SpecialSymbols.RIGHT_PARENTHESIS.ordinal()+11;
              else if(which_special_symbol_token.equals("+"))
                   special_symbol_token_value = SpecialSymbols.PLUS.ordinal()+11;
              else if(which_special_symbol_token.equals("-"))
                   special_symbol_token_value = SpecialSymbols.MINUS.ordinal()+11;
              else if(which_special_symbol_token.equals("*"))
                   special_symbol_token_value = SpecialSymbols.MULTIPLY.ordinal()+11;
              else if(which_special_symbol_token.equals("!="))
                   special_symbol_token_value = SpecialSymbols.NOT_EQUALS.ordinal()+11;
              else if(which_special_symbol_token.equals("=="))
                   special_symbol_token_value = SpecialSymbols.EQUALS_EQUALS.ordinal()+11;
              else if(which_special_symbol_token.equals("<"))
                   special_symbol_token_value = SpecialSymbols.LESS_THAN.ordinal()+11;
              else if(which_special_symbol_token.equals(">"))
                   special_symbol_token_value = SpecialSymbols.GREATER_THAN.ordinal()+11;
              else if(which_special_symbol_token.equals("<="))
                   special_symbol_token_value = SpecialSymbols.LESS_THAN_OR_EQUAL_TO.ordinal()+11;
              else
                   special_symbol_token_value = SpecialSymbols.GREATER_THAN_OR_EQUAL_TO.ordinal()+11;
              return special_symbol_token_value; //return the correct value
          * Creates the string separated by white spaces to be read by the String Tokenizer
          * @param input_file the stream to be converted into a string
          * @return theFile the inputFile converted to a string
          * @throws IOException
         private static String Create_String_From_File(BufferedReader input_file) throws IOException
              String theFile="", keepReadingFromFile=""; //set initial value of the strings
              //run through the stream and create a file
              while(keepReadingFromFile != null)
                   keepReadingFromFile = input_file.readLine(); //read one line at a time
                   //if the line is null stop and break
                   if(keepReadingFromFile == null)
                        break;
                   else //keep reading from the file and make it into a string
                        theFile = theFile + keepReadingFromFile;
              theFile = theFile.replaceAll("\\t", " "); //remove any tabs from the string and replace with spaces so it is easier to Tokenize
              return theFile; //return the newly created string
          * Creates the array of tokens but tokenizing based on the given parameters
          * @param theInputFile
          * @param file to store the individual tokens in
         private void String_Tokenizer(StringTokenizer theInputFile, ArrayList<String> file)
              String token=""; //set up the intial token
              //keep reading with there is still more in the token stream
              while (theInputFile.hasMoreTokens())
                   token = theInputFile.nextToken(); //set token to the next token
                   //if the token is not a white sapce then add it to the array
                   if(!token.equals(" "))
                        file.add(token); //add token to the array
              file.add("nill"); //add a final spot to designate the end of the file
         //----Public Operations-----//
          * Returns the integer value of the current token
          * @return the integer value of the current token
         public int getToken()
              int token_number=0; //set initial value
              //determine if the current token is a Reserved Word, Special Symbol, Identifier, or nill (for end of file)
              if(Is_Reserved_Word(this.current_token))
                   token_number = Which_Reserved_Word(this.current_token); //determine the correct value for the Reserved Word
              else if(Is_Special_Symbol(this.current_token))
                   token_number = Which_Special_Symbol(this.current_token); //determine the correct value for the Special Symbol
              else if(Is_Integer(this.current_token))
                   token_number = 30; //the current token is an integer so set it to 30
              else if(this.current_token.equals("nill"))
                   token_number = 32; //the current token is nill so set it to 32
              else//(Is_Identifier(this.current_token))
                   token_number = 31; //the token is an identifer so set it to 31
              return token_number; //return the token_number
          * Sets the current token as the next one in line
         public void skipToken()
              //keep getting the next token as long as token_count is less then the size of the array
              if(this.token_count < file.size()-1)
                   this.token_count++; //increase token_count
                   this.current_token = file.get(token_count); // get the new token
          * This method can only be called to convert an integer in string form to its integer value.
          * If called on an non integer token an error is printed to the screen and execution of the Tokenizer is stopped.
          * @return integer value of the specified token assuming the token is an integer
         public int intVal()
              int integer_token_value=0; //set the initial value
              //if true is returned then go ahead and convert
              if(Is_Integer(this.current_token))
                   integer_token_value = Integer.parseInt(this.current_token); //parse the current_token string and get an integer value
              else // print he error message and exit Tokenizing
                   System.out.print("You called intVal() on a non-integer token. You tryed to convert the " );
                   if(Is_Reserved_Word(this.current_token))
                        System.out.print("reserved word " + "\"" + this.current_token +"\"" + " to an integer");
                   else if(Is_Special_Symbol(this.current_token))
                        System.out.print("special symbol " + "\"" + this.current_token +"\"" + " to an integer");
                   else
                        System.out.print("identifier " + "\"" + this.current_token +"\"" + " to an integer");
                   System.exit(1); //exit the system and quit tokenizing
              return integer_token_value; //return the current_token integer value
          * Returns a string if and only if the token is of the id type.
          * @return the name of the id token
         public String idName()
              String id_token_name=""; //setup the initial value
              //if the current_token is an Identifer then set it so and return it.
              if(Is_Identifier(this.current_token))
                   id_token_name = this.current_token;
              else // print message and quit tokenizing
                   System.out.print("You called idName() on ");
                   if(Is_Reserved_Word(this.current_token))
                        System.out.print("a reserved word, ");
                   else if(Is_Special_Symbol(this.current_token))
                        System.out.print("a special symbol, ");
                   else
                        System.out.print("an integer, ");
                   System.out.println("which is not an identifier token.");
                   System.exit(1); //exit and quit tokenizing
              return id_token_name; //return the id_token_name if possible
    }left some stuff out

    volunteers are supposed to read all that? and no tea and crumpets?
    Seriously though, we don't want to see all of your code, we don't even want to see most of your code, but rather you should condense your code into the smallest bit that still compiles, has no extra code that's not relevant to your problem, but still demonstrates your problem, in other words, an SSCCE (Short, Self Contained, Correct (Compilable), Example). For more info on SSCCEs please look here:
    [http://homepage1.nifty.com/algafield/sscce.html|http://homepage1.nifty.com/algafield/sscce.html]

  • Unexpected behavior of spreadsheet string to array function

    Hello,
    I found some weirdness in LabVIEW 2011 that I do not understand. In the attached vi, I provide a one-dimensional spreadsheet string separated by spaces. I use the spreadsheet string to array function to convert this spreadsheet string into an array of strings.
    I ran into problems when I wanted to specify a space character as the delimiter.
    The conversion works as intended, if I do not specify a delimiter (i.e., the default tab delimiter is used). But if I specify the delimiter, only the first element of the spreadsheet string is converted. I do not understand this behavior.
    Thanks for your help.
    Peter
    Solved!
    Go to Solution.
    Attachments:
    Test spreadsheet string to array.vi ‏9 KB

    You don't have spaces in your string. You have tabs and of course the default delimiter works. Right click and select '\' Codes Display and see the \t.

  • Put a string in an Internal Table

    Dear All,
    Hope you have a solution.
    In a program, I have a field type String.
    In this field I put some values separated by TAB -
    I would like to take this field and put it in the header line of an internal table.
    The length of the values put on the string file is not fix.
    Ex: ITAB
                Field1(50)
                FIELD2(50),
                Field3(50)
                FIELD4(50)
    Field_string = 'TOTO#TATA#TITI#TUTU#'
    I would like to obtain
        ITAB-field1 = TOTO
        ITAB-field2 = TATA
        ITAB-field3 = TITI
        ITAB-field4 = TUTU.
    And of course I don't want to write something like
        IF 1 then ITBA1-FIELD1 = u2026
        IF 2 then ITBA1-FIELD2 = u2026
      I'll be surprised that we can't do that in one coding line.
    DO you have an idea ?
    Thanks in advance

    hi,
    see the below pseudo code
    DATA : text TYPE string VALUE 'toto#tata#titi#tutu',
           it_tab TYPE TABLE OF string,
           wa_tab LIKE LINE OF it_tab.
    SPLIT text AT '#' INTO TABLE it_tab.
    " it_tab contain four rows
    LOOP AT it_tab INTO wa_tab.
    "loop it_tab and do your operations
    ENDLOOP.
    BREAK-POINT.
    Thanks

Maybe you are looking for