Archive

Posts Tagged ‘DOI’

Function module to upload Excel

September 13th, 2009 No comments

Below two function modules can be used to upload the excel data to an internal table.

ALSM_EXCEL_TO_INTERNAL_TABLE
TEXT_CONVERT_XLS_TO_SAP

Function module ALSM_EXCEL_TO_INTERNAL_TABLE has more control to the Excel file, but function module TEXT_CONVERT_XLS_TO_SAP is the easiest way to upload excel file to the internal table.

  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
      i_line_header              = 'X'
      i_tab_raw_data             = lt_raw
      i_filename                 = p_path
    TABLES
      i_tab_converted_data       = gt_output
    EXCEPTIONS
      conversion_failed          = 1
      OTHERS                     = 2.

Read more…