Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CRM ABAP How to upload an Excel file into an internal table?

How to upload an Excel file using GUI_UPLOAD?? what should be the values of the parameters? The function modules ALSM_EXCEL_TO_INTERNAL_TABLE and KCD_EXCEL_OLE_TO_INT are not present in CRM. Please suggest me a way out!

Tags:
Former Member
Former Member replied

Hi Saurabh,

You can use TEXT_CONVERT_XLS_TO_SAP FM to upload an excel file. I am also attaching sample code for ur reference.

data: begin of itab occurs 0,

matnr type mara-matnr,

end of itab.

data: dummy type TRUXS_T_TEXT_DATA.

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

EXPORTING

i_tab_raw_data = dummy

i_filename = 'D:\matnr.xls'

tables

i_tab_converted_data = itab

Alternatively you can use GUI_UPLOAD.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = 'D:\matnr'

filetype = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = itab

Please award points if you find it useful.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question