‎2007 Jun 07 9:41 AM
Hi, I'm pulling an excel file from the application server and then attaching the file to the method "attach_file_to_response". However, when I view the file in excel I have an unwanted column. Can anyone tell me how to fix this, or even if there is another way of doing this.
I have inserted my code below and thanks in advance.
***CODE***
open dataset lv_dataset for input in text mode encoding default.
do.
read dataset lv_dataset into wa.
if sy-subrc ne 0.
exit.
endif.
concatenate: lv_string_s
wa
cl_abap_char_utilities=>cr_lf into lv_string_s
separated by cl_abap_char_utilities=>horizontal_tab.
enddo.
close dataset lv_dataset.
cl_abap_conv_out_ce=>create( receiving conv = lr_conv ).
lr_conv->convert( exporting data = lv_string_s
importing buffer = lv_xfile ).
cl_wd_runtime_services=>attach_file_to_response(
exporting i_filename = i_filename
i_content = lv_xfile
i_mime_type = 'application/vnd.ms-excel' ).
‎2007 Jun 07 9:45 AM
hi,
try this one
data: xl_content type xstring .
DATA: binary_content TYPE solix_tab.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = xl_content
TABLES
binary_tab = binary_content.
regards
‎2007 Jun 07 9:59 AM
Hi,
Try function module 'HR_KR_STRING_TO_XSTRING'.
Thanks and regards,
S. Chandra Mouli.