on 11-05-2009 12:04 AM
Hello,
I have set up my invoice output to be sent to an external address by email as a PDF. This works fine but I have 3 questions:
1. How can I dynamically generate an email subject ? Right now I can enter a fix subject but I would like it to be dynamic such as ex.: Invoice # xxxxxxxxxx sent by <cie name>.
2. The invoice is a PDF found as an attachment to the email. How can I have text, besides the subject, in the email body ? Where do we set up that in the system ?
3. I want to create a report that would show if the output was properly generated for the invoice and what's the status in sost. I can't find a link between the entry in table NAST and the entry in SOST. How can I link my output from NAST with the status in SOST in a report ?
Thanks in advance for the help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, on question 3, we had a simular request and solved it by storing the 'mail request number' in the application log.
The 'mail request number' (SO_REC_NO) is returned by the smartfrom function module in SYST-MSGID, MSGNO,...
The print application log can (think it should) be updated by calling function module 'NAST_PROTOCOL_UPDATE' after the call to the smartfrom function module.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = SYST-MSGID
MSG_NR = SYST-MSGNO
MSG_TY = SYST-MSGTY
MSG_V1 = SYST-MSGV1
MSG_V2 = SYST-MSGV2
MSG_V3 = SYST-MSGV3
MSG_V4 = SYST-MSGV4
After that via field NAST-CMFPNR (Error management number) the application log can be retrieved. Application log messages are in table CMFP where field APLID = 'WFMC' (Output control) and NR = NAST-CMFPNR.
The mail request number is stored in the log under CMFP-ARBGB = 'SSFCOMPOSER' and MSGNR = '024' in MSGV1. MSGV1 holds SO_REC_NO that is the key or index to tables SOST, SOSC, SOOD
Regards Jack
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jason,
Thanks I saw your post explaining how to add text to the email's body and I will try it.
Do you have a solution to have a dynamic email subject ? I saw posts were we have to enter in the condition records a variable such as &VBRK-VBELN& but this has to be fed somewhere in the code.
For the between NAST and SOST, I might have found something but it all depends on the dynamic email subject. If I can plug the invoice number in the email subject, then I can do a search between NAST object # and the Doc. Title field in SOST. That wouldn't be the most efficient search but it's better than nothing.
Let me know about the subject,
Cheers, Richard.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Some details in this post may help ...
[http://forumsa.sdn.sap.com/click.jspa?searchID=-1&messageID=8027666]
Let me know if you need anything further. Basically doing everything you describe currrenly in a our PROD system.
Thanks,
Jay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.