Skip to Content
0
Former Member
Nov 19, 2008 at 07:32 AM

Error while file upload by FM "TEXT_CONVERT_XLS_TO_SAP"

2628 Views

HI all,

I need to upload an excel file to SAP system ,for the same i am using the FM TEXT_CONVERT_XLS_TO_SAP in following way.

TYPE-POOLS truxs.

DATA: lv_raw TYPE truxs_t_text_data.

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

EXPORTING

i_field_seperator = 'X' "is an .xls file

i_line_header = 'X' "has a header line

i_tab_raw_data = lv_raw

i_filename = v_file

TABLES

i_tab_converted_data = etd_itab

EXCEPTIONS

conversion_failed = 1

OTHERS = 2.

But i get sy-subrc = 1,which is conversion error.

The structure of the etd_itab is same as the excel file ,even the field names are same ,still i wonder why should the conversion error been encountered .

Am i missing on anything ?

Please comment.

Thanks,

Swati