2014 May 04 10:44 AM
Hi All,
I need to send email notification to customer when ever invoice is created. As per business requirement, very limited data needs to be send (not as per print output) and also the detail should be in message body (not in attachment). For testing i have created stand alone program which takes invoice number and send email.
Can anyone help how to automate the process. Where should i give program sending email.
Thanks
2014 May 05 11:48 PM
It needs to be added to the output configuration, ask an SD consultant. The program will also need to have certain format - use any existing output program as an example.
Hi All,
I need to send email notification to customer when ever invoice is created. As per business requirement, very limited data needs to be send (not as per print output) and also the detail should be in message body (not in attachment). For testing i have created stand alone program which takes invoice number and send email.
Can anyone help how to automate the process. Where should i give program sending email.
Thanks
2014 May 05 11:48 PM
It needs to be added to the output configuration, ask an SD consultant. The program will also need to have certain format - use any existing output program as an example.
2014 May 06 9:47 AM
Dear Jelena,
The output type is configured now and i attached my custom program to send email to this output type. Email is being send when invoice is created using vf01.
However in case of vf04, the output type is failing, i checked the code and found out that nast-objky is not getting populated.
*---------------------------------------------------------------------*
* FORM ENTRY
*---------------------------------------------------------------------*
FORM entry USING return_code us_screen.
DATA: lf_retcode TYPE sy-subrc.
IF nast-objky IS INITIAL.
MESSAGE 'Invoice number not found'(001) TYPE 'S'.
ELSEIF v_vbeln IS INITIAL.
v_vbeln = nast-objky.
ENDIF.
Am i missing anything here.
Thanks
2014 May 06 7:51 PM
I'm not sure why the field would be blank... Are other NAST fields filled in? Is other output also failing or is it just this one? If one thing is working and the other isn't then in general we try to check for the differences between those things.
As a side note - it's not quite feasible to display messages in the output processing (it runs in its own process), so instead use FM NAST_PROTOCOL_UPDATE and update the protocol with any messages.