2016 Feb 09 10:08 AM
Hi ,
I have created a ZDriver Program to send email Billing Document to customer when the Billing Document is Displayed , But Here my billing Document is sent evrytime when I click on print preview tab of Biling Document .
SO , here I want to send Billing Document only once when I display the billing document very first , After that PDF attachment should not be sent to customer no matter how many times we display the particular Billing Document .
Is there any flag or condition I can use to resolve this .
2016 Feb 09 11:02 AM
Hello,
If you want to send the email only for the first time you display the billing document, you have to make a select in NAST Table
- KAPPL = 'V3'
- OBJKY = Billing document (with leading zeros)
- KSCHL ( your message type to display Billing Document, check NACE Transaction)
If you have a entry then skip the send mail processing in your ZDriver
Else, send process the ZDriver to send email.
Hope that helps
With Regards
Saber
2016 Feb 09 10:16 AM
Hi Sabir,
how did you set your message condition? Did you set up any Output Control requirment in VOFM?
2016 Feb 09 10:53 AM
Simon ,
No Idea about VOFM , Our Functional has done all the setting , by setting in VOFM can we achieve the above functionality ??
2016 Feb 09 11:02 AM
Hello,
If you want to send the email only for the first time you display the billing document, you have to make a select in NAST Table
- KAPPL = 'V3'
- OBJKY = Billing document (with leading zeros)
- KSCHL ( your message type to display Billing Document, check NACE Transaction)
If you have a entry then skip the send mail processing in your ZDriver
Else, send process the ZDriver to send email.
Hope that helps
With Regards
Saber
2016 Feb 09 11:04 AM
It can be done, but it should be better to NOT create the new message via VOFM imho.
Otherwise you'll have to set all the messages as green/red even if not true.
2016 Feb 09 11:20 AM
Yes indeed.
The Status of Message Type Processing should considered. (NAST-VSTAT = 1 )
0 | Not processed |
1 | Successfully processed |
2 | Incorrectly processed |
This is a workaround solution,
The best practise says to handle it in VOFM ( or NACE ) via customizing
2016 Feb 09 1:43 PM
By Using VOFM would I be able to display the Billing Document any number of times without sending the email to customer ?
and does this process is applicable for VF31 as well ?
Or I should used The method u said
Message was edited by: Sabir Shah
2016 Feb 09 1:54 PM
2016 Feb 10 6:10 AM
Hi ,
As I create the Billing Document it the values of the value of all these fields updated in NAST table
- KAPPL = 'V3'
- OBJKY = Billing document (with leading zeros)
- KSCHL ( your message type to display Billing Document, check NACE Transaction)
and when I run select query I get the entry so Im not able to send the email first time only
Moreover value of VSTAT remains '0' no matter how many times I display the Billing DOcument
See the code as NAST values are copied into TEMP_NAST and IF I make changes in VSTAT in my ZPROGRAM then the changes are not reflected coz of TEMP_NAST .