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

Similar Messages

  • 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

  • Help - upload PDF file - problem with adobe

    We are attempting to upload a PDF file into an internet application.  We are told that our Windows 7 is not compatibale with our Adobe software and even though we have the file name appropriately it will not populate in the window that is available.
    HELP!

    I understand that it is difficult to determine which forum to post in since there are so many. This particular forum (sharing and storage) was created to help those transitioning from Photoshop.com to Adobe Revel. I am moving your post to the correct forum so that it can get proper attention.
    I'll put I this posting in the Acrobat community so the experts there can help you.
    We also have many other forums relating to other Adobe products
    http://forums.adobe.com/community/
    http://forums.adobe.com
    Out of curiosity, can you tell me how you found our forum page?
    Thanks
    Scott

  • Error message while upload excel file (with macro) to sap (iw28)

    While upload excel file to sap through iw28, i get error message (vb)
    u2022     i have to say that the excel file contain macro , with out the macro , work fine .
    u2022     The error display just in refresh command.
    the error message :
    Public Sub ALV_CUS_Exit()
    Dim objs As ChartObjects
    Dim obj As ChartObject
    Dim sheet As Worksheet
    Dim r As Range
    For Each sheet In Sheets
    Set objs = sheet.ChartObjects
    For Each obj In objs
    Set r = Sheets("RawData").UsedRange
    obj.Chart.SetSourceData Source:=r
    Next obj
    Next sheet
    End Sub

    hi,
    This is releated to the ABAP coding...There might be some ouput problem in the Abap list viewer...Pls check it with the ABAP consultant...
    Regards
    Priyanka.P

  • Problem in Uploading excel file using WebDynpro for Java

    Hi  All
    I have followed for Uploading excel file using WebDynpro for Java added by  Tulasi Palnati
    I done all, but I'm getting 500 Exception please contact u r system admin meag  at run time also  Jxl/Workbook class not found msag  but i downloaded Jxl.jar file and  there is no error signals  in coding part. How can I solve the Problem.
    Thanks
    Polaka

    Please ask the people in the Web Dynpro Java forum for a solution.

  • SharePoint 2013 Foundation error when uploading Excel files

    Hello 
    I have a specific problem. I have an xlsx file that I cannot upload in SharePoint. Normally our SharePoint can upload Excel files and other file formats normally but this one has data with nearly 5000 rows. The size of the file is less then 500 KB. The error
    message is: "The URL is invalid. Perhaps it refers to a nonexistent file or folder, or it refers to a valid file or folder in the current Web." When I am uploading this file I am getting the same error message in every library. When I save
    the file as a 97-2003 compatible xls then it works. Sometimes even Excel files with Macros won't upload. 
    Kind regards
    ivicapro1987

    Hi,
    This issue occurs when the Version column is configured as an Indexed Column. 
    To work around this issue, remove the Version column from the list of Indexed Columns for the list that has this issue. To do this, follow these steps:
    Browse to the list where the issue exists.
    In the ribbon, click the Library tab, and then click
    Library Settings.
    In the fields list, click Indexed Columns.
    In the Indexed Columns list, click Version.
    Click Delete, and then click OK.
    Upload any files that you previously experienced the issue with.
    Reference:
    https://support.microsoft.com/kb/2796640?wa=wsignin1.0
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to upload excel file in Webdynpro application using ABAP

    Hi Experts,
    Am developing a webdynpro application in which it will take an excel file as input and display the contents in the form of a table in output. I am able to upload tab delimited text file and populate the table using the below code but not able to do the same with .xls file. Pls let me know if I need to use a different function module for upload excel file.
    get single attribute
      wd_context->get_attribute(
        EXPORTING
          name =  `DATASOURCE`
        IMPORTING
          value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string.
      SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    Bind With table Element.
      LOOP AT i_data INTO l_string.
        SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
        READ TABLE fields INTO lv_field INDEX 1.
        fs_table-name = lv_field.
        READ TABLE fields INTO lv_field INDEX 2.
        fs_table-age = lv_field.
        APPEND fs_table TO t_table1.
      ENDLOOP.
    lo_nd_data = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_data->bind_table( T_TABLE1 ).
    Thanks,
    Subathra

    Dear Exports
    Can anyone guide me how to uplode the .xlsx or ..xls formatted excel file using abap webdynpro without converting it to .txt file. Because my client requirement is only to upload the excel file. because to convert the .xlsx flie to .txt file it will be time taking and cost expanssive. Another requirement is suppose today i have create a application for uploading a file which has 8 columns and 10 rows. suppose tomorrow the client will make some changes in that flat file means the client will add 2 extra columns and 10 more columns in that fil. and will upload that file. Then the new file will be display on the browser or old file. but my requirement is to display the new file in browser.
    Can anyone kindly help to solve my problem. I am completely fresher in this field and I need to do it as soon as possible. Please help to solve the problem. 
    Regards
    Rashmita

  • Uploading Excel file  using 'ALSM_EXCEL_TO_INTERNAL_TABLE'

    Hi,
    I am uploading excel file into an internal table using 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.
    but I'm getting a popup with the message
    'There is a large amount of the information on the clipboard. Do you want to be able to paste this information into another programme later.' and there are three buttons in the popup 'YES', 'CANCEL' and 'NO'. but for any choice there is no data in the internal table. 
    the progrsm is working in other systems but giving problem in customer laptop, can you please tell me is there any settings need to set for EXCEL or SAP.
    system details are as below
    OS: windows 7
    MS-Office - 2007
    SAP : ECC06

    Looks like there was an intention to clear the clipboard in the code, but this does not seem to work.
    I copied the function module to my own version and added the following code, which seems to work :
    * clear clipboard
      refresh excel_tab.
      call method cl_gui_frontend_services=>clipboard_export
         importing
            data                 = excel_tab
         changing
            rc                   = ld_rc
         exceptions
            cntl_error           = 1
    *       ERROR_NO_GUI         = 2
    *       NOT_SUPPORTED_BY_GUI = 3
            others               = 4
    * Copy only one cell to prevent the clipboard data message.
      call method of worksheet 'Cells' = h_cell
          exporting #1 = 1 #2 = 1.
      m_message.
      call method of worksheet 'Cells' = h_cell1
          exporting #1 = 1 #2 = 1.
      m_message.
      call method  of worksheet 'RANGE' = range
                     exporting #1 = h_cell #2 = h_cell1.
      m_message.
      call method of range 'SELECT'.
      m_message.
    * copy marked area (whole spread sheet) into Clippboard
      call method of range 'COPY'.
      m_message.
    * quit Excel and free ABAP Object - unfortunately, this does not kill
    * the Excel process
      call method of application 'QUIT'.
      m_message.

  • Upload Excel Files to ITable

    Hi... maybe someone of you have been reading about how to upload excel files to an internal table using function module ALSM_EXCEL_TO_INTERNAL_TABLE.
    The problem that I found with this technique is that it is not possible to use this FM with the SAP WAS because it gives a runtime dump (it only works if the file is on the client machine and if the function module is called from SAPGUI.
    Then I have found the topic
    Re: BSP and Excel
    And one guy puts something interesting like this:
    1. In the application use file upload to upload the file.
    2. caputure the content and length
    DATA: data TYPE REF TO CL_HTMLB_FILEUPLOAD.
    data ?= CL_HTMLB_MANAGER=>GET_DATA(
    request = runtime->server->request
    name = 'fileUpload'
    id = 'xx').
    name = data->file_name.
    content = data->file_content.
    length = data->file_length.
    content_type = data->file_content_type.
    3. Then read the data using the class
    DATA: conv TYPE REF TO CL_ABAP_CONV_IN_CE.
    conv = CL_ABAP_CONV_IN_CE=>CREATE( input = CONTENT ).
    conv->READ( importing data = Variable len = length ).
    Now... has anyone continued with this sample? has anyone put the contents into an internal table (with the READ method)...
    If someone did it please show me how to..
    Thanks
    Ariel

    Hi Craig,
    Ok, I was reading the Thomas's Blog and the thread about excel. The blog talks about encoding and the thread is about how to "download" the table. I want to upload the excel to an internal table.
    So, I am almost finishing the code.. But I have a problem (named DUMP) when I create the "conv" object (check the code) the problem is because I dont know how to call the create method indicating 'UFT-16' as encoding.
    I show you my "OnInputProcessing" code:
    IF button_event->id = 'btnUpload'.
      fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
                           request = request
                           id      = 'txtFile'
                           name    = 'fileUpload' ).
      IF ( fileUpload->file_name  NE '' ) AND
         ( fileUpload->file_length GT 0 ).
         IF fileUpload->file_content_type
            = 'application/vnd.ms-excel'.
            DATA: content   TYPE ZMTVEMAT,
                  conv      TYPE REF TO CL_ABAP_CONV_IN_CE,
                  viewoff   TYPE REF TO CL_ABAP_VIEW_OFFLEN,
                  it_off    TYPE ABAPOFFLENTAB,
                  wa_off    TYPE ABAPOFFLEN,
                  dd_fields TYPE DDFIELDS,
                  wa_fields TYPE DFIES,
                  len       TYPE I.
            conv = CL_ABAP_CONV_IN_CE=>CREATE(
                      encoding = 'UTF-16'
                      endian   = 'L'
                      input    = fileUpload->file_content ).
            CALL FUNCTION 'TR_NAMETAB_GET'
               EXPORTING
                IV_TABNAME                   = 'ZMTVMAT'
                IV_GET_LENGTHS_IN_CHARMODE   = 'X'
                IV_GET_TEXTS                 = ' '
               IMPORTING
                ET_DFIES                     = dd_fields.
                LOOP AT dd_fields INTO wa_fields.
                  MOVE wa_fields-offset TO wa_off-ioff.
                  MOVE wa_fields-intlen TO wa_off-ilen.
                  APPEND wa_off TO it_off.
                ENDLOOP.
       viewoff = CL_ABAP_VIEW_OFFLEN=>CREATE( tab = it_off ).
                conv->READ(
                            exporting
                              view = viewoff
                            importing
                              data = content
                              len = len ).
    This is the DUMP
    Runtime Errors         CONVT_CODEPAGE_INIT                               
    Exception              CX_SY_CODEPAGE_CONVERTER_INIT                     
           Occurred on     30.11.2004 at 13:20:47                                                                               
    The conversion of some code pages is not supported.                                                                               
    What happened?                                                                               
    The conversion of texts in code page 'UTF-' to code page '1100' is not   
    supported.                                                               
    Thanks
    Ariel

  • Uploading excel files into Web UI

    We are following the blog http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebUI-UploadingdatafromExcelfiles
    to upload excel files into Web UI.
    The  problem which we are facing is that the values are not getting populated in the text are and in the
    event handler EH_ONSERVEREVENT, no values are being populated in lt_items table.
    It would be great if someone could help us with this.

    Hi Nidhi,
    I have tried the blog but due to some reason, could not get it worked out.
    But, If U are ok to use CSV input files, instead of excel, U can use the standard component "GS_FILE_UPLOAD" as a popup and upload the files into the required assignment blocks.

  • 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

  • Can not upload Excel file

    We developed a web site,There are file upload function.
    Web site running on the NetWeaver
    Can upload .rar .pdf .bin   files. But when upload Excel file ,It Often failed,Occasionally, the success of.
    I have imp notes for update sevletinputstreamreadtimeout parameter, now it is 180000.
    Pls help me

    Hi,
    I have had issues with sporadic document upload problems. There are several SAP notes. Primarily there is an issue with Internet Explorer and keepalive timouts. Try each/all of these three options.
    1) Examine the keepalivetimeout settings (see SAP note 900804)
    2) Examine MaxRequestContentLenght setting (see SAP note 898637)
    3) Ensure that your Temporary directories for the J2EE server are set correctly use the Config Tool to add new parameters
    -Djava.io.tmpdir=[a suitable temp directory ([SID]ADM user needs read write acces)]
    -Dcm.tmpdir=e:\EP_TEMP (example) (see SAP Note 898637)
    Hope this helps
    Regards
    Alex

  • Upload Excel File from Portal (R/3 working fine)

    Hi Experts!!
    We have a report in which we are uploading an excel file from presentation server into an itab. When F4 clicked for file path, browser will open for choosing the path. Now, we have created an iView in Portal for this t-code. However, F4 is not working from Portal, rather giving an error 'Please wait. You will be forwarded automatically. This page had to be included for technical reasons.'.
    We need to upload excel file even from Portal too. Can somebody please give me some inputs or suggestions?

    Hi Jigar,
    Now I am able to get into SAP screen. However it's not opening the t-code that I mentioned. I gave some Z t-code ZTEST. Once I check the iView, it is showing SAP screen with the below things:
    Service Type:
    Service ID:
    TCode: ZTEST
    Object Type:
    Key:
    Field 1:
    Val. 1:
    Field 2:
    Val.2:
    Field 3:
    Val 3:
    And at the bottom it's giivng a warning message:
    Object type or object does not exist
    Message no. 1W001
    In iView properties I can see Object Type as com.sapportals.portal.iview. Is this the same Object Type that the message is talkign about? Can you please help me out?

  • Upload excel file in SAP BI-7.0

    Hi ,
    i  need to  upload an excel  file in SAP BI 7.0 where the standard r/3 fm are not available.
    Currently we uploading a file in CSV format but now we want to upload using XLS also.
    ia way to upload excel  file in SAP BI 7.0
    Best Regards,
    Sharad
    Edited by: sharad narayan on Jan 7, 2011 10:58 AM
    while searching the forum i  found the fm MS_EXCEL_OLE_STANDARD_DAT .
    but while using this FM i  am getting the exception file not exist.
    Kindlu  suggest what  to  do
    i  even tried the FM TMP_GUI_GET_FILE_EXIST' to  check  the existence of the file.
    even then same problem.
    Please suggest
    Edited by: sharad narayan on Jan 10, 2011 2:51 PM

    Hi,
    Scheduled jobs are the jobs for which we have scheduled for a time, may be daily so that each day the scheduled jobs will trigger at the time given.So that every time u need not to trigger the job manully urself as the schedule time will hit the job will trigger itself.
    Released job means the job which is in between Sheduled state and active state.say For eg: 10 jobs are Scheduled in a queue Job no 1 is released from the queue that means any moment it will be in active state.So it is the state between Schedule and Active state of a job.
    Thanks
    Varun

  • Uploading Excel file to SAP

    Hi Friends,
    Iam trying to Upload Excel file into SAP using the FM
    ALSM_EXCEL_TO_INTERNAL_TABLE. But it is going to dump n the error is                                                                             
    The call to the function module "ALSM_EXCEL_TO_INTERNAL_TABLE" is incorrect:                                                                               
    In the function module interface, you can specify only                          
    fields of a specific type and length under "INTERN".                            
    Although the currently specified field                                          
    "ITAB" is the correct type, its length is incorrect.                            
    I have attached the code also.
    Please let me know where iam getting the error.
    Code :
    Tables : mara,
             ztable.
    parameters : p_infile like rlgrap-filename.
    data : begin of itab occurs 0,
           matnr like mara-matnr,
           mbrsh like mara-mbrsh,
           matkl like mara-matkl,
           end of itab.
           CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
               FILENAME                      = p_infile
               I_BEGIN_COL                   = 1
               I_BEGIN_ROW                   = 1
               I_END_COL                     = 100
               I_END_ROW                     = 100
             TABLES
               INTERN                        = itab
           EXCEPTIONS
             INCONSISTENT_PARAMETERS       = 1
             UPLOAD_OLE                    = 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.
           ENDIF.
    sort itab by matnr.
    loop at itab.
    write:/ itab.
    *modify ztable from table itab.
    endloop.

    hi check this code:
    DATA : BEGIN OF TYP_INPUT ,
               MATNR LIKE MARA-MATNR,
               WERKS LIKE MARC-WERKS,
               LGORT LIKE MARD-LGORT,
               LGNUM LIKE MLGN-LGNUM,
               LGTYP LIKE MLGT-LGTYP,
               LTKZA LIKE MLGN-LTKZA,
               LTKZE LIKE MLGN-LTKZE,
               LGBKZ LIKE MLGN-LGBKZ,
               LGPLA LIKE MLGT-LGPLA,
            END OF TYP_INPUT.
    *Input File Data
    DATA : IT_FILE LIKE TYP_INPUT OCCURS 0 WITH HEADER LINE.
    *"INTERNAL TAB TO TAKE EXCEL SHEET.
    DATA : IT_EXCEL    LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
           CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
            EXPORTING
                 FILENAME                = P_PFILE
                 I_BEGIN_COL             = 1
                 I_BEGIN_ROW             = 2
                 I_END_COL               = 9
                 I_END_ROW               = 6000
            TABLES
                 INTERN                  = IT_EXCEL
            EXCEPTIONS
                 INCONSISTENT_PARAMETERS = 1
                 UPLOAD_OLE              = 2
                 OTHERS                  = 3.
    * IT_EXCEL CONTAINS DATA IN THE FORM OF ROW, COL, VALUE       *
    * CONVERTING THAT INTERNAL TABLE TO FORMAT THAT OF EXCEL SHEET *
       IF NOT IT_EXCEL[] IS INITIAL.
         SORT IT_EXCEL BY ROW COL.
         LOOP AT IT_EXCEL.
           CASE IT_EXCEL-COL.
            WHEN 1.
                  IT_FILE-MATNR = IT_EXCEL-VALUE.
            WHEN 2.
                  IT_FILE-WERKS = IT_EXCEL-VALUE.
            WHEN 3.
                  IT_FILE-LGORT = IT_EXCEL-VALUE.
            WHEN 4.
                  IT_FILE-LGNUM = IT_EXCEL-VALUE.
            WHEN 5.
                  IT_FILE-LGTYP = IT_EXCEL-VALUE.
            WHEN 6.
                  IT_FILE-LTKZA = IT_EXCEL-VALUE.
            WHEN 7.
                  IT_FILE-LTKZE = IT_EXCEL-VALUE.
            WHEN 8.
                  IT_FILE-LGBKZ = IT_EXCEL-VALUE.
            WHEN 9.
                  IT_FILE-LGPLA = IT_EXCEL-VALUE.
           ENDCASE.
           AT END OF ROW.
             APPEND IT_FILE.
             CLEAR IT_FILE.
           ENDAT.
         ENDLOOP.
       ELSE.
         MESSAGE I000  WITH 'The input file is empty'.
         STOP.
       ENDIF.

Maybe you are looking for

  • Music not showing up on ipod, but memory is used up

    i have a 4G nano, and when i plug it into itunes it shows that there isn't any music on my ipod, but it reads that all the memory is used up. do i need to reset or restore to original settings?

  • Will Iphone 5s be compatible with Honda Accord HFL texting feature?

    The previous iphones does not support the Text/email function of Handa Accord 2013. Will the new update with iOs7 fix this issue?

  • Changing OTR texts

    I need to change some texts in a standard Web Dynpro. I think the easiest way is to change them in the OTR, but after changing them they continue to appear as before. What do I have to do for the changes to appear? I've noticed that when editing the

  • How do you share music between iphones that have same itunes account

    I'm trying to share the songs from my husbands iphone that he has downloaded from itunes.  We have the same itunes account.  Why do I have to pay for the same song he downloaded that I've already paid for?

  • Microfono USB non viene letto sulla ps3.

    Salve ragazzi,come avete letto dal titolo ho un problema con un microfono con cuffie su ps3. Non viene letto,ho provato a cambiarle però non vengono lette ugualmente. Ho letto che nel 2010 con l aggiornamento 3,5 non venivano letti prodotti USB non c