Skip to Content
0
Dec 02, 2008 at 04:56 AM

Smartform image to pdf email attachment

242 Views

I designed the PO layout using smarform and it is convertted into pdf format. using convert oft function module.

The Layout contains details of purchase order and an image at the top right corner .

When i receive the pdf file in the email as an attachment , ( smartform converted into pdf ) , the image is not all appearing, but it can be viewed in the smartform print preview.

This is my internal table . Please find below the piece of code used for my dev...

loop at it_pdf_tab into wa_pdf_tab.

translate wa_pdf_tab using ' ~'.

concatenate lw_buffer wa_pdf_tab into lw_buffer.

endloop.

Translate lw_buffer using '~ '.

Do.

wa_mess_att = lw_buffer.

append wa_mess_att to it_mess_att.

shift lw_buffer left by 255 places.

if lw_buffer is initial.

exit.

endif.

enddo.

it_mess_att is send to SO_NEW_DOCUMENT_ATT_SEND_API1 function module and i can recieve

as a pdf attachement.

Please suggest how do i get a correct image in the pdf attachement file when it converted from the smartform.. Kindly throw light on this.

Thanks