How to merge All text fiels into 1 text file to read into internal table

Hi dudes,
  I have 3 text files in workstation. I need to everytime download these files in my internal table .
  But it takes long processing time .ie everytime it opens file read and close.
  Do u suggest for better performance for this? Like how i can meage all txt files in 1 txt file and then read once ito internal table.
  Hope i m clear to explain u my requirement.
  Gain Points

It actually depends on your requirement(a standard answer from any SAP guy).
Coming back to the question at hand:
a) Can we merge these files ? My question to you :
i) Are you downloading these to your presentation server from application server using WS_DOWNLOAD(I am using 4.5B) or CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD ?
ii) What holds you back ?
b) How do we parse multiple files contained in a single file ?
Keep a delimiter which is unique only for file endings. That should do the trick.
Regards,
Subramanian V.

Similar Messages

  • How to split all the fields of output ls-l from an internal table

    Hi all,
    Using ls-l command i have brought the file attributes of a file like its read and write permissions,creation date ,path etc in a internal table.
    Now how to split all these fields from the internal table or what should be the splitting criteria.
    The field contents of internal table are like this:
    -rw-rw----    1  devadm     sapsys     18360    apr  29......so on
    I want to split this into different fields.
    Kindly suggest.
    Thank You.

    Hi,
    I think the delimiter will be space. For date alone (Apr 29) you need to concatenate after the string has been split.
    Thanks and regards,
    S. Chandramouli

  • HT5824 how to merge all my contacts in one for all the iPhones and iPad

    How to merge all my contacts in one for all my Iphones and Ipad so that i have one contacts list in all my gadgets

    make an album titled whatever you want and then go to photos. select the photos you want and click the arrow ponting up on the left habnd corner. move them to the album you created and once your finished navigate to albums. once in your album go to the top right and click slideshow. You can add transitions and play music also when you click slideshow. Then you click start slideshow.

  • How to check  if all values from a dataset  has come to  an internal table

    How to check  if all values from a dataset  has come to  an internal table ?

    Hi,
    After OPEN DATASET statement check if sy-subrc = 0 if its success then proceed with split statement and save the dataset values into a internal table and while debugging the internal table you will find that whether all values get into internal table.
    Checking sy-subrc after OPEN DATASET statement is must to fill up the values in the internal table.
    For e.g.
    OPEN DATASET p_inpfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        WRITE :/ 'No such input file' .
        EXIT.
      ELSE.
    READ DATASET p_inpfile INTO loc_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            CLEAR loc2.
    *Spliting fields in the file-
            REPLACE ALL OCCURRENCES OF '#' IN wa_string WITH ' '.
           SPLIT wa_string AT const INTO loc2-pernr
                                           loc2-werks
                                           loc2-persk 
                                           loc2-vdsk1.
    Hope you get some idea.
    Thanks,
    Sakthi C

  • How to merge two Outlook 2010 pst data files?

    How to merge two Outlook 2010 pst data files?

    Easy way: with the one you want to use open in Outlook and the other one not in your profile, go to File, Open, Import.
    If you only want to merge some content, open both pst files in outlook and drag between folders. For calendar, use a list view to see all of the appointments.
    Diane Poremsky [MVP - Outlook]
    Outlook Daily Tips |
    Outlook & Exchange Solutions Center
    Subscribe to Exchange Messaging Outlook weekly newsletter

  • How to open all the pages of a file PDF in Photoshop?

    Hi,
    How to open all the pages of a file PDF in Photoshop?
    Or
    I need to know the amount of Pages in PDF.
    Example:
    >Set MyPhotoshop = CreateObject("Photoshop.PDFOpenOptions")
    Set MyOpenPref = CreateObject("Photoshop.PDFOpenOptions")
    sFileName = "C:\Temp\Myfile.pdf"
    >With MyOpenPref
    .AntiAlias = True
    .Mode = psOpenCMYK
    .Resolution = 72
    .BitsPerChannel = psDocument8Bits
    .CropPage = psBoundingBox
    .Page = 4
    .SuppressWarnings = True
    End With
    >MyPhotoshop.Open sFileName, MyOpenPref
    I need help.
    Thanks

    http://www.ps-scripts.com/bb/viewtopic.php?t=1882
    Have a look at this thread, the last entry has the full code and has everything you need there.
    The answer to knowing how many pages is, you don't need to know!
    You use SL code and no error and no page is opened. Thats the crux of the code.

  • HT3946 How do you get Nikon D600 camera  raw files to download INTO Apeture 3

    How do you get Nikon D600 camera  raw files to download INTO Apeture 3 ?

    The D600 is a new camera. There should be an update in the near future to accommodate it.
    This was the last one:

  • How to read an internal table with more than  one (2 or 3) key field(s).

    how to read an internal table with more than  one (2 or 3) key field(s). in ecc 6.0 version

    hi ,
    check this..
    report.
    tables: marc,mard.
    data: begin of itab occurs 0,
          matnr like marc-matnr,
          werks like marc-werks,
          pstat like marc-pstat,
          end of itab.
    data: begin of itab1 occurs 0,
          matnr like mard-matnr,
          werks like mard-werks,
          lgort like mard-lgort,
          end of itab1.
    parameters:p_matnr like marc-matnr.
    select matnr
           werks
           pstat
           from marc
           into table itab
           where matnr = p_matnr.
    sort itab by matnr werks.
    select matnr
           werks
           lgort
           from mard
           into table itab1
           for all entries in itab
           where matnr = itab-matnr
           and werks = itab-werks.
    sort itab1 by matnr werks.
    loop at itab.
    read table itab1 with key matnr = itab-matnr
                              werks = itab-werks.
    endloop.
    regards,
    venkat.

  • How to generate a text file with values from internal table

    hi,
    can anybody help me out to get the values from different internal table written into a text file.
    regs,
    raja

    used gui_download,ws_download,cl_gui_file_save.
    data: ld_filename type string ;
    ld_filename = 'c:\demo.txt'.
    DATA: begin of it_datatab occurs 0,
    row(500) type c,
    end of it_datatab.
    HII
    call function 'GUI_DOWNLOAD'
    exporting
    filename = ld_filename
    filetype = 'ASC'
    tables
    data_tab = it_datatab[]
    exceptions
    file_open_error = 1
    file_write_error = 2
    others = 3.
    gui_download

  • How to get all values in the range of select option into internal table?

    Hi,
    I need to capture all entries coming in the range of select option into one internal table.
    How to do get that?
    For E.g
    select-options: matnr for mara-matnr.(select option)
    IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
    and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
    Regards,
    Mrunal

    Hello Mrunal Mhaskar  ,
    What i understand you can do one thing  go in debug mode
    Try this code : -
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-low IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-low.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-high IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-high.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    In the i_matnr table high and low values are there.
    Regards,
    Vandana.

  • No column text displayed in alv when i use dynamic internal table

    Hi friends,
    when I use dynamic internal table to display the fields in ALV formant, field column text was not displaying ,
    total row of column text was blank.
    can u sujjest me in this...
    with regards,
    prasad.

    Hi
    That depends on how you've filled the catalog table, here u need to insert the description for the labels (short, medium and long) and the description for the layout variant management.
    So u make sure to fill the fields like
    SCRTEXT_L
    SCRTEXT_M
    SCRTEXT_S
    REPTEXT
    Max

  • How to skip certain lines for a txt file and insert into array

    so here is my question:
    i had a file to read, and it requires to input into the array starting from a certain line
    example:
    4
    john 25 M
    mary 22 F
    lee 20 M
    faye 10 F
    faye john
    mary john
    mary faye
    i want to insert the friend list, starting 5th line into a 2d array, which is the int from first line +1.
    can someone help me with it?
    i believe there is a skip method and stuff..
    but just dont know how to use it
    may someone tell me how to do tat?

    the thing is i think that takes too long and it is not efficient..
    however...i just solved it with a better method
    Scanner in = new Scanner (reader);
    int size = Integer.parseInt(in.next());
    BufferedReader insert = new BufferedReader(new FileReader(new File(input)));
    String line = null;
    int count = 0;
    int startAtLineNo =size+1; // 0-based
    while ((line = insert.readLine()) != null) {
    if (count >= startAtLineNo) {
    /* do stuff */
    System.out.println(line);
    // else ignore
    count++;
    thanks anyways

  • How to get all TextFrame from ImportedPage INDD Files?

    Hi everyone!
    Do you know the javascript scripts to get all textFrames in importedPage (.indd file)? Is it posible to do that or have some trick to do it?

    Use
    JDR_UTILS.LISTDOCUMENTS
    Use this API to list of all OA Framework the documents in a path/module. This script is very handy, as it provides a list of all the desired documents/extensions/personalizations in one go.
    DECLARE
    BEGIN
    jdr_utils.listdocuments('/oracle/apps/po/setup', TRUE);
    END;
    Thanks
    --Anil
    oracleanil.blogspot.com

  • How to generate .txt file from data in internal table

    Hi I am using the program below to load .txt file into SAP table.
    I am moving the records from a .txt file into internal table final and then into ZOUT_CCFOBS table.
    How do I load records from internal table final back to another .txt file with the same layout? Pls advice.
    REPORT  ZOUP_LOAD_CCF_OBS.
    TABLES: ZOUT_CCFOBS.
    TYPES: BEGIN OF tline, "structure to store a line of each row
        line(1000) TYPE c,
    END OF tline.
    TYPES: BEGIN OF i_split, "structure to store split record of each row
          t_ZOTFACIL(100)    TYPE c,
          t_ZOTCCF(8)    TYPE c,
          t_ZOTOBSCAT(100)    TYPE c,
    END OF i_split.
    DATA: itab TYPE TABLE OF tline WITH HEADER LINE.
    DATA: idat TYPE TABLE OF i_split WITH HEADER LINE.
    DATA: final TYPE STANDARD TABLE OF ZOUT_CCFOBS WITH HEADER LINE.
    DATA: file_str TYPE string.
    DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
          c_search_dir TYPE dxfields-longpath.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    PARAMETERS p_file LIKE rlgrap-filename.                "file location
    SELECTION-SCREEN END OF BLOCK a1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM f4_dxfilename USING p_file.
    START-OF-SELECTION.
    Download data from application server
      PERFORM download_data.
      file_str = p_file.
      LOOP AT itab.
        CLEAR idat.
    this will split the line at every delimeter into single field
        SPLIT itab-line AT ',' INTO idat-t_ZOTFACIL
        idat-t_ZOTCCF
        idat-t_ZOTOBSCAT.
        APPEND idat.
      ENDLOOP.
    copying the internal table into final table which compatible with table tcurr
      LOOP AT idat.
        final-ZOTFACIL = idat-t_ZOTFACIL.
        final-ZOTCCF = idat-t_ZOTCCF.
        final-ZOTOBSCAT = idat-t_ZOTOBSCAT.
        APPEND final.
      ENDLOOP.
      LOOP AT final.
        MODIFY ZOUT_CCFOBS FROM final.
        IF sy-subrc EQ 0.
          MESSAGE S001(ZCURR).
        ELSE.
          MESSAGE A000(ZCURR).
        ENDIF.
      ENDLOOP.
    FORM f4_dxfilename USING p_file.
    addition TAICK 15/07/2008.
    *maintain application server default search path.
      IF sy-sysid = 'BWP'.
        c_search_dir = '//rdmsbw/prd/data/output/all'.
      ELSEIF sy-sysid = 'BWQ'.
        c_search_dir = '//rdmsbw/uat/data/output/all'.
      ELSEIF sy-sysid = 'BWD'.
        IF sy-mandt = '900'.
          c_search_dir = '//rdmsbw/sit/data/output/all'.
        ELSE.
          c_search_dir = '//rdmsbw/dev/data/output/all'.
        ENDIF.
      ENDIF.
      DATA: wa_file LIKE dxfields-longpath.
      CLEAR: wa_file.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
        EXPORTING
          i_location_flag = 'A'
          i_server        = ' '
          i_path          = c_search_dir
          filemask        = c_fnh_mask
          fileoperation   = 'R'
        IMPORTING
          o_path          = wa_file
        EXCEPTIONS
          rfc_error       = 1
          error_with_gui  = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        p_file = wa_file.
      ENDIF.
    addition end TAICK 15/07/2008.
    ENDFORM. " f4_dxfilename
    FORM download_data .
      OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      DO.
        IF sy-subrc <> 0.
          exit.
        ENDIF.
        READ DATASET p_file INTO itab.
        if sy-subrc = 0.
          APPEND itab.
        clear itab.
        endif.
      ENDDO.
      CLOSE DATASET p_file.
      delete itab index 1. "remove column header
    ENDFORM.                    " download_data
    Edited by: RebekahMBB on Feb 20, 2012 12:56 PM

    Hi I am using this piece of code to download my internal table into an .xls file on my pc.
    FORM Z_CONVERT_EXCEL .
      "This part of code to add column name in the downloaded file.
      data : begin of int_head occurs 0,
      Filed1(20) type c,                     " Header Data
      end of int_head.
      int_head-Filed1 = 'ZOTOUS'.
      APPEND int_head.
      CLEAR int_head.
      int_head-Filed1 = 'ZOTOUS'.
      APPEND int_head.
      CLEAR int_head.
      int_head-Filed1 = 'ZOTOGCUR'.
      APPEND int_head.
      CLEAR int_head.
    Select ZOTOUS ZOTSYORGU ZOTOGCUR from ZOUT_ORG_CURR into CORRESPONDING FIELDS OF TABLE itab.
      v_filetype = '.xls'. "I just manipulate the file name using XLS file type.
      v_filename = 'C:\Documents and Settings\00088592\Desktop\OUs automation\development'.
      CONCATENATE v_filename v_filetype INTO lv_filename.
      CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
            filename         = lv_filename
            filetype         = 'ASC'
          APPEND           = 'X'
            write_field_separator = 'X'
          CONFIRM_OVERWRITE = 'X'
       TABLES
            data_tab         = itab
            FIELDNAMES       = int_head
       EXCEPTIONS
            file_open_error  = 1
            file_write_error = 2
            OTHERS           = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    "Z_CONVERT_EXCEL
    As you can see the code specifies the header row separately and appends it in int_head.
    What if I have 76 fields or more? I cant be specifying each like that.
    Is there any other way to do this? To move the 76 field headers into int_head?
    Pls help.
    Thanks!

  • How to filter out alt+enter in excel when upload to abap internal table

    hi guys,
    we're facing a problem when upload excel file with alt+key in between a line.
    system would create some special character (# if see from internal table, a square if see from text file) in between the line.
    replace all occurrences of '#' in char with space is not working here. And it is possible for user to key in '#' in the lines.
    do we have any other option to fix this?
    thanks.

    Hi,
    How are you uploading data from Excel to your program.
    Try using FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' as shown below :
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_file
          i_begin_col             = '1'
          i_begin_row             = w_row
          i_end_col               = '200'
          i_end_row               = '60000'
        TABLES
          intern                  = ex_itab
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
    This will allow you to upload the file without any special character. w_row is the row from which actual data in your excel begins.
    Hope I understood your problem correctly and have given the right soln.
    Regards,
    Lalit Kabra

Maybe you are looking for