Split statement separating by comma

I am my data in tdines..........
i am having two fields data in single line separated by comma.
Now i moved tdlines data to V1.
i have to use split statemnt  by using comma so that it should get in to V2 and V3
EX:   1234a,65432a
this is tdlines.
i have moved that to V1.
so V1 =  1234a,65432a
I wanted to get
V2 = 1234a
V3 = 65432a
Please tell the syntax

split text1 at var into table it_text. " chops the string at value in "var"(put ',' in this var) and puts sequentially in table it_text(field shud b char)
or
split text1 at var into text1 text2 text2.   " into individual variables
regards,
Sumit
Edited by: Sumit Nene on Mar 31, 2010 6:57 AM

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)

  • Error in SPLIT statement

    I have a piece of code like below:
    select * from zconfig into table i_zconfig where ZKEY = 'ZI2X11'.
    if sy-subrc eq 0.
    loop at i_zconfig.
    split i_zconfig-zto at "," into table i_ordtyp.
    loop at i_ordtyp.
    write:/ i_ordtyp-ordtyp.
    endloop.
    endloop.
    endif.
    It shows a syntactic error in the split statement as:     
    "INTO" expected after "LOOP"
    Please suggest!

    see the syntax below.
    DATA: str1 TYPE string,
          str2 TYPE string,
          str3 TYPE string,
          itab TYPE TABLE OF string,
          text TYPE string.
    text = `What a drag it is getting old`.
    SPLIT text AT space INTO: str1 str2 str3,
                              TABLE itab.
    otherwise u have to get the values in variable then...append that into a internal table..
    Regards
    Sugumar G
    Edited by: Sugumar Ganesan on Mar 25, 2008 11:53 AM

  • How to retrieve different data separated by comma into one column

    Hi all,
    We have a Custom View.In that some of the customer's Bill-To address is different remaining all columns contain same data.In that case if we query with that customer_number it displays more than one row with different Bill-to addresses,it is fine.But our requirement is we need to display only one row for that customer_number and Bill-to address column shows all Bill-to addresses corresponding to that customer separated by comma.
    Could anyone give us any idea to solve this.
    Thanks in Advance,
    Dhana

    i do not a concatenated data
    i have a data in a table with columns A & B of same size
    A B
    1 2
    2
    3 1
    4 2
    5 3
    6 5
    7 1
    8 4
    9
    10 8
    if my where condition is 'where A=2'
    my output should be
    1
    2
    3
    4
    5
    6
    8
    10
    i want my query to search as loop so that it keeps on searching
    for related data as in my case it is
    2 is linked to 1
    1 is linked to 3
    3 is linked to 4
    my query should keep on seaching for linked numbers till
    it does not find any mathing linked numbers
    and the resulted output should come in one single column

  • Downloading in .txt format separated by comma

    Hello everyone,
    In order to download an internal table in .txt format separated by comma (,) , I am using :
    1.        SAP_CONVERT_TO_CSV_FORMAT
    2.       GUI_DOWNLOAD
    The problem is that the file downloaded is separated by ; and not comma.
    I am not passing any Filetype in GUI_DOWNLOAD and the extension is .TXT.
    I dont want to use REPLACE ALL OCCURANCES OF  before calling GUI_DOWNLOAD.
    Can someone plz suggest another way ?
    Thanks

    CONSTANTS :  c_delim TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
    CONCATENATE   'Physical Inventory Document'
                    'Item '
                    'Material '
                    'Material Description'
                    'Material Group'
                    INTO wa_excel_dwnld-line
                                   SEPARATED BY c_delim.
                   APPEND wa_excel_dwnld TO it_excel_dwnld.
                   CLEAR: wa_excel_dwnld.
    LOOP AT it_output INTO wa_output.
    CONCATENATE   wa_output-iblnr
                      wa_output-zeili
                      wa_output-matnr
                      wa_output-maktx
                      wa_output-matkl  
                     INTO wa_excel_dwnld-line
                           SEPARATED BY c_delim.
        APPEND wa_excel_dwnld TO it_excel_dwnld.
    ENDLOOP.
    CLEAR wa_excel_dwnld.
    DATA: l_flname     TYPE string,
                          l_string     TYPE string.
    MOVE p_file TO l_flname.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_flname
          filetype                = 'ASC'
          write_field_separator   = '#'
        TABLES
          data_tab                = it_excel_dwnld
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
    Download in CSV if you want comma separated file.
    Revert if you need any more help.

  • Update Table statement in pre-commit trigger

    Hi,
    I would need to update one table before commit in the form and hence I need to write an update table statement in pre-commit trigger. Can anyone help me with the sample code or how sould i be able to write a Update table statement from form-level trigger. Normal update statement is throwing me errors.
    Thanks in adv

    I wouldn't recommend the PRE-COMMIT trigger unless it is your requirement to execute the UPDATE statement every time the form commits, whether it is updating or inserting or deleting.
    Other wise you can use the PRE-UPDATE, PRE-DELETE and PRE-INSERT triggers; for this case you create a procedure under Program Units node in the Form's navigator that includes your "UPDATE" SQL statement and you call this procedure from the triggers you need to execute it from.
    Example:
    PROCEDURE UPDATE_MYTABLE IS
    BEGIN
      UPDATE MYTABLE SET MY_COLUMN1 = MY_VALUE1,
                                       MY_COLUMN2 = MY_VALUE2,
                                       MY_COLUMN3 = MY_VALUE3
      WHERE ... condition;
    END;
    PRE-UPDATE trigger code:
    BEGIN
      UPDATE_MYTABLE;
    END;Try it and let us know if this is your requirement.
    Tony
    Edited by: Tony Garabedian on Sep 5, 2008 10:29 AM

  • Fields separated by comma using GUI_DOWNLOAD

    Hi All,
      I want to download internal table data separated by comma.
    I am using GUI_DOWNLOAD function module.
    I am using separator as comma,but still the data is getting downloaded as Tab delimited.
    Please let me know what needs to be done.
    Thanks,
    SP
    <thread moved, has nothing to do with ABAP Objects. Please choose your forums more carefully in future>
    Edited by: Mike Pokraka on Aug 18, 2008 3:09 PM

    Hi,
    Check this sample code,
    TYPES:
      BEGIN OF type_itab1,
        string TYPE string,
      END OF type_itab1.
    DATA:
      BEGIN OF itab OCCURS 0,
        vbeln  LIKE vbap-vbeln,
        posnr  LIKE vbap-posnr,
      END OF itab.
    DATA:
       wa_itab TYPE type_itab1,
       itab1   TYPE STANDARD TABLE OF type_itab1.
    SELECT vbeln
           posnr
        UP TO 5 ROWS
      FROM vbap
      INTO TABLE itab.
    SORT itab.
    DELETE ADJACENT DUPLICATES FROM itab COMPARING ALL FIELDS.
    LOOP AT itab.
      CONCATENATE itab-vbeln
                  itab-posnr
             INTO wa_itab-string
             SEPARATED BY ','.
      APPEND wa_itab TO itab1.
    ENDLOOP.
    CHECK sy-subrc EQ 0.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
    EXPORTING
    FILENAME = 'D:\temp\test.txt'
    WRITE_FIELD_SEPARATOR = ','
    FILETYPE = 'ASC'
    CHANGING
    DATA_TAB = itab1.
    Regards
    Adil

  • IBM Client Access ODBC Driver DB2/400 SQL7017 Unable to run statement with specified commit level #-7017

    Changed IBM As/400 system from V4R5 to V5R2 and now get this message when using Access to link to external database the same exact settings on everything I can determine on all computers. 
    IBM Client Access ODBC Driver DB2/400 SQL7017 Unable to run statement with specified commit level #-7017
    I have Commit immediate = *NONE in the Advanced Server Options in ODBC Data Source Administrator. It shows the AS/400 files in the Link Tables list and allows me to add it to the Access table objects, but when I try to open it in datasheet view I get that
    error.
    What am I missing?

    Ouch. That's a lot of paste...
    INFO: PATH = C:\oracle\product\10.2.0\client_2;C:\oracle\product\10.2.0
    \client_1;T:\SDCHS20N440\Oracle\agent10g\jlib;T:\SDCHS20N440
    \Oracle\agent10g\bin
    INFO: The flags set for this home (T:\SDCHS20N440\Oracle\agent10g) are:clean
    SEVERE: Abnormal program termination. An internal error has occured. Please
    provide the following files to Oracle Support : I wonder how "T:" is involved. Looks like you got a management agent on a network drive. If so, is this Home registered with the oraInventory on your machine? Can you try the same install on a machine without any previous Oracle software installed?

  • Project in dutch language, but use a point as decimal separator (not comma)

    I am working with Haley v9.4.1.71.
    I am preparing a demo for coming wednesday in which I want Haleys to work together with Siebel. I have now ran in to a problem for which I can’t find the solution. I have made the rules in the Dutch language wich all works fine. As it seems it also uses the dutch format for numbers, this means that the decimal separator is a comma instead of a point. Siebel however, requires the decimal separator to be a (point).
    Data delivered from Haleys to Siebel is in the current situation therefore converted incorrectly.
    My question is:
    How can I keep the dutch language, but use the point as a decimal separator (instead of the comma).
    Thing I have tried already:
    - Configure the file hi-servlet.properties with the Haley Interactive Configuration Tool
    The ‘Application Output Numeric Format’ is #,###,###,##0.###############
    This looks correct, but still in the User Interface the comma is used as the decimal separator.
    - Set the Windows Regional and Language Options (Tab Regional Options) to English(United States) and customized the Decimal symbol to a point.
    - I have also looked in the Folder C:\Program Files\Haley\Office Rules 2008\Language\Dutch but couldn’t find specific settings for the comma separator
    I hope you can help me solve this issue.
    Sake Kampen

    Thank you for the reply.
    The problem to upgrading to v10 is that we make use of a OPA <-> Siebel integration developed by the local Dutch Oracle pre-sales team. And I don't know if we can replicate what Oracle has done for us if we upgrade.
    But the problem I'm having doesnt lie with the connection but with OPA itself, in OPA the decimal separator is a comma where I want it to be a point. This problem only exists when I create a Dutch project, when I create an English project (on the same windows environment with the same regional settings) the decimal separator is a point.
    I have advanced a little bit, but I’m not quite there yet.
    Haleys seems to use the Regional settings of Windows.
    The regional settings of my Windows-installation was English, so I temporarily went to Dutch to see what the settings were there. Ofcourse the numberformatting was in the dutch way with a comma as the decimal separator. So I changed this to a point and clicked ‘Apply’. Then I changed the language back to English and clicked ‘Apply’.
    In Haleys the same error persisted.
    So I went back to the regional settings of windows, and there I went back to dutch (English was still selected) and saw to my surprise that the ‘corrected’ decimal separator for dutch was set back to its default.
    So I changed it again to a point and now kept the dutch regional setting, and tested Haleys again. The behaviour of Haleys then changed. But surprisingly the decimal signs are now deleted.
    e.g.:
    a value derived from a table in excel is transformed as follows
    in Excel: 28.5 ==> in Haleys: 285
    Provided by user in Haleys: 543.1234 ==> shown in Haleys summary screen 5.431.234
    I can provide decimal numbers and they seem to be accepted, but if I show them in the summary screen (using the%%) I see that every number is rounded to a whole one in the way described above.
    Are you certain this is a known issue that has been adressed in Haleys 10?

  • Max no. of Update SQL statements before a commit

    In Oracle 10.2 what is maximum number of UPDATE statements that I can execute before issuing commit.
    If maximum is there either by no. of SQL statements or size in KB, what will happen if I go above this number.
    Thanks in advance for your response.
    Edited by: vbforums on Feb 21, 2011 3:50 PM

    sb92075 wrote:
    I executed 5000+ update statements from Java in one shotI am curious.
    Does each UPDATE change only a single row?
    I'll ask a different way.
    Can a single UPDATE statement change all desired rows?yes
    SQL> conn scott/tiger
    Connected.
    SQL> select table_name from user_tables;
    TABLE_NAME
    EMP
    DEPT
    SQL> create table mytest(cola varchar2(1));
    Table created.
    SQL> insert into mytest values ('A');
    1 row created.
    SQL> insert into mytest values ('A');
    1 row created.
    SQL> insert into mytest values ('A');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from mytest;
    C
    A
    A
    A
    SQL> update mytest set cola='B' where cola='A';
    3 rows updated.
    SQL> commit;
    Commit complete.
    SQL> select i * from mytest;
    C
    B
    B
    B
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@vmlnx01 dbs]$ exit
    logout

  • SPLIT STATEMENT

    Hi,
        I have down load a file from application server into an internal table having a single field using read statement. From that internal table i am trying to split the records and to fill an internal table with respective fields. But only the first records i am able to get. The sy-subrc is returning 4. Can anybody give the suggession how to split all the fields and get into the required format to fill internal table. if u are having provide the coding.......Urgent........
    Thanks......

    refer this demo code -
    1)
    data: begin of itab occurs 0,
          ch(20),
          end of itab.
    data : begin of itab1 occurs 0,
           ch1(10),
           ch2(10),
           end of itab1.
    start-of-selection.
    itab-ch = 'Amit Tyagi'.
    append itab.
    split itab at SPACE into itab1-ch1 itab1-ch2.
    append itab1.
    write:/ itab1-ch1,' ',itab1-ch2.
    2) to upload a Text tab delimted file to internal table refer below code,u have to use gui_upload (ws_upload is obselete FM) -
    data :begin of itab occurs 0,
          pernr(8),
          bdate(10),
          edate(10),
          mail(30),
          end of itab.
    parameters: p_file like rlgrap-filename default 'C:\temp\emp.txt'.
    start-of-selection.
    perform read_file.
    *&      Form  read_file
          text
    -->  p1        text
    <--  p2        text
    FORM read_file .
    DATA: full_file_name    TYPE string.
    full_file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = full_file_name
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = ','
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = itab
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
      MESSAGE e000(000) WITH 'Upload-Error; RC:' sy-subrc.
    ENDIF.
    ENDFORM.                    " read_file

  • Thousand Separator as Comma instead of Period

    Hi mates,
      At the moment my KF is being shown as 206.338 instead of 206,338.00
      Please advice how can I have a comma as a Thousand Separator instead of the Period(dot)
      Thanks

    Hi John,
        Try to make changes in the menu Sytem-> User Profile -> Own Data -> Default Tab-> Change Decimal Notation.
    Hope it may help you!!!!
    Regards,
    Amit

  • How to load flat file containing data(separated by commas) into cube sapbi.

    hi gurus,
    please help me with this question?
    i have some data in the flat file for example, address but with commas for ex:
    h.no:123,colony,area,hyd-59.now i have even other columns in this flat file like customer name,age.....i want to know ,how to load this data into infocube. where in when it comes to address column sap bi takes it as a single column in the generated report.

    Hi Amulya,
    To get reports on all ur records save ur flat file in .CSV format -> to do this open ur flat file, save as "filename.csv".
    -> CSV is nothing but comma seperator value, sap supports two types of formats 1).csv and 2) ASCII format.
    we prefer .csv format.
    check this link for step by step modelling.
    http://www.scribd.com/doc/3804698/SAP-BW-StepBystep-From-Fu-Fu
    http://books.google.co.in/books?id=3wBjrMDWescC&pg=PA184&lpg=PA184&dq=stepbystepdocumentationfor+sap-bw&source=bl&ots=RIp
    T1knFet&sig=_4HOg59Om504Zb9RObF9Ir_oE64&hl=en&sa=X&oi=book_result&resnum=3&ct=result#PPP1,M1
    hope it helps u,
    Thanks,
    Sai Chand.
    Edited by: sai chand on Jan 26, 2009 10:04 PM

  • Column contents separated by commas using a select

    Hi,
    My SQL query output looks like this
    Host Name IP Address List Primary Address
    IEGMEUDUB--01R     135.32.248.132          135.32.248.132
    IEGMEUDUB--01R     135.42.164.54          135.32.248.132
    IEGMEUDUB--01R     135.42.165.198     135.32.248.132
    IEGMEUDUB--01R     139.96.195.254     135.32.248.132
    But I want to have in below format.
    I want to see the output in single line.That is instead of repeating the same rows,I want to separate them with commas.When the host name is repeated ,I want to separate the IP Address List column by commas.
    Output should look like below.
    Host Name IP Address List Primary Adderss
    IEGMEUDUB--01R     135.32.248.132,135.42.164.54,135.42.165.198     135.32.248.132
    Is it possible? Please advise.
    Thanks in advance.
    Regards
    Jack

    Wrong forum; SQL Developer is a tool. You want SQL And PL/SQL...
    K.

  • SQL statement order in commit

    Hi, we are evaluating Kodo 3.2.2
    If during same transaction one deletes a persistent object and then
    creates a new one with the same application identity, kodo disregards the
    operation order and executes delete after insert on commit. This either
    violates datastore constraints or if there is an unmapped primary key in
    datastore, the result is that the object is silently deleted without one
    being aware of this.
    How in this situation an object those identity consist of other (related)
    object keys can be managed? Can an non-embedded object, owned by another
    object and the key constructed from a name and the owner id, be managed by
    Kodo presenting deletes and creates in the same transaction, without
    workarounds?
    Thanks,
    Fedor

    Abe White wrote:
    Actually this should work, and we have internal test cases that suggest itdoes.
    Please send a contrary test case to [email protected] and we'll take
    a
    look.Thanks, the solution did work.

