on 09-30-2009 3:16 PM
Hi Experts,
We are working on smart form which needs to be mailed to few recipients.
I'm aware of the configuration which allows the distribution list to be configured to which the mail can be sent.
But, Is there a way where we can determine and change the recipient with in the smartform dynamically ?
Any suggestions/pointers in this regard will be of great
Thanks in advance.
Kris.
Instead of using the standard sap functionality try implementing it with custom coding.
this wiki will guide u i this
http://wiki.sdn.sap.com/wiki/display/Snippets/mailsendthroughoutputcontrols
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kartik,
thats a really helpful link.
But in our case, we have the action Profiles confiigures to send a PDF attachement up on the trigger of an event.
As per my knowledge, the method explained by your link is the way you send a mail when no action profile is configured (Correct me if wrong).
Is there a way where the configured action profile can trigger a mail where in the subject and body of the mail are dynamically generated from within the code?
Thanks in advance.
Kris.
>
> Is there a way where the configured action profile can trigger a mail where in the subject and body of the mail are dynamically generated from within the code?
> Thanks in advance.
>
> Kris.
I am not sure if subject or and body of mail can be dynamically configured from code when action profile is triggering the mail.
Thats the reson i sent you the link, if you dont find a way to change the subject or mail dynamically, then you can use the method.
But if you find some other way of achieveing it, then do let me know.
Hi Kartik.
I need your help in identifying the following.
1. While calling the driver program function module, the interface has 3 standard parameters
MAIL_APPL_OBJ
MAIL_RECIPIENT
MAIL_SENDER.
Any idea how these can be used?
Your inputs would be of great help. Points assured.
Thanks in advance,
Kris.
Hi,
Points assured
First of all please do not mention this as this is against the forum rules.
now coming to your question
mail_sender and mail_recipient are of type "swotobjid".
They are used when the device type is configured as MAIL, In this case you can specify the mail subject in mail texts section of the output type configured in NACE.
The earlier link that i sent you requires the device type to be 'PRINTER' so if u want to implement that u need to device type as PRINTER so u dont require MAIL_SENDER and MAIL_RECIPIENT, but if u plan to use these parameters give device type as 'MAIL'
and implement following coding.
DATA: lv_ip_mailaddr TYPE so_name, "Address of a Mail Recipient
lv_ip_type_id TYPE so_escape, "Recipient type
ls_recipient_id TYPE swotobjid, "Structure for recvr obj ID
ls_sender_id TYPE swotobjid. "Structure for sender obj id
CONSTANTS: lc_ip_type_id TYPE so_escape VALUE 'U', "For internet address.
lv_ip_type_id = lc_ip_type_id.
* Create recipient object
CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
EXPORTING ip_mailaddr = lv_ip_mailaddr
ip_type_id = lv_ip_type_id
IMPORTING ep_recipient_id = ls_recipient_id
EXCEPTIONS invalid_recipient = 1
OTHERS = 2.
* Get sender object id
CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'
EXPORTING ip_sender = sy-uname
IMPORTING ep_sender_id = ls_sender_id
EXCEPTIONS invalid_sender = 1
OTHERS = 2.
кu03B1ятu03B9к
Edited by: Kartik Tarla on Oct 3, 2009 10:27 AM
HI,
I am having the same issue can u pls tell how to solve this just i want to add the subject line once so as per ur suggestion i want to add this line to tdtitle so where i can findout this field so how can i add this is there any need of concatenate the strings so can u pls provide me the solution
Regards
Raju
Perfect. Kartik you solved this.
Addind the line to the TDTITLE can add subject line to the mail.
Regret that I'm prolonging this thread, but is there a way we can pass the body of the mail too?
Also, when I add TDTITLE, the same is the name of the attachement as well. Is there a way we can have a different subject line and different attachement name?
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.