07-10-2014 7:54 PM
Hi Experts,
How can we send .XLSX file from ABAP.
I have done as suggested in note 1459896 but it's not working.
I have added the header table with such value
concatenate '&SO_FILENAME=' lv_filename into lv_text_line.
append lv_text_line to lt_att_head.
passing header table to
lo_document->add_attachment( exporting i_attachment_type = 'XLS'
i_attachment_subject = 'AttachmentFilename'
i_attachment_size = lv_size
i_attachment_header = lt_att_head
i_att_content_hex = binary_content ).
but when I try to open it in SOST it says," file format or extension is not valid " .
Do you think if I send thsi mail to outlook it will work. ?
Thanks
Willi
07-10-2014 8:12 PM
Hi Willi,
I had same problem... The solution was work with extension ".XLS", because the structure that keep the extension only support 3 positions. For example.... If the extension is XLSX, so cut to XLS, this is the reason for the message "file format or extension is not valid"
Regards,
07-10-2014 8:24 PM
But SAP note says 1459896 , it can be done
using
filename = 'attachment.xlsx'
concatenate '&SO_FILENAME=' lv_filename into lv_text_line.
append lv_text_line to lt_att_head.
but still not working.
07-10-2014 10:54 PM
Willi,
Check the parameter "I_TYPE" of method CREATE_DOCUMENT and parameter "I_ATTACHMENT_TYPE" of method ADD_ATTACHMENT. Both receive char3. I think, this is the problem! because if you try to send file with XLSX extension, the send process will truncate to XLS.
Regards,
07-10-2014 11:11 PM
Hi All,
Please check note 1459896 before replying it says it is possible.
Its well known that it takes three character type only but we need to send .XLSX that is the requirement.
Please see if anyone has able to send XLSX file through ABAP programs.
Thanks
12-14-2015 11:32 AM
Hi Robert,
Please tell me whether your query is resolved or not. Iam also facing the similar problem. I also implemented the SAP Note. But in SOST, it is showing in XLS format. When I send mail, It is in XLSX format, but file is not opening properly.
Thanks,
Suresh