Statement SPLIT.

Hi,
i have a simle VAR1 (CHAR255) which contains text
like 'test1morelines' or 'contain1moretext'' as example.
I will only use the text before 1.
i split at like this: split VAR1 at '1' into VAR1 dummy.
It works OK, but i have to use the seconc VAR dummy.
Is there any statement that deletes all char starting at vaue 1?
thanks,
regards, Dieter

hiii
first use FIND statement for finding '1' in variable then use sy-fdpos to get that position and then you can replace all value by 'SPACE' using offset (following abap statement)
REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new
                [IN {BYTE|CHARACTER} MODE].
regards
twinkal

Similar Messages

  • Split and tokens

    i was wondering if i cud add into my token, such as add hello into to "token" when i type "helloworld" (with no space)
    if  (tokens.matches("(?i).*hello.*")) {
    // how do i add "hello" into token
    thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    ok so i don't want to seem I'm not willing to try myself but i find a way to add the space before the hello or after. but my token results in
    hello world
    but i need
    hello
    world
    that way i will know i have put it in different tokens coz (hello world) is still not split theres just a space in it.
    if  (tokens.matches("(?i).*[^ ]World.*")) {
    tokens[i] = tokens[i].replaceAll("World"," World ");
    } if (tokens[i].matches("(?i).*Hello[ ^].*")){
    tokens[i] = tokens[i].replaceAll("Hello","Hello ");
    }P.S i already set to split at blank spacesString splitPattern = ("\\s+");
    tokens = statement.split(splitPattern);
    for (int i = 0; i < tokens.length; i++) {}Thanks 4 the replies
    Edited by: ahmed_mo on Apr 21, 2008 1:33 AM
    Edited by: ahmed_mo on Apr 21, 2008 1:35 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to use "SPLIT" on the string

    Hi,
    i am using split on an internal table  where the field in the table is a string.
    the following is the code.
    TYPES:BEGIN OF IT_MAT,
         MATERIAL TYPE STRING,
         END OF IT_MAT.
    DATA IT_MATERIAL TYPE IT_MAT OCCURS 0
         WITH HEADER LINE.
    and after populating the internal table with some string values
    i am using this statement:-
    split it_material at '|' into it_result_table-field1  w_remaining.
    Here i am getting an error message saying that it_material must be a character-type data object.
    please help me out in this
    thanks
    kumar

    Hi kumar,
    Please check this thread by clicking on the below link. It will solve ur problem.
    Re: how to Split a String ?
    Regards,
    KK

  • Flat file load - filename in updaterule/transferrule

    Hi there
    I am working on a solution where i need to use a part of the file name to include it in the transfer structure or update rule. The filename contains a date which is to be used as a version concept.
    Is there a table where i can select this information during loadtime?
    Chris

    hi Chris,
    this is the 'how to' get the table name :
    go to any infopackage with flat file upload, tab 'external data', cursor position on the box contains file path, press F1, will come out 'performance assistant' screen, click on 'technical info', in the next screen, see for Field Data : 'Transparent tabl' and 'Field name'. there table RSLDPSEL and field name FILENAME.
    in this case, the table is transparent table(straight forward), if not transparent table then may take more effort or even unable to get the where the data filled.
    with se16 view table RSLDPSEL, get another info LOGDPID may be neeeded, LOGDPID = Infopackge technical name.
    since the file path name may contains "\", in your routine you may need abap statement "SPLIT AT \" to get the file name only.
    can consider to make such name convention for file name and date always take current date (sy-datum) then can simplify the procedure ?

  • Amount comes multiple times against document number

    Hi,
    I have a query in my report that where the A/c Document numbers have the multiple line items, it goes in loop..means it print the value multiple times like: -
    5500004344...............4500
    5500004345...............5000
    5500004345...............5100
    5500004345...............5200
    5500004346...............5100
    It is taking the 5500004345 value 5100, in the 5500004346 document number.(saw in debugging time)..
    But when it have the single document number, it is showing the correct value...
    please check my code:----
    REPORT  zak_mat_pur_rudrapur_new NO STANDARD PAGE HEADING LINE-SIZE 125  .
    TABLES : mseg, ekpo, mkpf, rseg, bkpf, bseg, lfa1.
    TYPE-POOLS : slis.
    DATA : BEGIN OF itab OCCURS 0,
           belnr LIKE bkpf-belnr,
           gjahr LIKE bkpf-gjahr,
           budat LIKE bkpf-budat,
           awkey LIKE bkpf-awkey,
           belnr1(10) TYPE c,                             " LIKE rseg-belnr,
           gjahr1 LIKE rseg-gjahr,
           ebeln LIKE rseg-ebeln,
           ebelp LIKE rseg-ebelp,
           wrbtr LIKE rseg-wrbtr,
           menge LIKE rseg-menge,
           bstme LIKE rseg-bstme,
           lfbnr LIKE rseg-lfbnr,
           ebeln1 LIKE ekpo-ebeln,
           ebelp1 LIKE ekpo-ebelp,
           txz01 LIKE ekpo-txz01,
           mblnr LIKE mseg-mblnr,
           lifnr LIKE mseg-lifnr,
           lfbnr1 LIKE mseg-lfbnr,
           rate TYPE p DECIMALS 2,
           name1(40) TYPE c , " like lfa1-lifnr,
           dmbtr LIKE bseg-dmbtr,
           dmbtr1 LIKE bseg-dmbtr,
           sum TYPE p DECIMALS 2,
           sum1 TYPE p DECIMALS 2,
           rate1 TYPE p DECIMALS 2,
           lfpos LIKE rseg-lfpos,
           END OF itab.
    DATA : BEGIN OF itab2 OCCURS 0,
           belnr LIKE bkpf-belnr,
           gjahr LIKE bkpf-gjahr,
           budat LIKE bkpf-budat,
           awkey LIKE bkpf-awkey,
           belnr1(10) TYPE c,                             " LIKE rseg-belnr,
           gjahr1 LIKE rseg-gjahr,
           ebeln LIKE rseg-ebeln,
           ebelp LIKE rseg-ebelp,
           wrbtr LIKE rseg-wrbtr,
           menge LIKE rseg-menge,
           bstme LIKE rseg-bstme,
           lfbnr LIKE rseg-lfbnr,
           ebeln1 LIKE ekpo-ebeln,
           ebelp1 LIKE ekpo-ebelp,
           txz01 LIKE ekpo-txz01,
           mblnr LIKE mseg-mblnr,
           lifnr LIKE mseg-lifnr,
           lfbnr1 LIKE mseg-lfbnr,
           rate TYPE p DECIMALS 2,
           name1(40) TYPE c , " like lfa1-lifnr,
           dmbtr LIKE bseg-dmbtr,
           dmbtr1 LIKE bseg-dmbtr,
           sum TYPE p DECIMALS 2,
           sum1 TYPE p DECIMALS 2,
           rate1 TYPE p DECIMALS 2,
           lfpos LIKE rseg-lfpos,
           END OF itab2.
    DATA : w_container TYPE scrfname VALUE 'CL_GRID',
           w_cprog TYPE lvc_s_layo,
           g_repid LIKE sy-repid,
           w_save TYPE c,
           w_exit TYPE c,
           cl_grid TYPE REF TO cl_gui_alv_grid,
           cl_custom_container TYPE REF TO cl_gui_custom_container,
           it_fld_catalog TYPE slis_t_fieldcat_alv,
           wa_fld_catalog TYPE slis_t_fieldcat_alv WITH HEADER LINE ,
           layout TYPE slis_layout_alv,
           col_pos  LIKE sy-cucol ,
           alvfc TYPE slis_t_fieldcat_alv.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS   : belnr FOR bkpf-belnr.
    *SELECT-OPTIONS   : gjahr FOR bkpf-gjahr OBLIGATORY.
    PARAMETERS       : gjahr LIKE bkpf-gjahr OBLIGATORY.
    *SELECT-OPTIONS   : budat FOR bkpf-budat.
    SELECTION-SCREEN : END OF BLOCK b1.
    PERFORM fill_catalog1 USING:
    'LIFNR'    'ITAB2'    'Vendor',
    'NAME1'    'ITAB2'    'Name1',
    'BELNR'    'ITAB2'    'MIRO Doc. No.' ,
    'BUDAT'    'ITAB2'    'Posting Date',
    'GJAHR'    'ITAB2'    'Year',
    'BELNR1'   'ITAB2'    'A/c Doc. No.',
    'LFBNR'    'ITAB2'    'Ref. Document(103)',
    'MBLNR'    'ITAB2'    'Material Doc.(105)',
    'EBELN'    'ITAB2'    'PO Number',
    'EBELP'    'ITAB2'    'Line Item',
    'TXZ01'    'ITAB2'    'Material Text',
    'MENGE'    'ITAB2'    'Quantity',
    'BSTME'    'ITAB2'    'Unit',
    *'RATE'     'ITAB2'    'Rate',
    'RATE1'    'ITAB2'    'RATE1',
    'WRBTR'    'ITAB2'    'Amount',
    'DMBTR'    'ITAB2'    'Variance A',
    'DMBTR1'   'ITAB2'    'Variance B',
    'SUM'      'ITAB2'    'Total Amt.',
    'SUM1'      'ITAB2'    'Total Amt.1'.
    SELECT belnr gjahr budat awkey INTO CORRESPONDING FIELDS OF TABLE itab FROM bkpf WHERE belnr IN belnr AND gjahr = gjahr.
    IF sy-subrc <> 0.
      MESSAGE 'DATA NOT FOUND.' TYPE 'I'(001).
    ENDIF.
    SORT itab BY belnr.
    LOOP AT itab.
      SPLIT itab-awkey AT space INTO: itab-belnr1 itab-gjahr1.
      SELECT belnr gjahr ebeln ebelp wrbtr menge bstme lfbnr lfpos FROM rseg INTO (itab2-belnr1, itab2-gjahr1, itab2-ebeln,
                        itab2-ebelp, itab2-wrbtr, itab2-menge, itab2-bstme, itab2-lfbnr, itab2-lfpos) WHERE belnr = itab-belnr1 AND gjahr = itab-gjahr .
        itab2-belnr = itab-belnr.
        itab2-gjahr = itab-gjahr.
        itab2-budat = itab-budat.
        itab2-awkey = itab-awkey.
        SELECT SINGLE ebeln ebelp txz01 FROM ekpo INTO (itab2-ebeln1, itab2-ebelp1, itab2-txz01) WHERE ebeln = itab2-ebeln AND ebelp = itab2-ebelp.
        SELECT SINGLE mblnr lifnr FROM mseg INTO (itab2-mblnr, itab2-lifnr) WHERE lfbnr = itab2-lfbnr AND bwart EQ '105'.
        SELECT SINGLE name1 FROM lfa1 INTO itab2-name1 WHERE lifnr = itab2-lifnr .
        SELECT SINGLE dmbtr FROM bseg INTO itab2-dmbtr WHERE belnr = itab2-belnr AND gjahr = itab2-gjahr AND buzid = 'S' AND ebelp = itab2-ebelp.
        itab2-rate = itab2-wrbtr / itab2-menge.
        itab2-sum = itab2-wrbtr + itab2-dmbtr + itab2-dmbtr1.
        itab2-rate1 = itab2-sum / itab2-menge.
    *itab2-sum1 = itab2-wrbtr + itab2-dmbtr1.
        APPEND itab2.
      ENDSELECT.
    ENDLOOP.
    DATA : cnt TYPE i value 1.
    LOOP AT itab2.
    cnt = cnt + 1.
      SELECT dmbtr FROM bseg INTO itab2-dmbtr1 WHERE belnr = itab2-belnr AND gjahr = itab2-gjahr AND buzid = 'T' AND mwart = 'V'.
        MODIFY itab2 INDEX cnt TRANSPORTING dmbtr1.
        cnt = cnt + 1.
      ENDSELECT.
    ENDLOOP.
    layout-zebra = 'X' .
    layout-colwidth_optimize(1) = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program = 'ZAK_MAT_PUR_RUDRAPUR_NEW'
        is_layout          = layout
        it_fieldcat        = it_fld_catalog
        i_default          = 'X'
        i_save             = 'A'
      TABLES
        t_outtab           = itab2
      EXCEPTIONS
        program_error      = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  FILL_CATALOG1
          text
         -->P_FIELDNAME  text
         -->P_REF_TABLE  text
         -->P_SCRTEXT    text
    FORM fill_catalog1  USING   p_fieldname TYPE any
                                p_ref_table TYPE any
                                p_scrtext   TYPE any.
      CLEAR : wa_fld_catalog.
      wa_fld_catalog-fieldname  = p_fieldname.
      wa_fld_catalog-tabname    = p_ref_table.
      wa_fld_catalog-seltext_s  = p_scrtext.
      wa_fld_catalog-seltext_m  = p_scrtext.
      wa_fld_catalog-seltext_l  = p_scrtext.
    wa_fld_catalog-do_sum     = 'X'.
      wa_fld_catalog-outputlen = 15.
      wa_fld_catalog-no_zero   = 'X'.
      APPEND wa_fld_catalog TO it_fld_catalog.
    ENDFORM.                    " fill_catalog1
    please help me....

    Thanks for reply....
    But same problem is still here...
    I copied ur code:----
    LOOP AT itab.
      CLEAR itab2.                                              "INSERT STATEMENT
    SPLIT ITAB-AWKEY AT SPACE INTO: ITAB-BELNR1 ITAB-GJAHR1. "DELETE STATEMENT
      itab-belnr1 = itab-awkey+0(10).                           "INSERT STATEMENT
      itab-gjahr1 = itab-awkey+10(4).                           "INSERT STATEMENT
      SELECT belnr gjahr ebeln ebelp wrbtr menge bstme lfbnr lfpos
        FROM rseg INTO (itab2-belnr1, itab2-gjahr1, itab2-ebeln, itab2-ebelp, itab2-wrbtr, itab2-menge, itab2-bstme, itab2-lfbnr, itab2-lfpos)
       WHERE belnr = itab-belnr1
         AND gjahr = itab-gjahr .
        itab2-belnr = itab-belnr.
        itab2-gjahr = itab-gjahr.
        itab2-budat = itab-budat.
        itab2-awkey = itab-awkey.
        SELECT SINGLE ebeln ebelp txz01 FROM ekpo INTO (itab2-ebeln1, itab2-ebelp1, itab2-txz01)WHERE ebeln = itab2-ebeln AND ebelp = itab2-ebelp.
        SELECT SINGLE mblnr lifnr FROM mseg INTO (itab2-mblnr, itab2-lifnr)WHERE lfbnr = itab2-lfbnr AND bwart EQ '105'.
        SELECT SINGLE name1 FROM lfa1 INTO itab2-name1 WHERE lifnr = itab2-lifnr .
        SELECT SINGLE dmbtr FROM bseg INTO itab2-dmbtr WHERE belnr = itab2-belnr AND gjahr = itab2-gjahr AND buzid = 'S' AND ebeln = itab2-ebeln AND ebelp = itab2-ebelp.
        itab2-rate = itab2-wrbtr / itab2-menge.
        itab2-sum = itab2-wrbtr + itab2-dmbtr + itab2-dmbtr1.
        itab2-rate1 = itab2-sum / itab2-menge.
    *itab2-sum1 = itab2-wrbtr + itab2-dmbtr1.
        APPEND itab2.
        CLEAR itab2. "INSERT STATMENT.
      ENDSELECT.
    ENDLOOP.
    Not working....plz suggest...

  • Updating internal table with CSV file

    I have a flat file as below:
    aaaa, bbbb, asdc, dfgfhg, sdfsg, sdf, sdf, sdf, dfg, sdf, sgf, drgftfgh, sgf, drgtf, swftgd, sgf,
    'sjhdfjhf','2003-10-11 07:52:37','167','alkjd',NULL,NULL,NULL,NULL,NULL,'MX1',NULL,NULL,'dkjffdj ,',NULL,NULL,NULL,'1',NULL,NULL,'AR, dfkj ',
    Where we can see it is separated by commas.I want to upload this one into onr internal table.I used GUI_UPLOAD and gave the logic as folows:
    TYPES: BEGIN OF ttab,
    rec(1000) TYPE c,
    END OF ttab.
    TYPES: BEGIN OF tdat,
    aaaa type char10
    bbbb type char10,
    asdc  type char10,
    dfgfhg  type char10,
    sdfsg  type char10,
    sdf  type char10,
    sdf  type char10,
    sdf  type char10,
    dfg   type char10,
    sdf    type char10,
    sgf  type char10,
    drgftfgh  type char10,
    sgf  type char10,
    drgtf  type char10,
    swftgd  type char10,
    sgf  type char10,
    END OF tdat.
    DATA: itab TYPE TABLE OF ttab WITH HEADER LINE.
    DATA: idat TYPE TABLE OF tdat WITH HEADER LINE.
    DATA: file_str TYPE string.
    PARAMETERS: p_file TYPE localfile.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    static = 'X'
    CHANGING
    file_name = p_file.
    START-OF-SELECTION.
    file_str = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_str
    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.
    LOOP AT itab.
    CLEAR idat.
    SPLIT itab-rec AT ',' INTO idat-aaaa
    idat-bbbb ,
    idat-asdc  ,
    idat-dfgfhg  ,
    idat-sdfsg  ,
    idat-sdf  ,
    idat-sdf  ,
    idat-sdf  ,
    idat-dfg   ,
    idat-sdf    ,
    idat-sgf  ,
    idat-drgftfgh  ,
    idat-sgf  ,
    idat-drgtf  ,
    idat-swftgd  ,
    idat-sgf  ,
    APPEND idat.
    ENDLOOP.
    Now the issue is when I use the statement SPLIT itab-rec AT ',' this is not updating the table idat properly.Because the flat file contains the value as 'dkjffdj ,', too.
    Can anyone give me some solution to update the internal table.

    hI
    or you delete ' from csv file before uploading it or after uploading it, in this last case u can use statament replace:
    REPLACE ''' WITH SPACE INTO ITAB-FIELD.
    Max

  • Passing data to different internal tables with different columns from a comma delimited file

    Hi,
    I have a program wherein we upload a comma delimited file and based on the region( we have drop down in the selection screen to pick the region).  Based on the region, the data from the file is passed to internal table. For region A, we have 10 columns and for region B we have 9 columns.
    There is a split statement (split at comma) used to break the data into different columns.
    I need to add hard error messages if the no. of columns in the uploaded file are incorrect. For example, if the uploaded file is of type region A, then the uploaded file should be split into 10 columns. If the file contains lesser or more columns thenan error message should be added. Similar is the case with region B.
    I do not want to remove the existing split statement(existing code). Is there a way I can exactly pass the data into the internal table accurately? I have gone through some posts where in they have made use of the method cl_alv_table_create=>create_dynamic_table by passing the field catalog. But I cannot use this as I have two different internal tables to be populated based on the region. Appreciate help on this.
    Thanks,
    Pavan

    Hi Abhishek,
    I have no issues with the rows. I have a file with format like a1,b1,c1,d1,e1, the file should be uploaded and split at comma. So far its fine. After this, if the file is related to region A say Asia, then it should have 5 fields( as an example). So, all the 5 values a1,b1..e1 will be passed to 5 fields of itab1.
    I also have region B( say Europe)  whose file will have only 4 fields. So, file is of the form a2,b2,c2,d2. Again data is split at comma and passed to itab2.
    If some one loads file related to Asia and the file has only 4 fields  then the data would be incorrect. Similar is the case when someone tries to load Europe file with 5 fields related data. To avoid this, I want to validate the data uploaded. For this, I want to count the no. of fields (seperated by comma). If no. of fields is 5 then the file is related to Asia or if no. of fields is 4 then it is Europe file.
    Well, the no. of commas is nothing but no. of fields - 1. If the file is of the form a1,b1..e1 then I can say like if no. of commas = 4 then it is File Asia.But I am not sure how to write a code for this.Please advise.
    Thanks,
    Pavan

  • Upload .csv file in ABAP webdynpro

    Hi,
    I have a table with 3 columns - name, age, gender.
    I am trying to upload the details from .csv file into my table.
    The problem is that all the 3 values appear in 1 column i.e name
    e.g John,30, M appears in NAME column and AGE and GENDER colum are blank.
    Snippet of code
    After conversion of XSTRING to STRING, i have my data in v_string.
    SPLIT v_string AT cl_abap_char_utilities=>newline INTO TABLE i_data.
        LOOP AT i_data INTO v_string.
          SPLIT v_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE v_values.
          READ TABLE v_values INTO x_tab-name INDEX 1.
          READ TABLE v_values INTO x_tab-age  INDEX 2.
          READ TABLE v_values INTO x_tab-gender INDEX 3.
          APPEND x_tab TO i_tab.
        ENDLOOP.
    *"Import to webDynpro Table
        lo_view_nnode = wd_context->get_child_node( 'DETAILS' ).
        lo_view_nnode->bind_table( i_tab[] ).
    The problem appears in the statement SPLIT v_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE v_values.
    It does not separate values into 3 lines but only 1 line and when I read the table v_values at INDEX 1 i get all the values in first column!

    Hi Sim.
    should you not be trying to split the string at a comma for a csv file rather than a tab?
    so the code should be:
    SPLIT v_string AT cl_abap_char_utilities=>newline INTO TABLE i_data.
        LOOP AT i_data INTO v_string.
          SPLIT v_string AT ',' INTO TABLE v_values.
          READ TABLE v_values INTO x_tab-name INDEX 1.
          READ TABLE v_values INTO x_tab-age  INDEX 2.
          READ TABLE v_values INTO x_tab-gender INDEX 3.
          APPEND x_tab TO i_tab.
        ENDLOOP.
    *"Import to webDynpro Table
        lo_view_nnode = wd_context->get_child_node( 'DETAILS' ).
        lo_view_nnode->bind_table( i_tab[] ).
    Hope this helps,
    Cheers,
    Chris

  • Resilience in oracle service bus

    HI to all,
    I'm getting a problem because i have have a process in oracle service bus, that have a split-join and when a OSB server is shutdown the split-join stop and when the server are started up it don't restart i can i have resilience to overcome this problem.
    Best Regards

    Hi,
    Documentation states:
    Split-Joins provide support for propagating transactions. Operations set with a QoS of Exactly Once are executed in the transaction. Operations set with a QoS of Best Effort do not execute in the context of a transaction.
    Split-Joins do not handle transaction rollback in the case of exceptions. It is the responsibility service component that called the Split-Join to handle transaction exceptions and rollback.
    The last statement is quite difficult to understand... I believe you need to handle a fail in the caller of the split join and possibly do a retry from there... The split join won't restart by itself...
    Ref doc...
    http://docs.oracle.com/cd/E28280_01/dev.1111/e15866/tasks.htm#i1150626
    Cheers,
    Vlad

  • Index partitioning.

    Hi All,
    Is it possible to partition the maxvalue index partion created using range index partitioning.

    >
    thats fine , it is possible for table. But is it possible for Index ?
    >
    Sure - the process is similar.
    See the 'split_index_partition' clause of ALTER INDEX in the SQL doc
    http://docs.oracle.com/cd/B12037_01/server.101/b10759/statements_1008.htm#i2136094
    >
    split_index_partition
    Use the split_index_partition clause to split a partition of a global range-partitioned index into two partitions, adding a new partition to the index. This clause is not valid for hash-partitioned global indexes. Instead, use the add_hash_index_partition clause.
    Splitting a partition marked UNUSABLE results in two partitions, both marked UNUSABLE. You must rebuild the partitions before you can use them.
    Splitting a usable partition results in two partitions populated with index data. Both new partitions are usable.
    >
    And the doc has an example of how to do it.
    >
    Splitting a Partition: Example
    The following statement splits partition p2 of index cost_ix (created in "Creating a Range-Partitioned Global Index: Example") into p2a and p2b:
    ALTER INDEX cost_ix
    SPLIT PARTITION p2 AT (1500)
    INTO ( PARTITION p2a TABLESPACE tbs_01 LOGGING,
    PARTITION p2b TABLESPACE tbs_02);

  • Replace complete words by another string

    Hi,
    I'm searching for a possibility to replace complete words inside a string.
    For example I want to replace "quick" by "slow":
    "The <b>quick</b> brown fox is running quicker then the slow brown fox".
    The result shall be:
    "The <b>slow</b> brown fox is running quicker then the slow brown fox".
    The problem is, that the built in "Replace"-Method would also replace "quicker" by "browner".
    Furthermore, words beetween different signs (e.g. , . ; : - ! " ? ') shall also be found as complete word.
    I already searched for a FM but didn't find anything. Regular expressesions are also not possible because we are running on 6.40.
    Maybe anybody can help me with a simple FM or something else.
    Best regards,
    Stefan

    Hi Stefan,
    There is a crude way of doing this....with lots of loops..
    You can use the SPLIT statement
    SPLIT dobj AT sep INTO
          { {result1 result2 ...} | {TABLE result_tab} }
          [IN {CHARACTER|BYTE} MODE].
    and break the sentence into words using space as delimiter. Once you have all the words in a internal table, you can loop through it and compare each word with the word you want.
    This will solve the problem, but will not be performant enough.
    Regards,
    Vinodh

  • Gui Upload and Line Feed within a CSV cell from Excel

    Hi all,
    I am facing the problem that my CSV file to be uploaded via GUI_UPLOAD is containing cells where the Excel user has split the line within the cell. So there are CRLF at the end of the CSV row and single LF within a cell between the field separators.
    GUI_UPLOAD is not making a difference and splits the line within the cell.
    Is there any solution for this?
    Thanks in advance for hints.
    Axel

    Hi Axel,
    I didn't know that it was considering CRLF and LF the same way. A workaround is to do the job yourself: call GUI_UPLOAD using BIN format (you'll get the characters as bytes), get the frontend encoding (cl_gui_frontend_services=>GET_SAPLOGON_ENCODING), then convert the bytes into characters using CL_ABAP_CONV_IN_CE class (see documentation), and split (statement SPLIT AT) the characters at cl_abap_char_utilities=>cr_lf to get each line, then split each line at cl_abap_char_utilities=>horizontal_tab.
    BR
    Sandra

  • Problem while reading data from AL11

    Hi Experts,
    I am using OPEN DATASET
                          READ DATASET
                      CLOSE DATASET  to read data from the application sever. In application sever the file type is .CSV. So after reading data from application layer(AL11) to a text variable,  using statement ' SPLIT AT ','  ' all the values passing into correspoding internal table fields. And it getting updated successfully into DB also.
    In above scenario my question is, if aquantity figure with coma seperator( 95,000,000.000), then while SPLIT it's creating problem. Same case in .XLS file, it will be created # seperator in the application layer. if any field having # then it will create problem again.
    So can anybody suggest how can we over come the problem. Or is there any other way to read data properly from application layer(AL11)?
    Thanks and regards,
    Phani.

    to overcom this problem,
    normally we use tab as sparator
    so use CL_ABAP_CHAR_UTILITIES=>VERTICAL_TAB  to separate your fields!
    grx
    Andreas

  • Upload data to an internal table with Services of the Table Tool

    Hi,
    I'm trying to upload data to an internal table with the table with the new abap debugger but I can see the option in Services of the Table Tool. I see the information in this sap link and also I saw some screen shot in other pages.
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/49/2db60934e414d0e10000000a42189b/content.htm
    Is this option depends the SAP version or the patch version or I need to configure the debugger?

    Hi,
    I used the statement
    SPLIT i_file AT '|' INTO TABLE It_file.
    But it is overwriting each row but not appending to the internal table while passing do and enddo.
    Actually my requirement is download the pipe delimited text file and sent an XLS attachment to the
    distribution mail id's.
    I know sending the mails by using the FM.
    But I need all data from the file line by line and pass to the Mail sending function module.
    Can you help me in acheiving  this.
    Regards
    Jay

  • Opposite of concatenate

    Hi guys,
    what is the opposite of concatenate...
    I have 317.25 (lips-netpr), i need to separate is by the period so i can have 317 and 25...
    Thanks!

    Hi,
    Here u need to use the function for string separation...
    you can do this in the following way-
    you can use SPLIT STATEMENT
    Splitting Character Strings
    To split a character string into two or more smaller strings, use the SPLIT statement as follows:
    SPLIT c AT del INTO c1 ... cn.
    The system searches the field c for the separator del. The parts before and after the separator are placed in the target fields c1 ... cn.
    To place all fragments in different target fields, you must specify enough target fields. Otherwise, the last target field is filled with the rest of the field c and still contains delimiters.
    If all target fields are long enough and no fragment has to be truncated, sy-subrc is set to 0. Otherwise it is set to 4.
    DATA: string(60) TYPE c,
          p1(20) TYPE c VALUE '++++++++++++++++++++',
          p2(20) TYPE c VALUE '++++++++++++++++++++',
          p3(20) TYPE c VALUE '++++++++++++++++++++',
          p4(20) TYPE c VALUE '++++++++++++++++++++',
          del(3) TYPE c VALUE '***'.
    string = ' Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5'.
    WRITE string.
    SPLIT string AT del INTO p1 p2 p3 p4.
    WRITE / p1.
    WRITE / p2.
    WRITE / p3.
    WRITE / p4.
    The output appears as follows:
    Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5
    Part 1
    Part 2
    Part 3
    Part 4 *** Part 5
    Note that the contents of the fields p1 ...p4 are totally overwritten and that they are filled out with trailing blanks.
    You can also split a string into the individual lines of an internal table as follows:
    SPLIT c AT del INTO TABLE itab.
    The system adds a new line to the internal table itab for each part of the string.
    above is the detail hw to use split
    The simple example is:
    SPLIT '123.345' AT   '.'  inti str1 str2.
    i hope this will solve ur problem.
    Thanks & Regards
    Ashu Singh.

Maybe you are looking for

  • Time Machine locked all Excel files. Help?

    I have had Macs for many years but have not used Time Machine until yesterday. I turned on Time Machine for the first time and did a back-up last night. Today, I cannot open any Excel file on my computer as they all appear to be read-only. I am using

  • Newbie here...some Zen Micro questions/suggestio

    Hi im new Okay i have some questions for y'all: Will having only usb .0 work for a zen micro? I have a n200 and it works fine, just wondering if the micro will work on my computer too. Yes, I recently ordered a Zen Micro. Unfortunately that was befor

  • Where is the ipad backup file in Mountain Lion?

    In Snow Leopard, there was a library folder in the user folder, but in Mountain Lion, you have the system library, but no user library that I can see.  I would like to locate it so that I can have the option of deleting the iPad portion of the Mobile

  • Drag and drop in ScreenSharing.  Broken.

    So, I can drop a file from my desktop to  an open ScreenSharing app window - and a window pops up, labeled "File Transfers". I see my file in the list: "<filename> to <machine>" with an animated progress bar (grey white striped) with "Pending" undern

  • GoFlex drive disconnects randomly after ML install

    After installing ML, my 1 TB GoFlex, drive connected via Firewire 800, disconnects randomly and gives me the "The disk was not ejected properly..." error. Then it reconnects immediately. It does this a lot and, like I said, randomly. Has anyone else