11-24-2010 2:07 PM
Hi expert,
i need your help.
when i use tcode SP01 and fetch the spool no which i want, then select the spool no, cilick menu Spool Request->Forward->Send using SAPOffice to send mail.
i can send the list as an attached file to external mailbox.
Now the problem is : the size of attached PDF file is too large, how to compress it? make it more smaller?
Thanks&Regards
Aiolos
Edited by: yang Aiolos on Nov 24, 2010 10:08 PM
11-24-2010 3:48 PM
hi,
Compress the files:
CALL METHOD cl_abap_gzip=>compress_binary
EXPORTING
raw_in = <uncompressed binary string>
IMPORTING
gzip_out = <compressed binary string>.
And the send of files by mail continues the same.
I don´t use SP01 so i don´t know if there is any exit or badi you can use..
Search for ABAP Class to gip and gunzip
or go here..
LINK: Class to gip and gunzip
11-24-2010 3:53 PM
hi J_Figueiredo ,
thanks for your reply, but i don't want to use the code to achieve this, i only want to know how to configurate this to compress the PDF file.
or can anyone let me know how to make the file smaller in spool, i think maybe that will be working also.
Thanks.
11-25-2010 5:49 AM
Hi Aiolos,
If your concern is with the size of the pdf file being sent in a mail, do refer to the below wiki.
[http://wiki.sdn.sap.com/wiki/display/ABAP/CL_ABAP_ZIPusage-ZippingABAPreportoutput]
Regards
Raj
11-25-2010 6:21 AM
Hi,
After Converting list to Pdf try the below code.
DATA : GD_BUFFER TYPE STRING.
LOOP AT IT_PDF_OUTPUT.
TRANSLATE IT_PDF_OUTPUT USING ' ~'.
CONCATENATE GD_BUFFER IT_PDF_OUTPUT INTO GD_BUFFER.
ENDLOOP.
TRANSLATE GD_BUFFER USING '~ '.
DO.
IT_MESS_ATT = GD_BUFFER.
APPEND IT_MESS_ATT.
SHIFT GD_BUFFER LEFT BY 255 PLACES.
IF GD_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Then mail it. <removed by moderator>
Edited by: Thomas Zloch on Nov 25, 2010 10:21 AM - please do not ask for ...