Maybe you are looking for

  • Windows True Type font fine in Font Book but not in some apps

    I got a Windows True Type font from a guy having some issues with it when printing website on Windows XP and I thought I'd try the font on Mac OS X 10.4.4. It imports fine into Font Book and previews fine. When I opened up TextEdit the font can be se

  • Constraints between two or more tables

    Dear all, I have a general question, i searched in Google but i couldn't find any result. if i want to add constraints to a table it is easy , but what if in this "Check " part, i also want to consider records from another table? how it is possible?

  • Depreciation Posting for Single Assets

    Dear All, We are in ECC5. We are trying to Run Depreciation (AFAB) for Single Assets by giving Assets Number.But it is not Executing. Can U Pls help us Regarding this. Thanks & Regards, Pankaj

  • InDesign CC 2014 crashing when I try to update the links

    InDesign CC 2014 isn't responding after I updated the links. I replaced InDesign preferences, moved the missing links into the right file (instead of relinking).  The problem is still there and Indesign still not responding. I had to press CMD+ALT+ES

  • Debugger: Can't make a connection

    Hi there, When debugging my application, I can't seem to make a connection to the debugger. I've tried the "right-click" the swf, choose 'debugger', choose 'other machine' and enter '127.0.0.1' option but I still can't connect. 'localhost' doesn't wo