Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

fm to upload data from excel

Former Member
0 Kudos

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

2 REPLIES 2

ferry_lianto
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.