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

USEREXIT_SAVE_DOCUMENT_PREPARE

Former Member
0 Likes
12,865

Please let me know the scenarios where USEREXIT_SAVE_DOCUMENT_PREPARE can be used.

What are all the transaction codes that this is exit come across?

Also, what is the diff. between USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT ?

thank you.

Please let me know the scenarios where USEREXIT_SAVE_DOCUMENT_PREPARE can be used.

What are all the transaction codes that this is exit come across?

Also, what is the diff. between USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT ?

thank you.

5 REPLIES 5
Read only

Former Member
0 Likes
5,955

USEREXIT_SAVE_DOCUMENT_PREPARE

This user exit is used to check some input data.

We get a report screen: "Goods issue: Problem Log" during the delivery process when activating Post Goods Issue button. We want to include our own error message to this list if the selected batch is not on a customer defined table.The best way is to use - USEREXIT_SAVE_DOCUMENT_PREPARE

USEREXIT_SAVE_DOCUMENT is called after having saved the document

Regards,

Jagadish

Read only

Former Member
0 Likes
5,955

the user exit "USEREXIT_SAVE_DOCUMENT_PREPARE" is used in all sales document scenarios like Inquiry, Quotation, Sales Agreemnt, Sales Order Etc.

the difference between "USEREXIT_SAVE_DOCUMENT_PREPARE" and "USEREXIT_SAVE_DOCUMENT" is :

1. USEREXIT_SAVE_DOCUMENT_PREPARE is called before USEREXIT_SAVE_DOCUMENT

2. in this USEREXIT_SAVE_DOCUMENT_PREPARE no of sales document is not generated instead in USEREXIT_SAVE_DOCUMENT no of sales document no is already generated.

If information is useful please update the points

Read only

Former Member
0 Likes
5,955

SRK,

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

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

these all are used in VA* transaction.

Amit.

Read only

Former Member
0 Likes
5,955

Hi SRK,

The user exit "USEREXIT_SAVE_DOCUMENT_PREPARE" is used in VA01 / VA02 transactions.

Is very useful to check some input field, put any value in the field or show a popup to the users to confirm the document.

You can validate any Z table here before you save the purchase order.

Also, you can validate if the transaction is executed by batchinput or in background mode before check anything, or validate SY-UCOMM to follow your own sentences.

Read only

peter_atkin
Active Contributor
0 Likes
5,955

srk s,

Have a look at the [SAP Help|http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/frameset.htm]

PeteA