cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Default Printer name in Smartforms

Former Member
0 Likes
5,825

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.

View Entire Topic
Former Member
0 Likes
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 Likes

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 Likes

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
Product and Topic Expert
Product and Topic Expert
0 Likes

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