Hi All,
A requirement is to download the contents of internal table to excel.
CALL FUNCTION 'SOTR_SERV_TABLE_TO_STRING'
IMPORTING
text = l_text
TABLES
text_tab = lt_tab.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = l_text
IMPORTING
buffer = lv_xstring_data
EXCEPTIONS
failed = 1
OTHERS = 2.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'Excel.xls'
i_content = lv_xstring_data
i_mime_type = 'EXCEL'.
The problem is the internal table contains a field with numeric value. Say my internal table has a value of 1.00, when this is downloaded, the values is becoming 1. The decimal fields are removed.
Any idea on how this should be handled?
Thanks,
Louisse