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

user_exit_save_document (clarification)

Former Member
0 Likes
945

Hi,

what is the difference between two user exits: userexit_save_document_prepare and userexit_save_document.

How these two userexits will play around in a sales order processing.

I hav to develop in both the userexits, so i would like to know the effect of these two unserexits.

thnx

rohith

7 REPLIES 7
Read only

Former Member
0 Likes
874

hi

the differences are between USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT are:

USEREXIT_SAVE_DOCUMENT_PREPARE

Use this user exit to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.

USEREXIT_SAVE_DOCUMENT

Use this user exit to fill user-specific statistics update tables.

If a standard field is changed, the field r185d-dataloss is set to X. The system queries this indicator at the beginning of the safety routine. This is why this indicator must also be set during the maintenance of user-specific tables that are also to be saved.

hope it helps

regards

Aakash Banga

Edited by: aakash banga on Dec 17, 2008 7:29 AM

Read only

0 Likes
874

Hi,

thanx for the response.

can you please more clear or precise on the second user exit i.e userexit_save_document..

Any documentation on these userexits is more help. (also userexits used in the sales order processing).

thanx

Read only

0 Likes
874

This userexit is used basically for saving data in additional tables (Ztables)

when a sales document is saved as the number range is generated at this stage.

Read only

Former Member
0 Likes
874

hi rohith

In this USEREXIT_SAVE_DOCUMENT_PREPARE sales document number is not generated while

in USEREXIT_SAVE_DOCUMENT sales document number is already generated.

thanks

Sachin

Read only

Former Member
0 Likes
874

hi

check out prog MV45AFZZ

hope it helps

regards

Aakash Banga

Read only

0 Likes
874

Well,

i know that it is used in mv45afzz, but i didn't found any such difference in these two exist.

Where can we find the userexit information ? if any please provide the path for the same.

thanx

Read only

Former Member
0 Likes
874

Hi,

userexit_save_document_prepare --> you can modify the current sales order and you can play with any field in the sales order. (Bu sales number is not awailable in this user-exit)

userexit_save_document --> Say you need to send a mail to the endusers with the sales order number, you can write the code or you need to update some Ztable with the sales order number you can do here, but you can't play with the actual sales orer in this user-exit.

Hope this will help

With best regards,

Navneet Chaubey