Application Development and Automation 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: 
Read only

Difference between USEREXIT_SAVE_DOCUMENT & USEREXIT_SAVE_DOCUMENT_PREPARE

Former Member
0 Likes
3,183

Hi Experts,

Could you please let me know the Difference between USEREXIT_SAVE_DOCUMENT & USEREXIT_SAVE_DOCUMENT_PREPARE in sales order processing.

3 REPLIES 3
Read only

Former Member
0 Likes
1,141

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    *
*                                                                     *
*---------------------------------------------------------------------*

Read only

Former Member
0 Likes
1,141

Hi,

Regards

Adil

Read only

former_member226999
Contributor
0 Likes
1,141

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