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: 

Immediate Print in SAP

jagjit_saini2
Explorer
0 Kudos

Hi ,

I am facing one issue in print of smart form .I want my smart form should go to the printer mentioned in communication method . But to get this ,i have  to set User_Settings = Space .But if i do User_Settings = Space in call smart-form function , it  will  take device type mentioned in communication method , but it will not go for immediate printing .If i do User_settings = 'X' ,it will go for immediate print, but will take default device type ,not the one mentioned in communication method .

Regards

Jagjit Singh Saini

3 REPLIES 3

kirill_smirnov
Explorer
0 Kudos

Hi Jagjit,

Please fill the "output" and "control" parameters accordingly. For example:


DATA:

           ls_control    TYPE ssfctrlop,

           ls_output    TYPE ssfcompop.

............

  MOVE:       

            'X'    TO ls_control-no_dialog,      

            'X'    TO ls_output-tdnoprev,        

            'LOCL'  TO ls_output-tddest,       

             'X'    TO ls_output-tdimmed.

............     

CALL FUNCTION me->gv_fm_name       

          EXPORTING         

                control_parameters  = ls_control

                output_options      = ls_output

                user_settings        = ' '

         TABLES

                ct_data              =       <lt_data>

          EXCEPTIONS         

           formatting_error        = 1

           internal_error            = 2

           send_error                = 3

           user_canceled          = 4

           OTHERS                  = 5.

       IF sy-subrc <> 0.

         zcx_ca_sfsq=>raise_sy( ).

       ENDIF.

0 Kudos

Hi Kirill,

Thanks for ur reply . I have tried accordingly , but then it is not going to printer immediatly .

Regards

Jagjit Singh Saini

former_member202771
Contributor
0 Kudos

Hi Jagjit,

Hope this will explain.

Thanks,

Anil