Application Development and Automation 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: 
Read only

No printer name defined in SMARTFORM.

Former Member
0 Likes
639

Hi all,

If there is no printer ls_output_opt-LDEST defined, SAP will get the printer from the user profile. If there is also no printer defined in user profile, it will prompt window for keying in the printer name.

The problem is when I key in the printer name, and to my surprise, there is no 'OK' or 'Tick' button, the only button available is 'X' or Cancel button.

Please help.


  call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
      formname           = lv_formname
    importing
      fm_name            = lv_fm_name
    exceptions
      no_form            = 1
      no_function_module = 2
      others             = 3.
...
  call function lv_fm_name
    exporting
      control_parameters       = ls_print_parm
      output_options           = ls_output_opt
      user_settings            = space

Hi all,

If there is no printer ls_output_opt-LDEST defined, SAP will get the printer from the user profile. If there is also no printer defined in user profile, it will prompt window for keying in the printer name.

The problem is when I key in the printer name, and to my surprise, there is no 'OK' or 'Tick' button, the only button available is 'X' or Cancel button.

Please help.


  call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
      formname           = lv_formname
    importing
      fm_name            = lv_fm_name
    exceptions
      no_form            = 1
      no_function_module = 2
      others             = 3.
...
  call function lv_fm_name
    exporting
      control_parameters       = ls_print_parm
      output_options           = ls_output_opt
      user_settings            = space

3 REPLIES 3
Read only

Former Member
0 Likes
605

Hi,

Try this:


data :     LS_OUTPUT TYPE SSFCOMPOP,
 ls_print_parm type TYPE SSFCTRLOP.

 ls_print_parm-PREVIEW = 'X'.
   ls_print_parm-NO_DIALOG = 'X'.
   ls_print_parm-DEVICE = 'PRINTER'.

 LS_OUTPUT-TDDEST = 'LOCA'. "or 'LP01'.  "Spool: Output device

call function lv_fm_name
    exporting
      control_parameters       = ls_print_parm
      output_options           = ls_output
      user_settings            = space

Thanks,

Read only

0 Likes
605

Hi,

Thanks for replying. However the requirement is no hardcode is allowed.

Read only

0 Likes
605

If so, get your printer in table TSP03 also check in user profile table USR01, then fill you pop up table for getting printer name.

Thanks,