04-26-2006 12:48 AM
Hi All,
I am calling Custom Transaction in USEREXIT_SAVE_DOCUMENT for cash payment process. In this screen I do have one button called "RETURN TO ORDER", is press this button Should call the Transaction VA02. It's calling transaction VA02 & also Populating SALESORDER number ,but when i press enter it's giving error as <b>" SALES ORDER NUMBER IS NOT AVAILABLE IN DATABASE"</b>.
Any ideas how can i overcome this? Is there is any BAPI's i should use? Please give me your Good ideas & Guidance?
Thanks
04-26-2006 1:18 AM
Hi,
When you say you are calling a custom transaction in the userexit_save_document does that mean you are calling your custom transaction from within VA01? If yes then the exit only gets triggered before saving the order. Hence the order has not been yet created in the system. When you call a custom transdaction from within a user exit the control goes to the transaction and the process of order compeletion is not yet done.
Check if there is any exit after saving the exit.
Cheers
VJ
04-26-2006 1:26 AM
I am also having same scenario, i need to display the custom screen when i press save button in VA01. Is there is anyother way you guys can think ?
Thanks.
Message was edited by: Subha
04-26-2006 1:34 AM
Hi
I believe there are exists after a order is saved. Coz in our org we are sending IDOCs as soon as a order is saved and this is triggered only after the order is saved in the system.
So i bet there should be some exists which are triggered after the order is saved. If you are trying to trigger the custom screen before the order is even saved in the system then it might not be a good solution even if you can capture the order number mid-way.
Hope this helps
Cheers
VJ
04-26-2006 2:51 PM
I need to Call custom screen before order saved, B'cos if user enter payment method example like CASH CHECK then need to get data from them & should save Ztables for Cash Process. In this screen suppose if user wants to change anything in order then should able to go to Va02 from the custom screen by clicking the button.???
Thanks,
04-26-2006 3:52 AM
Hi Jayaprakash,
You need to call custom transaction in <b>USEREXIT_REFRESH_DOCUMENT</b> instead of USEREXIT_SAVE_DOCUMENT.
In this user exits, the sales order has been saved in database.
Please find below detail information about USEREXIT_REFRESH_DOCUMENT.
* It is always necessary to refresh user-specific data
* before the next document will be processed.
* This can be done in this userexit.
* This userexit can be used to refresh user-specific data
* when the processing of a sales document is finished
* - after the document is saved
* - when you leave the document processing with F3 or F15
* It may be necessary to refresh user-specific data before the next document will be processed.
*
* This form is called in dialog at the end of form
* BELEG_INITIALISIEREN
Hope this will help.
Regards,
Ferry Lianto
12-10-2021 4:19 AM
I feel particularly depressed… I want to use userexit_refresh_document to call “VA01” to copy the SO I just saved.I think it's a great way to do that. But my clients don't want me to use userexit_refresh_document, because they think 'refresh' is used for emptying. They want to do it with badi…