‎2009 Dec 29 2:37 PM
Hello,
I have an internal table whose data has to be sent via mail in an excel format as an attachment.
There is a restriction of 255 characters and I have a large number of columns.
Hence, I tried to look into the forums and understood that i will have to put all the data in a string, then further convert it into xstring, and then finally convert it into binary table.
I did this and i have achieved it as seen from the debugger.
But when i open the excel attachment which i have sent through the FM 'SO_NEW_DOCUMENT_SEND_API1', I get an empty excel sheet with a message that it does not support the format.
I hope we can solve this problem.
Thanks,
Rahul Gupta
‎2009 Dec 30 4:44 AM
Hello,
First Try to download the excel sheet at your desktop by this function module and see whether data is flowing into Excel sheet and then try to use the FM u used.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_bin_filesize
filename = v_filename
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = it_det .
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
Regards