cancel
Showing results for 
Search instead for 
Did you mean: 

Default Printer name in Smartforms

Former Member
0 Kudos

Hi Experts,

When I am displaying Smart forms, an automatic popus is getting displayed which asks for current Printer.I am using LP01 as default printer.Can I hide this popup so while the user executes the program,he can directly view the Report screen.

regds,

Sam.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Experts,

Thanx for ur replies.Now I am able to disable the popup for printer name.But Print option is not enabled to give print for the report.If I press back button the same printer popup is coming and if i press preview then only print button is getting enabled.

How to solve this problem?

Regds,

Sam.

Former Member
0 Kudos

try removing

WA_OUTPUT-TDNOPRINT = 'X'. "No printing from print preview

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Experts,

Thanx a lot for ur replies.

My problem is solved.

Regds,

Sam.

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

In your Print Program of the Smartform,Change the Print Settings as

pass the NO_DIALOG field of the param CONTROL_PARAMETERS as 'X' & TDDEST of OUTPUT_OPTIONS as LP01.

Regards,

Sreeram

kesavadas_thekkillath
Active Contributor
0 Kudos

Pl search in SCN for supressing smarform print dialog

rvinod1982
Contributor
0 Kudos

Hi Sam,

Yes, you can disable the popup of printer selection. In the print program you use function module

SSF_FUNCTION_MODULE_NAME where you pass smartforms name and get its corresponding function module name.

Then when you call this function module, to print the smartform.

In this function module there is an exporting parameter control_parameters available. You need to pass a structure for ex. ls_control_param of type ssfctrlop to this paratemer. Before calling the function module set the value of fields

no_dialog and preview as below.

ls_control_param-no_dialog = 'X'.

ls_control_param-preview = 'X'.

Regards,

Vinod

former_member198275
Active Contributor
0 Kudos
DATA :  LF_FORMNAME           TYPE TDSFNAME ,  " Smart Forms: Form Name
                        LF_FM_NAME            TYPE RS38L_FNAM. " Name of Function Module
          data :     WA_CPARAM TYPE SSFCTRLOP,
                        WA_OUTPUT TYPE SSFCOMPOP.
 
 
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      FORMNAME           = LF_FORMNAME
    IMPORTING
      FM_NAME            = LF_FM_NAME.
 
  WA_CPARAM-PREVIEW = 'X'.
  WA_CPARAM-NO_DIALOG = 'X'.
  WA_CPARAM-DEVICE = 'PRINTER'.
 
 
  WA_OUTPUT-TDNOPRINT = 'X'.       "No printing from print preview
  WA_OUTPUT-TDDEST = 'LOCA'. "or 'LP01'.  "Spool: Output device
 
 
  CALL FUNCTION LF_FM_NAME
    EXPORTING
      CONTROL_PARAMETERS = WA_CPARAM
      OUTPUT_OPTIONS     = WA_OUTPUT
      USER_SETTINGS      = SPACE.
Former Member
0 Kudos

Hi Kaushik,

I tried ur logic,but i am getting the following error.

Form does not exist

Message no. SSFCOMPOSER004

Pls help me to solve this problem.

Regds,

Sam

Former Member
0 Kudos

pass the smartform name to LF_FORMNAME and then call the Fm SSF_FUNCTION_MODULE_NAME

as:

LF_FORMNAME = 'Z_SMARTFORM'.  "==>pass form name here
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      FORMNAME           = LF_FORMNAME
    IMPORTING
      FM_NAME            = LF_FM_NAME.

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Sam,

The idea is to pass the NO_DIALOG field of the param CONTROL_PARAMETERS as 'X' & TDDEST of OUTPUT_OPTIONS as LP01.

Please donot copy paste the code.

Cheers,

Suhas

Former Member
0 Kudos

For the export parameter control_parameters pass the value 'X' for the field control_parameters-NO_DIALOG thus your pop -up for printer options will not come and pass control_parameters-preview = 'X' hence the o/p will be shown directly.