Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Script layout PDF attachment mail error

Former Member
0 Kudos

Hi Experts,

When I triend sending theScript layout PDF as attachment in teh mail,I can see th attachment in in box but attahcment is not opening and giving an error saying 'File damaged and Cannot be opened'.

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

  • MAX_LINEWIDTH = 132

IMPORTING

bin_filesize = doc_size

TABLES

otf = hotfdata

lines = htline

EXCEPTIONS

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

OTHERS = 4.

Thanks ,

Basheer

1 REPLY 1

Former Member
0 Kudos

Hi Ahmed,

use the CL_BCS class to send mail , it will work.

Still facing problem, refere below links

/people/gaurav.parmar2/blog/2008/02/13/issue-smart-form-output-to-email-as-pdf-attachment

https://wiki.sdn.sap.com/wiki/display/Snippets/mailsendthroughoutputcontrols

Regards,

Amarnath S.