‎2008 Dec 17 6:07 AM
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
‎2008 Dec 17 6:29 AM
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
‎2008 Dec 17 6:38 AM
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
‎2008 Dec 17 6:44 AM
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.
‎2008 Dec 17 6:38 AM
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
‎2008 Dec 17 6:50 AM
‎2008 Dec 18 4:45 AM
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
‎2008 Dec 18 4:52 AM
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