07-03-2007 3:28 PM
hi all
what are the various methods by which we can upload the data from spreadsheet to an internal table (both function modules and classes)
regards
navjot
07-03-2007 3:33 PM
Hi,
You can use the following FM.
ALSM_EXCEL_TO_INTERNAL_TABLE
TEXT_CONVERT_XLS_TO_SAP
KCD_EXCEL_OLE_TO_INT_CONVERT
Also check these links for sample codes.
http://www.sapdevelopment.co.uk/file/file_upexcelalt2.htm
http://www.sapdevelopment.co.uk/file/file_upexcel.htm
http://www.sapdevelopment.co.uk/file/file_upexcelalt1.htm
Regards,
Ferry Lianto
07-03-2007 3:33 PM
Hi,
The function module is:
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_fname2
i_begin_col = g_f_start_col
i_begin_row = g_f_start_row
i_end_col = g_f_end_col
i_end_row = g_f_end_row
TABLES
intern = g_t_intern
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.
ENDIF.