cancel
Showing results for 
Search instead for 
Did you mean: 

Provide option to save the file to the local PC in the print preview

Former Member
0 Kudos

Hi all,

I am printing forms from standard output types. How do i provide an option to to the user to save th print preview as a PDF ??

Accepted Solutions (1)

Accepted Solutions (1)

former_member188685
Active Contributor
0 Kudos

>

> Hi all,

>

> I am printing forms from standard output types. How do i provide an option to to the user to save th print preview as a PDF ??

you want the option in the standard transaction ?

exactly what you want can you clarify.

Former Member
0 Kudos

Hi,,

The requirement is like this...

The user should have an option to save the printpreview in PDF,.Is there any option where the user an save the form in PDF into the local file in pdf format. I am using SAP Script.

These forms are from standard transactions ( output types..)

former_member188685
Active Contributor
0 Kudos

in the preview there is no such option to save. But for Adobe forms there is an option to save as the local file to PDF format.

instead of preview you have to go with some other option.

Former Member
0 Kudos

What exactly i sadobe forms,.. u mean the preview itself will be in adobe format,.. how do i do this,.can you please tell me,.. i am using SAP script

former_member188685
Active Contributor
0 Kudos

Adobe forms by default will give you pdf output. there is a provision to save the output also.

Adobe forms are Advanced version of Print forms.

Scripts=>Smartforms=>Adobeforms

And this is available from ECC5.0 onwards. But This needs lot of configuration(ADS - Adobe Document Services needs to be configured)

Adobe forms are almost similar to smartforms, But here there are two types in ADOBE forms one is Printforms and second Interactive form.

Like smartforms Adobeforms also generate the Function module, using that we call in our program to tigger the formoutput.

Transaction code to design the forms is SFP

If you are familiar with smartforms then it will be simple to understnad the process.

here is the link which give more information about Adobe forms.

https://www.sdn.sap.com/irj/sdn/adobe

former_member188685
Active Contributor
0 Kudos

if you are writing a stnadalone program and want to have the save option in the preview then you can use the function SSFCOMP_PDF_PREVIEW

for this you need to pass the OTF data, which you get it from the CLOSE_FORM function module.

this show the preview in PDF format and you have save button also available there.

Former Member
0 Kudos

Hi,..

Wher do i call this unction module, Is it after close form. And from where do i get the OTF data ?..

former_member188685
Active Contributor
0 Kudos
function close_form.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  EXPORTING
*"     VALUE(RESULT) LIKE  ITCPP STRUCTURE  ITCPP
*"     VALUE(RDI_RESULT) LIKE  RDIRESULT STRUCTURE  RDIRESULT
*"  TABLES
*"      OTFDATA STRUCTURE  ITCOO OPTIONAL


data: otf_table type standard table of ITCOO.
CALL FUNCTION 'CLOSE_FORM'
       IMPORTING
            RESULT = RESULTS
      TABLES
           OTFDATA = otf_table.  "<------this is the otf data of the script form

Former Member
0 Kudos

Hi,..

How will make the email fuctionalty work.. because if the output type defined is for Externak send, the problem is the preview will be in pdf,.. so how do i send it to email keeping this pdf functionality ...

former_member188685
Active Contributor
0 Kudos

are you using custom program in the output type to send the mail. you can send the pdf document as eamil attachement.

if you attached a custom program to the output type then...

using the otfdata get the PDF format . For this you need the function CONVERT_OTF and get the pdf data , using this you can send it.

Former Member
0 Kudos

I jaust copied the actual pgm into a zprogram and implemented the pdf functionality. Now, will the close_form work for email output type

former_member188685
Active Contributor
0 Kudos

So in your program you are using the OPEN_FORM, WRITE_FORM , and CLOSE_FORM.

If so then close form definitely gives you the OTF data.

Answers (1)

Answers (1)

Former Member
0 Kudos

Mail functionality not working...