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: 

'Archive' and 'Print and Archive' button on print preview of smartform

Former Member
0 Kudos
1,452

Hi Experts,

I want to enable 'Archive' and 'Print and Archive' button on print preview of smartform.

Please suggest the way to do it.

Thanks and Regards,

Suman

13 REPLIES 13

Sijin_Chandran
Active Contributor
0 Kudos
379

Hi Suman ,

For Archive purpose you can provide with a button which will convert the output of the smartform as pdf or other related format and save it.

For later printing you can provide with an option to  divert the print request to a spool when the smartform is invoked.

0 Kudos
379

Hi Sijin,

Could you please describe how to add custom button on the same

0 Kudos
379

Hi Suman ,

Are you calling the smartform from a ZREPORT ?

If yes then  you can define a GUI STATUS there and add the buttons and there Command Status and eventually  code USER_COMMAND accordingly .

0 Kudos
379

It wouldnt help

0 Kudos
379

It wouldnt help

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Kudos
379

Hi

When you are filling up you print preview data in the program

Fill the Structure SSFPP-SSFARCOP-TDARMOD = '3'

Then you will get these two options enabled like this...

Hope This Helps...

0 Kudos
379

Hi Venkat,

After setting this value no print preview screen is showing 

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Kudos
379

Print Preview screen setting is a seperate population right

Do you have this in your program

form output_options using p_dialog     type ty_boolean

                          p_pr_buttons type ty_boolean.

here you just set ssfpp-TDARMOD = '3'

It is coming for me.. If not for you.. Can u pls tell me where u r populating this '3'..

0 Kudos
379

Hi,

I am passing the value from driver program to smartform interface -

Please check,

  data: gwa_settings   TYPE ssfcompop,

  gwa_settings-tdarmod = '3'.

   CALL FUNCTION lv_sfname

      EXPORTING
*       ARCHIVE_INDEX              =
*       ARCHIVE_INDEX_TAB          =
*       ARCHIVE_PARAMETERS         =
       control_parameters         = gwa_control
*       MAIL_APPL_OBJ              =
*       MAIL_RECIPIENT             =
*       MAIL_SENDER                =
       output_options             = gwa_settings

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Kudos
379

Are you passing anything to No Archiving TDNOARMCH. If not pass with No Changes.

Also SSFBUTOP-TDNOPREV = ' ' 

TDNOPRINT = ' '

TDNOARCH = ' '

These three are in a Include...

0 Kudos
379

hi,

But ouput is same no print preview screen.

0 Kudos
379

Hello glad to greet you,

I have the same problem to activate the buttons to file and print and file.

Initialize the following:

* --- Add parameters for printing * ------

   output_options-tdnoprev   = '' .

   output_options-tdnoprint  = ''.

   output_options-tdnoarch   = ''.

   output_options-tdarmod    = '3'.

   output_options-tddest     = pa_print. " Impresora

   output_options-tdnewid    = 'X'. " Crear nueva orden de spool

   output_options-tddelete   = 'X'. " Borrar spool tras salida

   output_options-tdimmed    = 'X'. " Impresión inmediata

   output_options-tdcopies   = pa_copia. " Nro de copias



and module function is as follows:



CALL FUNCTION fm_name

     EXPORTING

       control_parameters = lw_cont_prm

       output_options     = output_options

       user_settings      = lv_user_settings

     TABLES

       gt_personal        = gt_personal

       gt_asignacion      = gt_asignacion

       gt_ausencias       = gt_ausencia

     EXCEPTIONS

       formatting_error   = 1

       internal_error     = 2

       send_error         = 3

       user_canceled      = 4

       OTHERS             = 5.


The problem is that not issue me an error and does not show me a preview of smartforms. Might you help me

Former Member
0 Kudos
379

Hi,

You can use the FM SSFCOMP_PDF_PREVIEW