GUI_UPLOAD - EXCEL FILE PROBLEM

Hi All,
        I am using GUI_UPLOAD function for BDC. I want to upload a file but there i m gatting error. I tried with both  file type excel & txt.
While running the recording it takes ##### chars.
Regards,
Dilip
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename                      = 'c:\excel.xls'
   FILETYPE                      = 'BIN'
  HAS_FIELD_SEPARATOR           = ' '
  HEADER_LENGTH                 = 0
  READ_BY_LINE                  = 'X'
  DAT_MODE                      = ' '
  CODEPAGE                      = ' '
  IGNORE_CERR                   = ABAP_TRUE
  REPLACEMENT                   = '#'
  CHECK_BOM                     = ' '
IMPORTING
  FILELENGTH                    =
  HEADER                        =
  tables
    data_tab                      = it_bdc

Dear Dilip,
I have used GUI_UPLOAD a lot, but never like this.
Well i'll tell you to upload .txt file . Download or save EXCEL file as text delimited by tab as it gets saved normally. Dont forget that except characters all other fields are in formatted as text field in Excel, they will get alinged as a normal text field only.
My txt file have data like below.
RAJESH     10
RAJSALECHA     11
BCONE     13
Then in program i have done as below.
Report ZTEST5.
PARAMETERS : FILE TYPE RLGRAP-FILENAME.
DATA : BEGIN OF IT OCCURS 0,
         NAME(20),
         AGE(4),
       END OF IT.
DATA : PATH TYPE STRING.
PATH = FILE.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = PATH
   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
  TABLES
    DATA_TAB                      = IT.
LOOP AT IT.
WRITE : /1 IT-NAME COLOR 1, 20 IT-AGE COLOR 4.
ENDLOOP.
Kindly see this and tell me if you face any problem in it.
Raj Salecha
[email protected]

