top of page

SAP ABAP - Read long char of string from excel

Updated: Aug 29, 2022




TYPE-POOLS: TRUXS. 


START-OF-SELECTION. 


DATA: BEGIN OF i_file_data OCCURS 0, 
col1 TYPE string, 
col2 TYPE string, 
END OF i_file_data. 


DATA: wa_file_data like line of i_file_data. 


DATA: i_raw TYPE TRUXS_T_TEXT_DATA. 


CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP' 
EXPORTING 
i_field_seperator = 'X' 
i_line_header = space 
i_tab_raw_data = i_raw 
i_filename = 'c:\temp\1.xls' 
TABLES 
i_tab_converted_data = i_file_data[] 
EXCEPTIONS 
conversion_failed = 1 
OTHERS = 2. 


LOOP AT i_file_data into wa_file_data. 
 write: / wa_file_data-col1, wa_file_data-col2. 
ENDLOOP. 

 


22 views0 comments

Recent Posts

See All
Post: Blog2_Post
bottom of page