Skip to Content
0
Former Member
Aug 09, 2007 at 07:40 AM

pdf attachment with SO_DOCUMENT_SEND_API1

868 Views

Hi Guys ,

I have a smartform from which i get the OTF . I convert the OTF to PDF using FM convert_otf.

If i send this file to spool and check it contents .. all is fine and the logo in the smartform appears fine as well .

Now my reqt is to send the PDF as attachment thru mail to user .

In the FM there is a logicwhere 132 long string is converted to 255

LOOP AT pt_payslip_pdf into wa_lines.

TRANSLATE wa_lines USING ' ~'.

CONCATENATE lf_buffer wa_lines INTO lf_buffer.

ENDLOOP.

TRANSLATE lf_buffer USING '~ '.

DO.

wa_attachment = lf_buffer.

APPEND wa_attachment to lt_attachment.

SHIFT lf_buffer LEFT BY 255 PLACES.

IF lf_buffer IS INITIAL.

EXIT.

ENDIF.

ENDDO.

now lt_attachment is sent as one of the parameters to

SO_DOCUMENT_SEND_API1

with wa_packing_list-doc_type = 'RAW'.

This works perfect in 46C . Now in ECC when i open the attachment in my mail .. I get a disfigured logo , sometimes i get 'error END of COLOR'.

If i remove logo everything is fine .. the contents of pdf is fine in attachment .

Could anyone help me in this regard as to what needs to be done to get logo and contents perfect as an attachment .

Thanks

Neelima