cancel
Showing results for 
Search instead for 
Did you mean: 

pdf file open error in invoice script

former_member450736
Active Participant
0 Kudos

hi

i have a script which send email to the use when we issue output. it was working fine earlier but recently a patch EPH4 has been done and now we are not able to open the pdf file.

email is triggered with pdf attachment and when we try to open the file its giving the error message "there was an error opening the document .the file is damaged and couldnt not be repaired".

need some inputs to solve this issue.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Aidan,

I've the same problem and your solution Works perfectly!!! Thank you very much!.

Emilio.

PD: BCS_EXAMPLE_8 Rules man!!!!

aidan_black
Active Contributor
0 Kudos

hi,

In your application, I guess you call the function module CONVERT_OTFand do not use the BIN_FILE parameter? There can be problems with this.

Please see the following SAP notes about this problem:

1320163 - Incorrect PDF data after Unicode conversion

1324547 - Sending a spool request as PDF via e-mail

As a solution, please use the parameter BIN_FILE when calling CONVERT_OTF so the PDF data is returned as type XSTRING and then use code like in the example program BCS_EXAMPLE_8 to handle the PDF data returned.

Regards,

Aidan