cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert smart form into pdf with out save option

Former Member
0 Kudos

dear friends,

i having one report which should be display in pdf on execution with out display save option. i have smart from and converted it into pdf with out write code for save. but when i execute report it does not show any response. but as i write code for save the file it show the dialog box for saving file.

can anyone assist me for suppress the save option in dispaly pdf.

regards

sunil

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

splved

former_member585060
Active Contributor
0 Kudos

Hi,

In the FM which is used to print your Smartform, there will be an importing parameter job_output_info, in that there will be a OTFDATA structure. Assign that structure the below FM, it will directly disply PDF without saving.

Example.

CALL FUNCTION v_form_name
  EXPORTING
    control_parameters = w_ctrlop
    output_options     = w_compop
    user_settings      = 'X'
  IMPORTING
    job_output_info    = w_return    " this structure has OTFDATA
  EXCEPTIONS
    formatting_error   = 1
    internal_error     = 2
    send_error         = 3
    user_canceled      = 4
    OTHERS             = 5.

IF sy-subrc 0.
  MESSAGE ID sy-msgid TYPE sy-msgty
  NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

i_otf[] = w_return-otfdata[].

CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
  EXPORTING
    i_otf                          = w_return-otfdata
 EXCEPTIONS
   CONVERT_OTF_TO_PDF_ERROR       = 1
   CNTL_ERROR                     = 2
   OTHERS                         = 3
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Regards

Bala Krishna

Former Member
0 Kudos

thnx bala,

u r suggeest right. but when i execute the program , preview don't come in full screen bt come in half of the screen and i don't have option to maximize it. so how can i display the output in full screen. or full view of the pdf.

former_member585060
Active Contributor
0 Kudos

Hi,

The FM don't have option to Full view, what you can do is, you can maximize or decrease the view with the provided toolbar options.

Regards

Bala Krishna

Sandra_Rossi
Active Contributor
0 Kudos

You didn't give enough information about the context (frontend or application server? wat do you call?). Please tell us the function modules or methods you use.

Former Member
0 Kudos

Hi,

In the driver program u wud written code for getting the path name to save the pdf right , instead of that remove that coding and better u can hard code the path for saving the pdf file in your required destination path. if u hav any queries reply back .

regards,

P.Gurunath

Abhijit74
Active Contributor
0 Kudos

Hi,

You can skip the dialog option bu submit driver prgram with spool no and return it. It will not ask you to save.

Thanks ,

Abhijit