‎2008 Aug 29 1:03 PM
Hi Experts,
Could you please let me know the Difference between USEREXIT_SAVE_DOCUMENT & USEREXIT_SAVE_DOCUMENT_PREPARE in sales order processing.
‎2008 Aug 29 1:11 PM
This is from SAP comment.
*---------------------------------------------------------------------*
* 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 *
* *and
*---------------------------------------------------------------------*
---------------------------------------------------------------------*
* 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 *
* *
*---------------------------------------------------------------------*
‎2008 Aug 29 1:18 PM
‎2008 Aug 29 1:21 PM
FORM USEREXIT_SAVE_DOCUMENT_PREPARE
This userexit can be used for changes or checks, before a document is saved. You can check all your Z fields have correct values.
FORM USEREXIT_SAVE_DOCUMENT
This userexit can be used to save data in additional tables when a document is saved. If the form USEREXIT_SAVE_DOCUMENT_PREPARE did not return any error then you can save the values into the relavent tables here.
Hope this helps.
FRanc