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: 

converting binary to pdf

Former Member
0 Kudos
11,432

Dear experts,

I am trying to retrieve archiving data using FM "archivobject_get_table" and converting it to pdf document using FM "SCMS_BINARY_TO_XSTRING".

I am getting the PDF document correct i.e. I am able to open when the toa02-reserve = 'PDF'.

But if toa02-reserve = 'OTF', I am getting  any error, PDF is getting generated and while I am trying to open the PDF, I am getting error

- PDF error

Please advise.

Thanks!

Kiran.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
3,548

Hi ,

Just to clarify you that,

  The CMS_BINARY_TO_XSTRING is used to convert the binary table data to  binary string, not to PDF.

  In your case, if the toa02-reserve = PDF, means that the archive file stored as PDF  and returned as

  binary, SO no conversion is required, if you want to display this in PDF.

If you find the setting toa02-reserve = OTF,

     then use the FM - CONVERT_OTF    or  CONVERT_OTF_2_PDF_ARCHIVELINK or

    CONVERT_OTF_2_PDF whichever is more easy as per your internal table structures/declarations.

similar to above, you may have to use relevant conversion modules from other file formats to PDF.

Hope this helps.

4 REPLIES 4

Former Member
0 Kudos
3,548

Hello,

please check this link

http://help.sap.com/saphelp_nw04/helpdata/en/09/b42e1a228211d5b687006094192fe3/content.htm

OTF is not to be used to generate PDF documents.

best regards,

swanand

Former Member
0 Kudos
3,549

Hi ,

Just to clarify you that,

  The CMS_BINARY_TO_XSTRING is used to convert the binary table data to  binary string, not to PDF.

  In your case, if the toa02-reserve = PDF, means that the archive file stored as PDF  and returned as

  binary, SO no conversion is required, if you want to display this in PDF.

If you find the setting toa02-reserve = OTF,

     then use the FM - CONVERT_OTF    or  CONVERT_OTF_2_PDF_ARCHIVELINK or

    CONVERT_OTF_2_PDF whichever is more easy as per your internal table structures/declarations.

similar to above, you may have to use relevant conversion modules from other file formats to PDF.

Hope this helps.

0 Kudos
3,548

Thanks a lot.

0 Kudos
3,548

Thank you very much