cancel
Showing results for 
Search instead for 
Did you mean: 

From SAPScript 'Print Preview' can i down load o/p to Desktop in PDF format

Former Member
0 Kudos

Hi All,

I have generated SAP Script output.

I am viewing the same through 'Print Preview'.

Now i want to download this output to my desktop in PDF format.

How can i achieve this!

Thanks in advance.

Thanks,

Deep.

Accepted Solutions (1)

Accepted Solutions (1)

former_member194416
Contributor
0 Kudos

There is no default option to make it. You can write your own code if you need PDF output. Search forum with sapscript PDF conversion there are many examples about it.

Former Member
0 Kudos

Hi,

I have already generated PDF sent as mail attachment to vendor.

But client wants to store it in local desktop from 'Print Preview' as PDF.

Thanks,

Deep.

former_member194416
Contributor
0 Kudos

It maybe difficult to do it in Print Preview maybe you can ask it with a popup screen. Using gui_download you can download the PDF after script processed.

Edited by: Gungor Ozcelebi on Jul 2, 2009 10:59 AM

Former Member
0 Kudos

Hi,

after u get the OTF data, Use the below FM to get the print priview in PDF format and can be saved from print preview screen.

DATA : otf_data TYPE itcoo OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'

EXPORTING

i_otf = otf_data1[]

EXCEPTIONS

acrobat_not_registered = 1

convert_otf_to_pdf_error = 2

download_error = 3

acrobat_not_started = 4

cntl_error = 5

OTHERS = 6.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

also, it is important to pass 'GETOTF (it_itcpo-tdgetotf = 'X'.)' in OPEN_FORM to get OTF data..

Rgds,

Pavan

Former Member
0 Kudos

Hi Vishnu,

Thank you very much for your inputs on the aboev issue!

Now i am able to view 'Print Preview' in PDF format.

But it is not coming to full screen like traditional 'Print Preview'.

Can we make it to full screen so that it can look like traditional 'Print Preview' and user can save it locally.

Once again many thanks for your resolution.

Thanks,

Deep.

Former Member
0 Kudos

Hi,

I am not sure whether we can acheive it in fullscreen or not...but i can give you some suggestion to acheive it...

1. goto se37, display the FM provided, inside U see another FM 'CONVERT_OTF' and CALL SCREEN 0300 statement.

2. U copy the FM 'SSFCOMP_PDF_PREVIEW' to another 'ZXXXXX' FM.

3. now u double click on call screen, and goto Attributes and change the screen type to 'NORMAL', actually it will be in 'Modal Dialog Box'.

I guess, since the screen type of this is 'Dialog Box' it is coming like that. if u change it to 'Normal' type u may get it in full size.

also remove the 'starting at 1 1' from the 'call screen 0300 starting at 1 1. it should be only 'call screen 0300.'

after changing & testing, please let me know its working or not.

Hope it works!!

Rgds,

Pavan

Answers (1)

Answers (1)

former_member998879
Participant
0 Kudos

Hi Deep ,

there is another way to save a pritn in pdf format:

download and install PDF creator from: http://www.pdfforge.org/products/pdfcreator

It install into your PC a virtual printer that create PDF file if select for printing

Is well to set this PDFcreator as default printer.

So you have just to Print Preview of sapscript (or other print) selecting the local printer of the sap system; this call the

PDFcreator set as PC local printer.

Regards,

Davide