‎2009 Apr 21 8:27 AM
Hi ,
I have the following requirement .
If tcode is VA41 And VBAK-AUART = ZEOA or VBAK-AUART = ZEOR or VBAK-AUART = ZSCP,
mail should be sent to certain receivers.
Please let me know it there is there any Exit for the above issue
Thanks and Regards ,
Indira Priyadarshini.
‎2009 Apr 21 8:36 AM
Hi,
Use MV45AFZZ in this FORM USEREXIT_MOVE_FIELD_TO_VBAK ....in this check for
tcode to be VA41 and vbak-auart according to your conditions....and use the function module
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
object_content = t_mail_txt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.Thanks,
Shailaja Ainala.
‎2009 Apr 21 8:36 AM
Hi,
Use MV45AFZZ in this FORM USEREXIT_MOVE_FIELD_TO_VBAK ....in this check for
tcode to be VA41 and vbak-auart according to your conditions....and use the function module
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
object_content = t_mail_txt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.Thanks,
Shailaja Ainala.
‎2009 Apr 21 2:50 PM
Hi Shailaja,
Thanks for quick reply.
I have used the same include MV45AFZZ .
But it is triggerring even for VA01 .
How can I check the condition for tcode ie only for VA41 tcode the coding written should trigger.
Thanks and Regards,
Indira Priyadarshini
‎2009 Apr 21 2:58 PM
Hi,
You need to check like
if sy-tcode = 'VA41'.
endif.
write your logic between this...
Thanks,
Shailaja Ainala.
‎2009 Apr 22 7:25 AM