hub2002 написал(а):
Приветствую.
1:
в каком-нибудь экзите (отрабатывающем при сохранении заказа) запустить ФМ (функц.модуль обновления) в update task, в котором и реализовать нужные действия.
--- Не очень понял. А если новый документ, как мне получить его номер? И какой функциональный модуль использовать?
..
Тогда уж лучше использовать USEREXIT_SAVE_DOCUMENT, т.к. USEREXIT_REFRESH_DOCUMENT немного не для этой цели предназначен...
Только запускать дальнейшую обработку нужно в режиме ..IN BACKGROUND TASK, чтобы быть уверенным, что заказ сохранился в БД.
Code:
*---------------------------------------------------------------------*
* FORM USEREXIT_REFRESH_DOCUMENT *
*---------------------------------------------------------------------*
* It is always necessary to refresh user-specific data before *
* the next document will be processed. *
* This can be done in this userexit. *
* This userexit can be used to refresh user-specific data *
* when the processing of a sales document is finished *
* - after the document is saved *
* - when you leave the document processing with F3 or F15 *
* It may be necessary to refresh user-specific data before *
* the next document will be processed. *
* *
* This form is called in dialog at the end of form *
* BELEG_INITIALISIEREN *
* *
Code:
*---------------------------------------------------------------------*
* FORM USEREXIT_SAVE_DOCUMENT *
*---------------------------------------------------------------------*
* This userexit can be used to save data in additional tables *
* when a document is saved. *
* *
* If field T180-TRTYP contents 'H', the document will be *
* created, else it will be changed. *
* *
* This form is called at from form BELEG_SICHERN, before COMMIT *
* *
*---------------------------------------------------------------------*