Code: Alles auswählen.
*---------------------------------------------------------------------*
* FORM USEREXIT_SAVE_DOCUMENT_PREPARE *
*---------------------------------------------------------------------*
* This userexit can be used for changes or checks, before 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 the beginning of form BELEG_SICHERN *
* *
*---------------------------------------------------------------------*
form userexit_save_document_prepare.
* include zz............
*} INSERT
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form USEREXIT_SAVE_DOCUMENT_PREPARE, End A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
enhancement 1 zz_sap_spec_en_sd001. "active version
break-point id zz_sap_spec_en_sd001.
* If modus 'CREATE' and Quotation type 'ZRQ' and quotation value GE $1000.00:
if t180-trtyp eq 'H' and vbak-auart eq 'ZRQ' and vbak-netwr ge '1000.00'.
* change user status to 'HOLD'
call function 'STATUS_CHANGE_EXTERN'
exporting
objnr = vbak-objnr
user_status = 'E0003'. "Status 'HOLD'
* commit work.
endif.
endenhancement.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
endform.