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: 

output to be converted into PDF format

Former Member
0 Kudos

Hi,

I have a "select-options" defined for Purchase order number to which SAP Script is attached. The output can be seen in SAP Script. The requirement is to have the DIALOG BOX supressed that asks for the Print Preview option and the output that was initially generated in SAP Script should now be downloaded as PDF format.

Kinldy explain the steps to attain this feature.

Thanks & Regards,

Rajesh

4 REPLIES 4

Former Member
0 Kudos

Hi,

Refer this link:

SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.

Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.

It look exactly like what you see during a spool display.

Please note that it is not restricted to sapsciprts spool only. Any reports in the spool can be converted using the program 'RSTXPDFT4'

Refer this thread:

Regards,

Gayathri

former_member191062
Active Contributor
0 Kudos

Dear Rajesh,

There is a function module: 'CONVERT_OTF' wich can convert OTF (SAPScript) documents to PDF. You simply need to call this FM, like:


CALL FUNCTION  'CONVERT_OTF'
       EXPORTING  FORMAT                = 'PDF'
                  MAX_LINEWIDTH         = 134
       IMPORTING  BIN_FILESIZE          = LEN_OUT
       TABLES     OTF                   = myOTF
                  LINES                 = myPDF
       EXCEPTIONS ERR_MAX_LINEWIDTH     = 1
                  ERR_FORMAT            = 2
                  ERR_CONV_NOT_POSSIBLE = 3
                  OTHERS                = 4.
  IF SY-SUBRC <> 0.
* do some error handling
  ENDIF.

>> In the myPDF you will have the PDF file.

I hope it helps.

Regards,

Dezso

Former Member
0 Kudos

Hi

Try this out ,i hope this will help you to solve your problem.

CONVERT_OTF Convert SAP documents (SAPScript) to other types.

Example:

CALL FUNCTION "CONVERT_OTF"

EXPORTING FORMAT = "PDF"

IMPORTING BIN_FILESIZE = FILE_LEN

TABLES OTF = OTFDATA

LINES = PDFDATA

EXCEPTIONS ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

OTHERS = 4.

Thanks

Mrutyunjaya Tripathy

Former Member
0 Kudos

Hi rajesh,

1. one way is this, which is simple.

2. Install Acrobat software (acrobat writer)

on the local computer.

3. then when we take printout,

(either in sap, or ms word, notepad etc)

4. In the list of printer,

there will be on more

'Acrobat PDF Writer'

5. If we select this,

then it will automatically ask for

file name

and then we can save the print preview

to a .pdf file on local computer.

6. This will help to take any printout

in windows , sap , etc.

to convert to pdf.

regards,

amit m.