11-14-2007 12:50 PM
hi,
can anyone please tell me how we can trigger an email
right after the details are put in the VA01 and saved??
All the values input should be sent in throught the mail.
Kindly help...point will be awarded to the most appropriate
replies.
11-14-2007 2:15 PM
I don't think we have any exit in VA01 which can be triggered after the VA01 save.
But you can use the USEREXIT_SAVE_DOCUMENT in the program MV45AFZZ to have your funcationality. To change this program you need to have the access key for that.
This User exit triggers just before saving. SO, many be you can use it.
Inside the USEREXIT_SAVE_DOCUMENT you can access workarea VBAK, and tables XVBAP, XVBEP for the transactional data for that SO.
Regards,
Naimesh Patel
11-14-2007 2:15 PM
I don't think we have any exit in VA01 which can be triggered after the VA01 save.
But you can use the USEREXIT_SAVE_DOCUMENT in the program MV45AFZZ to have your funcationality. To change this program you need to have the access key for that.
This User exit triggers just before saving. SO, many be you can use it.
Inside the USEREXIT_SAVE_DOCUMENT you can access workarea VBAK, and tables XVBAP, XVBEP for the transactional data for that SO.
Regards,
Naimesh Patel
11-14-2007 2:19 PM
You can use userexit USEREXIT_SAVE_DOCUMENT in include 'MV45AFZZ'. In there you have all the internal tables from VA01 available (e.g. VBAK, XVBAP, XVBEP, etc.) to collect the data from.
Then call function 'SO_NEW_DOCUMENT_SEND_API1' to send the email.
Regards,
Michael
11-14-2007 2:25 PM
You could use USEREXIT_SAVE_DOCUMENT as suggested and create a sub routine that is only called on commit -
PERFORM send_email_details ON COMMIT
That way the email would only be sent if and when the order is actually commited to the DB.
The other thing to check is if there are any change pointers you could use to trigger a process - I don't know if there are off the top of my head so try searching this forum for info in that area.
Gareth.
11-15-2007 6:47 AM
hi all,
if i do want to use the user exit USEREXIT_SAVE_DOCUMENT as suggeted by you,
but i dont have the access key..is there any other way out?
11-15-2007 8:54 AM
Then go to your basis person and get them to register the change to obtain an access key - this is common practice when changing the user exits in SAPMV45A.
Gareth.
11-14-2007 2:28 PM
Hi Bumba ,
In this case User-Exit wont help because they are triggerred before saving the document .
If you want to trigger an email after saving the document in VA01 .
You can create a program that will call the transaction VA01.
Normally messages will be returned after calling the transaction ,
You can capture the messages in your program BDCMSGCOLL.
IF BDCMSGCOLL is containing any error messages then we can skip the Email functionality .
Else Email will be generated.
For sending email you can use FM . SO_NEW_DOCUMENT_SEND_API1
11-15-2007 6:45 AM
hi manoj,
actually i want the email functionality triggered everytime
an entry is made into the VA01 transaction and saved.In
the solution you have written.if i use my own program,the
email will be triggered only if my program is executed..and
that is not what i actually want.
But i really appreciate the help from your side.
11-15-2007 12:42 PM
This include is intended to be modified. It contains the 'older' user exits from SAP where you still had to make a 'modification' to a standard SAP program. That's why you need the access key to be able to change it.
Regards, Michael
11-15-2007 2:07 PM
VA01 Extras->output->header->edit
Setup an output message for internet mail.Ask help from an SD consultand
11-29-2007 1:04 PM