SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Выбор локального принтера без диалога в SmartForms



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
alex_nil
Участник
Участник



Joined: 26 Sep 2007
Posts: 25

PostPosted: Mon Oct 01, 2007 10:57 am    Post subject: Выбор локального принтера без диалога в SmartForms Reply with quote

Привет!
А можно ли убрать диалог с выбором локального принтера при печати из SmartForms?
Back to top
View user's profile Send private message
Lord
Профессионал
Профессионал



Joined: 10 Sep 2007
Posts: 168

PostPosted: Tue Oct 02, 2007 10:31 am    Post subject: Reply with quote

Диалог не будет появляться, если указать принтер в параметрах пользователя.

Или изменять параметры печати пользователя "налету" BAPI_USER_CHANGE:

Code:
DATA:
  ls_def TYPE bapidefaul,
  ls_def_saved TYPE bapidefaul,
  ls_defx TYPE bapidefax,
  lt_ret TYPE TABLE OF bapiret2.

CALL FUNCTION 'BAPI_USER_GET_DETAIL'
  EXPORTING
    username   = sy-uname
  IMPORTING
    defaults   = ls_def
  TABLES:
    return     = lt_ret.

IF lt_ret IS INITIAL.
  ls_def_saved      = ls_def.
  ls_def-spld  = 'LP01'.
  ls_defx-spld = 'X'.
  CALL FUNCTION 'BAPI_USER_CHANGE'
    EXPORTING
      username  = sy-uname
      defaults  = ls_def
      defaultsx = ls_defx
    TABLES
      return    = lt_ret.
ENDIF.

* Выполнить действия и вернуть настройки
...

IF lt_ret IS INITIAL.
  CALL FUNCTION 'BAPI_USER_CHANGE'
    EXPORTING
      username  = sy-uname
      defaults  = ls_def_saved
      defaultsx = ls_defx
    TABLES
      return    = lt_ret.
ENDIF.
Back to top
View user's profile Send private message
july7
Старший специалист
Старший специалист



Joined: 10 Oct 2007
Posts: 109
Location: Киров

PostPosted: Wed Oct 10, 2007 4:37 pm    Post subject: Reply with quote

Code:
DATA: control_parameters  TYPE ssfctrlop.
  DATA: output_options TYPE ssfcompop.

  output_options-tddest   = 'LP01'.
  output_options-tdimmed  = 'X'.   
  output_options-tdcopies = 1.       
  control_parameters-preview   = 'X'.
  control_parameters-no_dialog = 'X'. "НЕ ОТОБРАЖАТЬ ДИАЛОГ

...

  CALL FUNCTION func_mode_name
     EXPORTING
       user_settings = space
       output_options = output_options
       control_parameters = control_parameters
     TABLES
        ...
      EXCEPTIONS
       formatting_error     = 1
       internal_error       = 2
       send_error           = 3
       user_canceled        = 4
       OTHERS               = 5.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.