cancel
Showing results for 
Search instead for 
Did you mean: 

spool is picking LOCL by defaut from SU3 settings, its not taking printer passed on selection screen

Hello Every one,

I have a issue with printing smart form with different printer

my code is as below.

 ls_control_param-device      = 'PRINTER'.
  ls_control_param-langu       = sy-langu.
  ls_control_param-no_dialog   = c_x.
  ls_control_param-preview     =  ' '.



  ls_composer_param-tddest     = s_ldest.
  ls_composer_param-tdimmed    = ' '.
  ls_composer_param-tdnewid    = 'X'.



* Function Module Call for the Smartform.

  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.

  if sy-subrc = 0.





    call function lv_fm_name

      exporting

        control_parameters = ls_control_param

        output_options     = ls_composer_param

        user_setting       = ''

        is_header          = wa_header

        is_adrc_shipto     = wa_adrc_shipto

        is_adrc_soldto     = wa_adrc_soldto

        it_item            = lt_item

        it_adrc            = wa_adrc

        gv_email_shipto    = wa_adr6_sh

        gv_email_soldto    = wa_adr6_so

      exceptions

        formatting_error   = 1

        internal_error     = 2

        send_error         = 3

        user_canceled      = 4

        others             = 5.

  endif.

when executing this,

its picking the spool as LOCL but not what we have passed on ls_composer_param-tddest = s_ldest.
LOCL is picked from user profile su3 which is in default spool control setting.

How can we change this to a different one ?

how to change based on selection screen, irrespective of what ever settings made on SU3.

please help..
for reference adding images

spool should not pick from above output device, it should be with what ever printer we are passing on selection screen.

NOTE : user settings remains same, need changes on code.

HELP HELP HELP

Matt_Fraser
Active Contributor

Hi Rohith,

There is no need to tag your question with everything with the word "ABAP" in it, as most of the tags you picked are not at all related to your question. All that does is clutter the forum and annoy people. I have removed all the tags that had nothing to do with printing from ABAP programs, and I added one that is specifically about printing in ABAP systems that you missed. You are far more likely to get relevant responses this way.

Best regards,
Matt Fraser
SAP Community Moderator

Accepted Solutions (0)

Answers (1)

Answers (1)

Jelena
Active Contributor

Have you tried searching in Google? I typed "send Smartform to specific printer site:sap.com" in Google and the second post was an answered question. There are plenty more.

Going forward, please use Google before posting and if you've searched already then post the links that were found but did not help.

0 Kudos

In google it is all same which is not working so i have posted the issue in Detail