03-26-2015 6:46 AM
Hi.
Please help me.
Business Requirement : Run ALV report in Background Daily Schedule and Send Mail with Excel Attachment.
Problem : We are Convert Internal Table to EXCEL formate through SOLISTI1 structure type but problem is WIDTH is max. 255
so some data of last 3 column are not appearer in Email Attachment.
Please help me urgent.
Pradip Patel.
03-26-2015 7:58 AM
Hi Pradip,
The maximum character is 255, in order to use beyond that we can do it by using Contents_hex attribute in FM SO_NEW_DOCUMENT_ATT_SEND_API1.
Please find the link below.
To send a mail attachment with more than 255 characters in a line - Code Gallery - SCN Wiki
But i recommend to use CL_BCS method for email.
Send email from ABAP with class CL_BCS - Code Gallery - SCN Wiki
Sending attachment using cl_bcs classes - Code Gallery - SCN Wiki
Regards
Rajkumar Narasimman.
03-26-2015 8:22 AM
Hello Rajkumar Narasimman.
Thanks for reply.
My Code like below.
DATA : IATTACH TYPE STANDARD TABLE OF SOLISTI1 WITH HEADER LINE,
CONCATENATE header 1 to header 38 into IATTACH SEPARATED BY CON_TAB.
APPEND IATTACH.
same data of internal table.
loop at it in wa
data collect at ohter internal table.IDOWN
endloop.
loop IDOWN into WDOWN.
CONCATENATE wdown-row1 to wdown-row38 into IATTACH SEPARATED BY CON_TAB.
append IATTACH.
endloop.
I send email with attachment of IATTACH file in EXCEL format.
Please help me.
Pradip Patel.
03-26-2015 10:05 AM
Hi Pradip,
Here you are using SOLISTI1 structure, that is the reason the value truncated to 255 characters.
Instead of that use Binary concept.
Please find the link below.
To send a mail attachment with more than 255 characters in a line - Code Gallery - SCN Wiki
Regards
Rajkumar Narasimman