‎2009 Feb 27 5:18 AM
Hi abapers,
I have used text_convert_xls_to_sap to convert xls but the problem is header data should be skipped.
please guide me in this case.
Regards
ABAPER
‎2009 Feb 27 5:20 AM
‎2009 Feb 27 5:23 AM
Hi,
when i pass line_header as 'X' it is saying that receiving is of type N but the excel files fields receiving type is different.
‎2009 Feb 27 5:21 AM
Hi,
When the internal table is populated from the excel file, then the very first line must be containing the header data.
So use code:-
DELETE itab index 1.
Hope this helps you.
Regards,
Tarun
‎2009 Feb 27 5:32 AM
‎2009 Feb 27 5:34 AM
Hi Janasi,
Please find the below code.
BEGIN OF t_excel,
****your fields***
END OF t_excel.
DATA: it_excel TYPE TABLE OF t_excel,
i_raw TYPE truxs_t_text_data,
wa_excel TYPE t_excel.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_tab_raw_data = i_raw
i_filename = p_fname
TABLES
i_tab_converted_data = it_excel.
IF sy-subrc <> 0.
****error message
ENDIF.
DELETE it_excel INDEX 1.
IF it_excel IS INITIAL.
MESSAGE i000(0k) WITH 'No Data in Excel File'.
ENDIF.
Regards,
Anil