Gui_upload 256

Hi,
how is it possible to upload the txt table from PC with <b>cl_gui_frontend_services=>gui_upload</b>, which lines are longer than <b>256 characters</b>?
Thanks and regards

Hi,
i have an file with a record of 400 char. it works OK.
Try this code:
DATA: DATEI_PC TYPE STRING VALUE 'C:TEST.TXT'.
TYPES: BEGIN OF ITAB_S,
         TXT(1000),
       END   OF ITAB_S.
DATA: ITAB        TYPE TABLE OF ITAB_S WITH HEADER LINE.
DATA: STRLEN      TYPE I.
START-OF-SELECTION.
  CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
      FILENAME = DATEI_PC
      FILETYPE = 'ASC'
    CHANGING
      DATA_TAB = ITAB[].
  WRITE: / 'UPLOAD:'.
  LOOP AT ITAB.
    STRLEN = STRLEN( ITAB-TXT ).
    WRITE: / STRLEN.
  ENDLOOP.
Regards, Dieter
Message was edited by:
        Dieter Gröhn

Similar Messages

  • GUI_UPLOAD to read data from an Excel File

    Hi Folks,
    I'm using FM GUI_UPLOAD to read data from an Excel File. But all I see in the table returned is 1 row with garbage values (special chacaters). Excel Workbook has proper data in the sheet, but its not getting uploaded properly. Sy-subrc is 0.
    What could be the reason?
    Thanks

    use FM : ALSM_EXCEL_TO_INTERNAL_TABLE
    See the example program to get from XLS file to Internal table
    REPORT ZLWMI151_UPLOAD no standard page heading
                           line-size 100 line-count 60.
    *tables : zbatch_cross_ref.
    data : begin of t_text occurs 0,
           werks(4) type c,
           cmatnr(15) type c,
           srlno(12) type n,
           matnr(7) type n,
           charg(10) type n,
           end of t_text.
    data: begin of t_zbatch occurs 0,
          werks like zbatch_cross_ref-werks,
          cmatnr like zbatch_cross_ref-cmatnr,
          srlno like zbatch_cross_ref-srlno,
          matnr like zbatch_cross_ref-matnr,
          charg like zbatch_cross_ref-charg,
          end of t_zbatch.
    data : g_repid like sy-repid,
           g_line like sy-index,
           g_line1 like sy-index,
           $v_start_col         type i value '1',
           $v_start_row         type i value '2',
           $v_end_col           type i value '256',
           $v_end_row           type i value '65536',
           gd_currentrow type i.
    data: itab like alsmex_tabline occurs 0 with header line.
    data : t_final like zbatch_cross_ref occurs 0 with header line.
    selection-screen : begin of block blk with frame title text.
    parameters : p_file like rlgrap-filename obligatory.
    selection-screen : end of block blk.
    initialization.
      g_repid = sy-repid.
    at selection-screen on value-request for p_file.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                PROGRAM_NAME = g_repid
           IMPORTING
                FILE_NAME    = p_file.
    start-of-selection.
    Uploading the data into Internal Table
      perform upload_data.
      perform modify_table.
    top-of-page.
      CALL FUNCTION 'Z_HEADER'
      EXPORTING
        FLEX_TEXT1       =
        FLEX_TEXT2       =
        FLEX_TEXT3       =
    *&      Form  upload_data
          text
    FORM upload_data.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                FILENAME                = p_file
                I_BEGIN_COL             = $v_start_col
                I_BEGIN_ROW             = $v_start_row
                I_END_COL               = $v_end_col
                I_END_ROW               = $v_end_row
           TABLES
                INTERN                  = itab
           EXCEPTIONS
                INCONSISTENT_PARAMETERS = 1
                UPLOAD_OLE              = 2
                OTHERS                  = 3.
      IF SY-SUBRC <> 0.
        write:/10 'File '.
      ENDIF.
      if sy-subrc eq 0.
        read table itab index 1.
        gd_currentrow = itab-row.
        loop at itab.
          if itab-row ne gd_currentrow.
            append t_text.
            clear t_text.
            gd_currentrow = itab-row.
          endif.
          case itab-col.
            when '0001'.
              t_text-werks = itab-value.
            when '0002'.
              t_text-cmatnr = itab-value.
            when '0003'.
              t_text-srlno = itab-value.
            when '0004'.
              t_text-matnr = itab-value.
            when '0005'.
              t_text-charg = itab-value.
          endcase.
        endloop.
      endif.
      append t_text.
    ENDFORM.                    " upload_data
    *&      Form  modify_table
          Modify the table ZBATCH_CROSS_REF
    FORM modify_table.
      loop at t_text.
        t_final-werks = t_text-werks.
        t_final-cmatnr = t_text-cmatnr.
        t_final-srlno = t_text-srlno.
        t_final-matnr = t_text-matnr.
        t_final-charg = t_text-charg.
        t_final-erdat = sy-datum.
        t_final-erzet = sy-uzeit.
        t_final-ernam = sy-uname.
        t_final-rstat = 'U'.
        append t_final.
        clear t_final.
      endloop.
      delete t_final where werks = ''.
      describe table t_final lines g_line.
      sort t_final by werks cmatnr srlno.
    Deleting the Duplicate Records
      perform select_data.
      describe table t_final lines g_line1.
      modify zbatch_cross_ref from table t_final.
      if sy-subrc ne 0.
        write:/ 'Updation failed'.
      else.
        Skip 1.
        Write:/12 'Updation has been Completed Sucessfully'.
        skip 1.
        Write:/12 'Records in file ',42 g_line .
        write:/12 'Updated records in Table',42 g_line1.
      endif.
      delete from zbatch_cross_ref where werks = ''.
    ENDFORM.                    " modify_table
    *&      Form  select_data
          Deleting the duplicate records
    FORM select_data.
      select werks
             cmatnr
             srlno from zbatch_cross_ref
             into table t_zbatch for all entries in t_final
             where werks = t_final-werks
             and  cmatnr = t_final-cmatnr
             and srlno = t_final-srlno.
      sort t_zbatch by werks cmatnr srlno.
      loop at t_zbatch.
        read table t_final with key werks = t_zbatch-werks
                                    cmatnr = t_zbatch-cmatnr
                                    srlno = t_zbatch-srlno.
        if sy-subrc eq 0.
          delete table t_final .
        endif.
        clear: t_zbatch,
               t_final.
      endloop.
    ENDFORM.                    " select_data

  • GUI_UPLOAD file upload.

    Hi,
      i am reading a text file using GUI_UPLOAD.
    but agter reading the file when i am looking into table its reading upto only position 256 of each line.
    i need to read full line upto position 500 of the text file .. please guide me in this case.
    thnx
    vikash

    hi vikash
    you have to increase the size of internal table.
    like suppose you have internal table ITAB it contans 3 fields
    data : begin of itab occurs 0,
    text(500) type c, " here you downloading the text so check the length
    line_num type i,
    pname(30) type c,
    end of itab
    data : p_file type string.
    p_file = 'c:\test'.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = p_file
      FILETYPE                      = 'DAT'            " check formt either DAT or ASC or DBF
    HAS_FIELD_SEPARATOR           = 'X '
      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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    hope this will helpfull for you.

  • How can I at-a-glance review a server's SHA-256 fingerprint in Thunderbird?

    All my IMAP sessions are created via SSL/TLS tunnels to the respective servers.
    Thunderbird dutifully highlights that the connection is encrypted with the small grey padlock icon in the folder pane. This is helpful.
    However, I would like to check the SHA-256 finderprint of the server's certificate on a regular basis, at a glance. Is there a way I can easily do this in Thunderbird?

    Hi ITBobbyP,
    If I understand correctly, you want to load data from multiple sheets in an .xlsx file into a SQL Server table.
    If in this scenario, please refer to the following tips:
    The Foreach Loop container should be configured as shown below:
    Enumerator: Foreach ADO.NET Schema Rowset Enumerator
    Connection String: The OLE DB Connection String for the excel file.
    Schema: Tables.
    In the Variable Mapping, map the variable to Sheet_Name, and change the Index from 0 to 2.
    The connection string for Excel Connection Manager is the original one, we needn’t make any change.
    Change Table Name or View name to the variable Sheet_Name.
    If you want to load data from multiple sheets in multiple .xlsx files into a SQL Server table, please refer to following thread:
    http://stackoverflow.com/questions/7411741/how-to-loop-through-excel-files-and-load-them-into-a-database-using-ssis-package
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • I have a brand new MacBook Air 11 inch, 4gb RAM and 256 gb SSD where the screen flickered abnormally and got dead all of a sudden while uploading a photograph in FB. Can anybody help?

    I have a new MacBook Air 11 inch, 4gb RAM, 256 SSD and use Mavericks OS. It is still under waranty period.
    Just few days ago while I was uploading a photograph in facebook, the screen started flickering abnoromally. I tried using the escape button but nothing was working so switched off by pressing the power button.
    After few minutes I tried to switch it on but my system never waked up. Called up the Apple Support, did SMC and PRAM but nothing worked. Then I was advised to take it to Apple's authorised service centre.
    At the service centre the engineers diagnoised and then said that the MLB/mother board needs to be replaced. Had waited for six-long days and today they had replaced the MLB/mother board. Now, the system came to life but nothing has booted. The screen goes white and a '?' question mark icon keeps on flickering.
    After thoroughly diagnoising it the engineer said that now the problem is with the SSD and the worse thing is all my important documents and photographs etc are no more there. And I don't have a backup of the same!
    While Apple Support contact centre is assuring they would replace any other parts if found faulty, but I feel differently. First, the MLB/mother board was changed now they say it is SSD problem - so if the SSD too is replaced there are possibilities of more faults coming up. All I can see and feel that this particular machine has turned out to be architectually deffective that calls for immediate replacement.
    Right now I am using a friend's windows pc to write this mail.
    Feeling completely miserable - all my expectatations gone after investing in such an expensive machine, loss of all my data, wastage of time and energy and to top it all affecting my daily work.
    Can anybody please advise what shall I do?

    Take the system to an Apple store to be fixed or replaced as the one you have has defective hardware.

  • Windows Vista Printer Sharing - Error: 256

    I am trying to share an Epson CX4800 printer that is connected to my Vista PC with my iMac. When I try to add the printer from my iMac using Windows Printing, I can see the Vista machine. I select it and enter the username and password and receive the following error, "Unable to connect to server with the provided password and user name. Error: 256".
    I am able to mount my Vista Public drive and share files. Why can't I share the printers?
    Thanks.

    I found my answer at this web post
    http://discussions.apple.com/thread.jspa?messageID=6819799
    the post by Hade tells how to add an "advance button" to the add printer window
    then you use this button to add a windows printer using
    smb://user:password@workgroup/computer/printer
    Message was edited by: ronw52a

  • I am about to buy a 13" MacBook Pro with 256 GB SSD drive.  I want a i am about to buy a MacBook Pro Windows partition set up.  How large should it be, and can I use XP Pro or does it need to be Win 7 or 8?

    I am about to buy a 13" MacBook Pro with 256 GB SSD.  I want a Windows partition set up.  What size should it be, and can I load Win XP Pro or does it need to be Win 7 or 8?

    You can use XP but it has to be in a Virtual Machine and OS X as the host instead of as a dual boot system with XP in its own partition. That is how I run Windows on my Mac, in a Virtual Machine.
    Take a look at VritualBox from Oracle. It's free and works very well.

  • Difference between GUI_UPLOAD and WS_UPLOAD

    Hi,
    Please make me clear about the difference between GUI_UPLOAD and WS_UPLOAD. In which cases we need to use these modules...??
    Thanks,
    Satish

    I would suggest to always use the GUI_UPLOAD.  I say this because this is the function module which is used in the GUI_UPLOAD method of the class CL_GUI_FRONTEND_SERVICES.   Really, you should probably use the class/method instead of the function module.
      data: filename type string.
      filename = p_file.
      call method cl_gui_frontend_services=>gui_upload
             exporting
                  filename                = filename
                  filetype                = 'ASC'
             changing
                  data_tab                = iflatf
             exceptions
                  file_open_error         = 1
                  file_read_error         = 2
                  no_batch                = 3
                  gui_refuse_filetransfer = 4
                  no_authority            = 6
                  unknown_error           = 7
                  bad_data_format         = 8
                  unknown_dp_error        = 12
                  access_denied           = 13
                  others                  = 17.
    Regards,
    Rich Heilman

  • WS_UPLOAD,WS_DOWNLOAD and GUI_UPLOAD,GUI_DOWNLOAD.

    Hi,
    Any one Explain difference between WS_UPLOAD,WS_DOWNLOAD and GUI_UPLOAD,GUI_DOWNLOAD.
    Regards,
    Maya

    hi maya,
       ws_upload and gui_upload, will do the same funtionality.
    ws_download and gui_download will do the same functionality.
    but ws* are obsolete.
    Regards....
    Arun.
    Reward points if useful.

  • "Cannot interpret data in file" error while using GUI_UPLOAD for .xls file

    Hi,
         I have made a program using FM GUI_UPLOAD to upload an .xls file to an internal table. But upon executing ,it gives error "Cannot Interpret data in file". I have seen in other posts people talking about GUI_UPLOAD FM to upload data from excel directly into internal table. Kindly help.
    Here is my code. I had tried using different combination for HAS_FIELD_SEPARATOR but still its not working.
    In my emp1.xls file , the data in each column is present in the same order as in the internal table. Although the first column in my internal table is NUMC. I dont know if that is causing the problem.
    REPORT  ZUPLOAD_1.
    data: itab TYPE TABLE OF zempl_master WITH HEADER LINE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\empl1.xls'
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP at itab.
      write:/ itab-emp_no,itab-name.
    endloop.

    hi amber22 you need to use the below fm to upload an xls file
    FORM EXCEL_UPLOAD .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME    = FILENAM
          I_BEGIN_COL = 1
          I_BEGIN_ROW = 1
          I_END_COL   = 6
          I_END_ROW   = 100
        TABLES
          INTERN      = xl_itab.
    * EXCEPTIONS
    * INCONSISTENT_PARAMETERS = 1
    * UPLOAD_OLE = 2
    * OTHERS = 3 .
      IF SY-SUBRC = 0.
    MESSAGE 'DATA UPLOADED SUCCESSFULLY' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " EXCEL_UPLOAD

  • NVIDIA GeForce GT 330M (256 mb) vs NVIDIA GeForce 8600M GT (512 mb)

    Hi, new here, but ive been wondering for quite a while now which one, in terms of processing power (playing games, video editing, etc) would be better?
    NVIDIA GeForce GT 330M (256 mb) or the NVIDIA GeForce 8600M GT (512 mb)
    the 8600M being on the previous system, and the 330M on the new one, if I were to get the new one with 256 video memory, would it still be better than the 8600M with 512mb vram that I currently have?
    Thanks.

    Hi so does this mean that the 330, even at 256mb will be faster right? Thanks.

  • Will Motion 5 work with the NVIDIA GeForce 8600M GT with 256 MB?

    I have a 15" MacBook Pro Intel Core 2 Duo with a NVIDIA GeForce 8600M GT with 256 MB and 4 GB RAM.  I need to know if this will work with Motion 5?

    Patrick, You should be fine "just" - here is the spec sheet:-
    http://support.apple.com/kb/HT4664
    Alan

  • Serial Write - 8Mb file to write. Write command can only do 256 Bytes at a time. How to split up?

    First, thanks for this resource. I've used this forum quite a bit as a "lurker" and it's gotten me this far. Hoping to learn a bit, so I can contribute
    Anyway, my issue is this:
    I am ultimately trying to write an 8Mb binary file to an 8Mb Serial Flash device via the Total Phase Aardvark. The writes to the flash device I am using are limited to 256 bytes per write command. The vi program attached is capable of writing 256 bytes at a time, but not anything more. I realize I need to incorporate some sort of "For Loop" (and I understand that I'd want to do it =(File Size)/256 interations, but I can't seem to figure out how.
    Does anyone have any quick advice to drive me in the right direction?
    Thank you!
    Attachments:
    Aardvark bin test 02.vi ‏33 KB

    Well, you seem to have answered your own question, so it's not clear what your specific issue is. Is it how to extract 256 bytes at a time?
    As for the code... umm... I'm not entirely sure what you're trying to accomplish with the whole top half of your code, but it seems to me that almost the whole thing can be replaced by a single call to the Read Binary File function. What is the format of these binary files?

  • Msi Nx6800le-td 256 PCI-E

    Is that MSI NX6800LE-TD 256 same as NX6800LE 128 with douple amount of memory or is there some new improvements ? allthough i cant find any 6800LE product´s from the msi product catergory. This is an PCI-E card.
    Just seeking for good/cheap PCI-E card for my next pc system and my local pc store sells this card for 260€. Cheap if i may say and if this card is fully moddable to open those locke VS and pipelines like Gainward 6800LE 128 then it rocks
    And for the future to improve graphic acceleration its easy way just to buy another msi 6800le card and put it in to sli mode and its then cheaper

    nobody cares me  

  • Concerns w/ MSI fx5600XT 256 Card

    I am looking for a video card to go with my
       New MSI kt6 deltaLSR mobo w/ 2500 barton chip
    I have 1 GIG of samsung  (512x2) PC3200 400MHz Dual Channel DDR sdram
       waiting for the Mobo to arrive
      I have 2 concerns about what was a soon to be purchased MSI fx5600xt 256 Video Card
      1.) "Special notes for midrange graphics card buyers:
    Avoid 256 MB versions and save money. 256 MB VRAM is useless with these cards and card manufacturers often use inferior memory in 256 MB cards"
    Quote from Toms Hardware guide
    2.)  "GeForce FX5600 (non-Ultra)
            Pros- DX9 support
             Cons- Gets wasted by Radeons. Not good value for money
          GeForce FX5600 Ultra rev1.0/2.0
              Pros- DX9 support, fairly good DX8 performance (rev2.0)
              Cons- Poor DX9 perforamance, Radeon 9600 Pro and faster cards are      much better for both DX8 and DX9. Not good value for money
    Now I know this is a MSI site and I don't want to get flamed
      But i have a limited budget and can't upgrade all the time or waste money
    I just want honest answers and opinions...
     1.) Is the Toms hardware guide Skewed?
     2.) is the 5600xt better than the Ultras?
     3.) Is the 256 MB worth spending the extra money on instead of the 128mb
     4.) Would the ATI cards be the better value right now for the price and time of the cards on the market

    first off nvidia's "XT" models are the opposite of ATI's "XT" models. They are a lower end version and are like ati's "SE" models.
    my suggestion would be to buy an old 9500NP and then softmod it to a 9700NP(which has 8 pixel pipelines compared to 4, which means better performance by nearly double).  but, sometimes it doesnt work. so dont blame me if it doesnt work. u can always change it back later thought.
    you can get it here(has to be this model and have the "L" shaped memory): http://store.yahoo.com/buyaib/atirad9512dd.html
    and u can download the drivers for the mod here: http://www.ocfaq.com/softmod/download.php
    also you might find this interesting: http://www6.tomshardware.com/graphic/20031229/index.html
    good luck

Maybe you are looking for

  • Small business network issues!!!

    I am at my wits end with this problem:  We have a small business network consisting of 6 Mac Pro computers and 2 Windows PCs.  Everything was working fine until we needed to replace one of the WinXP machines with a Windows 7 machine.  None of the Mac

  • Generating XML from database

    I'm a total newbie in XML DB and need advice on generating XML from database. The situation is the following: there is a legacy web application which uses an XML document as a configuration file. This document conforms to some well-defined schema. Fo

  • How do I reset Cursor not Hand tool on Adobe X on mac with mavericks?

    Adobe just started defaulting to hand tool in Adobe X on mac with mavericks.  How do I get my cursor back??

  • Data load in prod system

    HI, In 0CRM_c04. I have a Zinfoobject which is the transaction number of each Oppt. For each Oppt created  a transaction number is created as well. And the No.of doc headers will be set to 1. I have the transaction number created and data transfered

  • ERROR IN CREATING SALES ORDER INQUIRY

    Hi,   I am getting the error "Schedule line Category AT is not defined" while creating Item level details in Sales order Inquiry. Please Help....