Similar Messages

  • Linked excel file problem - Help needed

    I have 2 excel files in the same directory in Content Services. The "destination" file has a link in one of its cells to a cell in the "source" file. I want to be able to open the "destination" file and update the data if any changes have been made to the "source" file.
    My problem is when I try to do this i get an error that says "This workbook contains one or more links that cannot be updated" and two options.
    1) To change the source of links, or attempt to update values again, click Edit Links.
    2) To open the workbook as is, click Continue.
    If I click Edit Links I am then presented with a screen where I can open the "source" file. When I try to do this though I am given a login screen. Supplying a valid Content Services username and password doesn't work and I cannot open the file.
    Can anyone tell me how I can open the "destination" file without having to open every "source" file? I don't want to open the "source" files because there could be dozens of "source" files for one "destination" file.

    setw is the equivalent of the field width value in printf. In your code, the printf version would look like:
    printf("%8s", CURSOR->name.c_str());
    I much prefer printf over any I/O formatting in C++. See the printf man page for more information. I recommend using Bwana: http://www.bruji.com/bwana/
    I do think it is a good idea to verify your code on the platform it will be tested against. That means Visual Studio. However, you don't want to use Visual Studio. As you have found out, it gets people into too many bad habits. Linux is much the same way. Both development platforms are designed to build anything, whether or not it is syntactically correct. Both GNU and Microsoft have a long history of changing the language standards just to suit themselves.
    I don't know what level you are in the class, but I have a few tips for you. I'll phrase them so that they answers are a good exercise for the student
    * Look into const-correctness.
    * You don't need to compare a bool to 1. You can just use bool. Plus, any integer or pointer type has an implicit cast to bool.
    * Don't reuse your CURSOR pointer as a temporary index. Create a new pointer inside the for loop.
    * In C++, a struct is the same thing as a class, with all of its members public by default. You can create constructors and member functions in a struct.
    * Optimize your function arguments. Pass by const reference instead of by copy. You will need to use pass by copy at a later date, but don't worry about that now.
    * Look into initializer lists.
    * In C++ NULL and 0 are always the same.
    * Return the result of an expression instead of true or false. Technically this isn't officially Return Value Optimization, but it is a good habit.
    Of course, get it running first, then make it fancy.

  • Saving XL Reports to Excel file problem

    Dear Experts,
    I have generated a report with XL Reporter, and I save it to disk. However, when I open up the Excel file in another PC that does not have SAP Business One and XL Reporter installed.
    The Excel file content was not displayed, all that was shown are the XL Reporter formulae..etc.
    How can I save the Excel file to disk so that I can display the file properly (with report values, not xlreporter formula) in a PC with no XL Reporter installed?
    Warmest Regards,
    Chinho

    Hi
    We had a problem with reports generated in Excel 2003 and being viewed in Excel 2007. There is a file excel.exe.config which needs to be dropped into: \Program Files\Microsoft Office\OFFICE12 on the machines that need to view the spreadsheets.
    I cannot remember where this file came from but it may cure your problem. It must be on the SAP site somewhere.
    Hope this helps.
    Regards
    Stewart Clark

  • Export to excel file problem

    When I export my Crystal report to excel file (97-2000)
    it does not show the Boxes and lines in excel file.
    I am using CR 11 and MS Office 2003
    please guide me how to solve this problem
    Edited by: mian ghous on Feb 10, 2009 1:59 PM

    But, DUDE, it IS possible using borders!  Each of the border options has a formula field that you can code to tell Crystal in effect "on this line of the report, I want xxx borders". 
    Let's start with the easiest example:  Say you want the line to go around the column heading (full box). then lines down each side of the column until the end, then for the the subtotal you want lines on three sides (all but top).  Set all four borders for the heading field to Single, set the right and left borders for the data field to Single, and set all but the top border for the subtotal field to Single.
    To expand this, let's say there is no subtotal, and you want the last value in the field to have a bottom border.  Set the header and data field borders as above, except for the bottom border of the data field, use the following formula (basic syntax):
    if {field} = NextValue({field}) then
      formula = crNoLine
    else
      formula = crSingleLine
    end if
    If you want the line across the top of the data field on the first detail row (i.e., not around the header), use the same logic as above, except using PreviousValue().
    HTH,
    Carl
    Edited by: Carl Sopchak on Feb 11, 2009 8:25 AM

  • GUI_UPLOAD - excel file

    Hi All,
    I am using gui_upload for uploading excel file.
    Following parameters I am passing
    file name     - c:\datafile.xls
    file type     - asc
    HEADER_LENGTH - 0
    READ_BY_LINE  - X
    But in testing the function module in se37 it is taking (#) characters.
    For (.txt) format is working fine.
    I also tried with BIN format. But o/p is same.
    Is there any other parameters I need to pass?
    Regards,
    Dilip

    Hi Dillip,
    Try this:
    1.) call 'GUI_UPLOAD' with FILETYPE 'BIN'
    1.2) Parameter:
    filename = 'C:TEMPshießmichtot.xls' or similar
    filetype = 'BIN'
    READ_BY_LINE = 'X'
    DATA_TAB = lt_bin
    data: lt_bin type truxs_t_text_data.
    2.) Then convert this bínary file to internal table using
    the function-module:
    'TEXT_CONVERT_XLS_TO_SAP'
    You only need to fill these Parameters:
    ITAB_ROW_DATA = lt_bin
    I_FILENAME = 'C:TEMPshießmichtot.xls' or similar
    I_TAB_CONVERTED_DATA = 'Your internal target table'
    Please Check the Data-Types of the Function-Moduls.
    May they have changed depending on your Release!
    This method converts all data automatically to the
    correct SAP-Data-Types!
    Hope I could help You
    (Reward-Points would be nice)
    BR
    Michael

  • Shared Excel Files Problem in Leopard

    I have a large number of files I want to share with another user under leopard on one computer so we can each read and write them.  I have tried to use the "shared" folder feature under "users."  However, Excel seems to have a problem with this even when r/w permissions are given to the other user.  I get hints from Internet searches that Excel uses some hidden OS X files in those shared folders and the permissions are somehow not acceptable.  Is there a fix other than just using the root as a place for a share directory for the files?

    Here is further information.  While I can share the Excel files if they are directly on the root, I cannot if the file is even in one level of file folder on the root.  It seems to have to do with just having Excel files in a folder and not just if the folder is in the "shared" area or not.  I am not finding anything on a web search and Apple Care has thrown up their hands just saying "its and Microsoft issue!"  Could it be that there is some hidden file created that (even the .DS_Store file) that is causing the problem?  How do I delete that file just to try it?

  • Sharepoint foundation 2013, IIS Logging can't logging excel file problem

    Hello, I am new in SharePoint 2013, 
    When I was using SharePoint foundation 2010, I am using IIS for audit log. That can logging user name and what they clicked.
    some like:
    2014-05-28 08:09:40 10.161.121.247 GET /folder/subfolder/file.PDF - 80 domain\userid1,
    2014-05-28 08:09:40 10.161.121.247 HEAD /folder/subfolder/file.XLSX - 80 domain\userid2,
    When I am using SharePoint foundation 2013 the log like this:
    2014-05-28 08:09:40 10.161.121.247 GET /folder/subfolder/file.PDF - 80 0#.w|domain\userid1,
    2014-05-28 08:09:40 10.161.121.247 OPTIONS /folder/subfolder/ - 80 0#.w|domain\userid2,
    The excel file can't logging, how can I fix it?

    Hello Margriet,
    thank for your answer, 
    what I mean is that:
    I would like my log like:
    2014-05-28 08:09:40 10.161.121.247 OPTIONS /folder/subfolder/file.xlsx - 80 0#.w|domain\userid2,
    not
    2014-05-28 08:09:40 10.161.121.247 OPTIONS /folder/subfolder/ - 80 0#.w|domain\userid2,

  • Upload Excel File : Problem with Filter

    Hi Experts,
    by using "TMP_GUI_FILE_OPEN_DIALOG" with these parameters:
         window_title      = 'Please select an Excel File'
         default_extension = '*.xls'
         file_filter       = '*.xls'
         multiselection    = ' '
         init_directory    = 'C:\temp'
    it doesn't show any file the first time we call the Function, we have to close the window and then restart the Function Then it show all Fileformat, I just want to see .XLSX files.
    Any idea?
    Regards,
    David

    I found the solution:
    Initialisierung
      CONCATENATE 'Alle-Dateien(.)|.|'
                  'Word-Dateien(.doc)|.doc|'
                  'Bild-Dateien(.gif)|.gif|'
                  'Bild-Dateien(.jpg)|.jpg|'
                  'Mail-Dateien(.msg)|.msg|'
                  'PDF-Dateien(.pdf)|.pdf|'
                  'Bild-Dateien(.tif)|.tif|'
                  'Text-Dateien(.txt)|.txt|'
                  'Excel-Dateien(.xls)|.xls'
             INTO filter.
    Datei abfragen
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title      = 'Datei auswählen'
          file_filter       = filter
          initial_directory = 'C:'
        CHANGING
          file_table        = i_file[]
          rc                = rcode
        EXCEPTIONS
          OTHERS            = 1.
    Regards,
    David

  • Importing excel files - problem with single quote

    When importing excel files using 1.5, I can't get data with single quotes (') imported.
    When I run the insert statement given in SQLPlus I get "ORA-01756: quoted string not properly terminated", which is different than the error that SQL Developer gives me (see below).
    Also, I have a numeric value shown without a thousands comma-separator in the XLS file that I'm trying to load into a varchar2 field. But, the insert statements have added a thousands comma-separator which I don't want.
    REM Error starting at line 1 in command:
    REM INSERT INTO table (ID, NAME, CODE)
    REM VALUES (2427407, 'Ed-u-care Children's Center', '73,000');
    REM Error at Command Line:2 Column:37
    REM Error report:
    REM SQL Error: ORA-00917: missing comma
    REM 00917. 00000 - "missing comma"
    REM *Cause:   
    REM *Action:
    One last thing, TOAD gives a way to automap columns chosen from XLS to the columns in the database. It sure would be nice to have this functionality in SQL Developer.
    Thanks,
    Steve

    Did you consider both to be bugs (i.e., single quote issue and thousands comma separator issue)?
    Thanks

  • Excel file Problem

    minimize excel file showing hidden on taskbar

    Thanks Tolls.
    java.io.FileNotFoundException: C:\Documents and Settings\heb1kor\Desktop\sample.xls *(The process cannot access the file because it is being used by another process)*
    +     at java.io.FileOutputStream.open(Native Method)+
    +     at java.io.FileOutputStream.<init>(FileOutputStream.java:179)+
    +     at java.io.FileOutputStream.<init>(FileOutputStream.java:131)+
    +     at java.io.FileWriter.<init>(FileWriter.java:73)+
    +     at Filewriter1.main(Filewriter1.java:9)+
    After seeing the Javadoc, It was known that FileNotFoundException can be thrown because of several reasons. How can I accertain this scenario of tying to write to a open file by catching this Exception. Are there any alternatives or is there any fine tuning required for this.

  • Down load itab data from Debugging screen as excell file - problem

    Hi,
    I am using 4.6 C version.
    While debugg, I am not able to see spread sheet icon to down load my internal table data into excell sheet.
    Are there any setting I need to do OR How can I get down load my internal table data into excell sheet.
    Your help is highly appreciated.

    in 4.6 its not available
    try this
    in debugging mode
    in menu   goto-display data object-structure editor
    u will get one report
    in menu  system->list>save--->local file

  • Can 'GUI_UPLOAD'  to be used to upload excel file lonely?

    Hi experts,
    I wonder that can 'GUI_UPLOAD'  to be used to upload excel file lonely. I tried and use 'asc' as the L_FILETYPE, but the data uploaded contain many '###yyy'. But if I save the excel file as a txt file,
    the data can be uploaded by 'GUI_UPLOAD' correctly. So what is the problem?

    Excel files be can't uploaded using "GUI_UPLOAD".
    Use the FM "ALSM_EXCEL_TO_INTERNAL_TABLE"
    Try this code:
    * Upload data direct from excel.xls file to SAP
    REPORT ZEXCELUPLOAD.
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program

  • Problem in uploading excel file

    HI ,
    i need to upload a excel file, I am able to get records form excel to internal table, using ws_upload FM.
    But i m getting a # in between every fields.
    I have used split at '#' into field1 field2... but it is not working. Can anybody help me onthis.. plz..
    Kumar

    Hi I have encountered this problem too. After trying different solutions, I guess that FM 'GUI_UPLOAD' is
    not supposed to upload an excel file. So please try FM 'TEXT_CONVERT_XLS_TO_SAP' as below. It works.
    *: Description                                                :
    *: This is a simple example program to get data from an excel :
    *: file and store it in an internal table.                    :
    *: Author : www.sapdev.co.uk, based on code from Jayanta      :
    *: SAP Version : 4.7                                          :
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.     "To retrieve the upload file name
    TYPES: BEGIN OF t_datatab,
          col1(10)    TYPE c,
          col2(10)    TYPE c,
          col3(10)    TYPE c,
          END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
         I_FIELD_SEPERATOR        =  'X'
         i_line_header            =  'X'     "To ignore the header line(the first line) if it is 'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 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.
    END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3.
      ENDLOOP.

  • What parameters should i pass inorder to upload an excel file in gui_upload

    what parameters should i pass inorder to upload an excel file in gui_upload
    Thanks in advance.
    Ahmed.

    check below program....
    *& Report  UPLOAD_EXCEL                                                *
    *& Upload and excel file into an internal table using the following    *
    *& function module: ALSM_EXCEL_TO_INTERNAL_TABLE                       *
    REPORT  UPLOAD_EXCEL no standard page heading.
    *Data Declaration
    data: itab like alsmex_tabline occurs 0 with header line.
    Has the following format:
                Row number   | Colum Number   |   Value
         i.e.     1                 1             Name1
                  2                 1             Joe
    TYPES: Begin of t_record,
        name1 like itab-value,
        name2 like itab-value,
        age   like itab-value,
        End of t_record.
    DATA: it_record type standard table of t_record initial size 0,
          wa_record type t_record.
    DATA: gd_currentrow type i.
    *Selection Screen Declaration
    PARAMETER p_infile like rlgrap-filename.
    *START OF SELECTION
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = p_infile
                i_begin_col             = '1'
                i_begin_row             = '2'  "Do not require headings
                i_end_col               = '14'
                i_end_row               = '31'
           tables
                intern                  = itab
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
      if sy-subrc <> 0.
        message e010(zz) with text-001. "Problem uploading Excel Spreadsheet
      endif.
    Sort table by rows and colums
      sort itab by row col.
    Get first row retrieved
      read table itab index 1.
    Set first row retrieved to current row
      gd_currentrow = itab-row.
      loop at itab.
      Reset values for next row
        if itab-row ne gd_currentrow.
          append wa_record to it_record.
          clear wa_record.
          gd_currentrow = itab-row.
        endif.
        case itab-col.
          when '0001'.                              "First name
            wa_record-name1 = itab-value.
          when '0002'.                              "Surname
            wa_record-name2 = itab-value.
          when '0003'.                              "Age
            wa_record-age   = itab-value.
        endcase.
      endloop.
      append wa_record to it_record.
    *!! Excel data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.

  • GUI_UPLOAD for excel file

    hi,
           i am facing a problem with function module GUI_UPLOAD.
    when i am trying to upload a excel file using gui_upload,the data that gets uploaded to internal table is garbage (contains # etc)..
            what can be the reason.
                                       shailendra.

    hi check this..
    REPORT  ZTESTPROG003.
    TYPES:
         BEGIN OF ty_upload,
         matnr like mara-matnr,
         meins like mara-meins,
         mtart like mara-mtart,
         mbrsh like mara-mbrsh,
         END OF ty_upload.
      DATA it_upload TYPE STANDARD TABLE OF ty_upload WITH header line.
      DATA wa_upload TYPE ty_upload.
      DATA: itab TYPE STANDARD TABLE OF alsmex_tabline WITH header line.
    DATA itab TYPE STANDARD TABLE OF ty_upload WITH header line.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename    = 'C:\Documents and Settings\venkatapp\Desktop\venkat.xls'
          i_begin_col = 1
          i_begin_row = 1
          i_end_col   = 4
          i_end_row   = 65535
          TABLES
          intern      = itab.
    if not itab[] is initial.
    loop at itab .
    case itab-col.
    when '0001'.
    it_upload-matnr = itab-value.
    when '0002'.
    it_upload-meins = itab-value.
    when '0003'.
    it_upload-mtart = itab-value.
    when '0004'.
    it_upload-mbrsh = itab-value.
    append it_upload.
    clear it_upload.
    clear itab.
    endcase.
    endloop.
    endif.
    loop at it_upload.
    write:/ it_upload-matnr,it_upload-meins,it_upload-mtart,it_upload-mbrsh.
    endloop.

Maybe you are looking for

  • Itunes Library error message on Powerbook G4

    I have never had this error message pop up. Today I tried to copy some songs from my powerbook to my other mac for a video I was doing, the CD got stuck (doesn't even show up on screen) and I can't eject it AND now my itunes doesn't work saying somet

  • Commit in user exit

    hi experts during an idoc process i am trying to do commit after inserting data to a database table in include MV45AFZZ in a user exit. the commit statement causes the idoc process to fail. how can i do commit in a way that won't fail the idoc proces

  • Trying to create an event trigger but no packages are showing

    Oracle BI Publisher 11.1.1.5.0  (build:53(13879917)) OS: Linux 2.6.32-300.32.2.el5uek #1  x86_64 x86_64 x86_64 Hi Folks, When attempting to create an event trigger for a data model I am unable to obtain a listing of available functions. The trigger i

  • I changed email and cannot connect to iCloud verify account does nothing?

    I changed email and cannot connect to iCloud verify account does nothing? Now on Comcast Apple ID was changed to comcast, and is ok iCloud wants to verify my account and shows the old ATT address. Nothing appears on att mail Now what?

  • Hardwire Airport Extreme to an Express

    I need to hardwire an Extreme to an Express to get a signal to a room separated by a brick wall. Are there any special setup settings I need to make on either unit?