Application Development and Automation 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: 
Read only

Need Help

Former Member
0 Likes
760

Hi All,

Which function module is used to convert the word (.doc/.txt) file to pdf format?

Thanks,

Pavan.

5 REPLIES 5
Read only

Former Member
0 Likes
738

HI

THE FUNCTION MODULE CONVERT_ABAPSPOOLJOB_2_PDF

CAN BE USED TO GET OUTPUT IN PDF FORMAT.

THE FOLLOWING LINK GIVES THE SAMPLE CODING

<a href="http://abap4.tripod.com/Save_Report_Output_to_a_PDF_File.html">http://abap4.tripod.com/Save_Report_Output_to_a_PDF_File.html</a>

IF IT WORKS PLEASE REWARD POINTS

REGARDS

ANOOP

Message was edited by: ANOOP R.S

Read only

Former Member
0 Likes
738

Hi pavan,

There is no direct function module for it.

you first convert RTF(.doc) data to OTF format using

<b>CONVERT_RTF_TO_ITF</b> and then you will get the script format from rtf data . now generate the spool using the script data, now convert the spool to PDF using <b>CONVERT_OTFSPOOLJOB_2_PDF</b>

Regards

vijay

Read only

Former Member
0 Likes
738

HI,

My requirement is I am sending a .doc file to external internal mail id i.e xyz@hotmail.com as attachment then while downloading the file the .doc file as to be converted to pdf file.

PLease help me out.

Thanks,

Pavan.

Read only

0 Likes
738

Hi pavan,

1. Converting .doc, .xls file etc

to pdf format!

2. Well, there is no function in abap

which can do so.

(Bcos this CONVERTER is provided by

ADOBE itself and is the functionality

of adbobe)

3. So we cannot do this in sap directly.

4. However,

SAP provides a little facility, ie.

using SCOT settings,

we can

do that

ALV / LIST -


> PDF

Sapscript layout -


> PDF

This is automaticallly done

by the scot settings.

5. When we pass RAW Data of

a file which is uploaded,

SCOT cannot convert it into pdf.

If u try this,

u will get blank file.

regards,

amit m.

Read only

vinod_gunaware2
Active Contributor
0 Likes
738

call function 'CONVERT_OTF'

exporting

format = 'PDF'

importing

bin_filesize = no_lines

tables

otf = otf_lines

lines = pdf_lines.

call function 'DOWNLOAD'

exporting

bin_filesize = no_lines

filename = 'c:test.pdf'

filetype = 'BIN'

importing

act_filename = afilename

tables

data_tab = pdf_lines.