cancel
Showing results for 
Search instead for 
Did you mean: 

Not converting Sapscript to PDF format

Former Member
0 Kudos

Hi all,

My requirment is that i want to convert SAPScript into PDF and send the mail to the user, for that I have used the function module CONVERT_OTF and I had declared all the data declarationfor that .for sending the mail I have used the FM SO_NEW_DOCUMENT_ATT_SEND_API1. As it is sending the mail as PDF successfully but SAPScript is not converting into PDF file. when we open the attached PDF file in the mail is showing the message Format not Supported.

Moderator Message: As you can see, some of the answers psoted here, were copy-pasted from elsewhere. Meaning, it is easily searchable.

Edited by: kishan P on Nov 22, 2010 6:40 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

aidan_black
Active Contributor
0 Kudos

Hi,

I guess you do not use the BIN_FILE parameter when calling CONVERT_OTF so therefore the PDF data is returned via table LINES. There can be problems with this in a Unicode system.

e.g. TRANSLATE commands can destroy the PDF data when it is returned this way.

Use parameter BIN_FILE when calling CONVERT_OTF so the PDF data is returned as type XSTRING and use the the example BCS_EXAMPLE_8, which is contained in SAP Note #1324547 to handle the PDF data returned.

Regards,

Aidan

Former Member
0 Kudos

Hi,

try with 'CONVERT_OTF_2_PDF' function module.

Regards,

karthikeyan . k s

Former Member
0 Kudos

I had tried for that function module but it is giving error OTF data missing ,and another thing is that it is converting into PDF file by using both function module i.e. 'CONVERT_OTF_2_PDF' and 'CONVERT_OTF' when I load to local system but when I am sending as email attachment it is showing the error 'format not supported' whole opening the attachment.

Former Member
0 Kudos

<<copy-paste from http://wiki.sdn.sap.com/wiki/display/Snippets/mailsendthroughoutputcontrols removed by moderator>>

Edited by: kishan P on Nov 22, 2010 5:47 PM

Former Member
0 Kudos

First of all thanks for suggetion. and I am using SAPScript not smartform, and it is showing the error while opening the attachment file as 'FILE DAMENGED AND COULD NOT BE REPAIRED' I had simillar code whatever post please help.

Thanks

Rsatalkar/

Former Member
0 Kudos

<<Editing a Moderator's comments and replacing your copy-pasted code with other code is a bad idea. Your ID has already been submitted for deletion.>>

Edited by: kishan P on Nov 22, 2010 5:54 PM

Edited by: karthikeyanks on Nov 22, 2010 1:36 PM

Edited by: kishan P on Nov 22, 2010 6:37 PM