Excel or Any type of file upload in WebDynpro ABAP
Hi All,
I need to upload two files in my requirement, where one file is always going to be an excel sheet and another file could be of any type of file.
I am using below code for cracking the same but it is not behaving the expected way. It is working fine for TXT, CSV and PDF file but not for XLS files.
DATA: lc_file TYPE string.
get element via lead selection
lo_el_context = wd_context->get_element( ).
get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `FILE_CONTENT`
IMPORTING
value = lv_file_content ).
CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
EXPORTING
im_xstring = lv_file_content
im_encoding = 'UTF-8'
IMPORTING
ex_string = lc_file.
I would appreciate if any one could suggest me some other way to achieve the desired functionality.
Regds,
Ashish