cancel
Showing results for 
Search instead for 
Did you mean: 

subject & Message content in emails from XI

Former Member
0 Kudos

All,

We need to send an email from the XI system. The message that we use is the following,

<target>

<name> John Doe</name><designation>manager</designation>

<name> Mary Jane</name><designation>supervisor</designation>

<name> Foo Bar</name><designation>customer associate</designation>

</target>

we need to send the email with the message body as follows,

John Doe, manager

Mary Jane, supervisor

Foo Bar, customer associate

How do we strip the xml nodes from the message? Also currently this email has a subject of "Employee New Hire Report". How can we add the current date also to this subject ("Employee New Hire Report 07/21/2007") ?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor
0 Kudos

If you requirement was only the mail with flat fields (no xml), then you could simply use Content Conversion Module (http://help.sap.com/saphelp_nw70/helpdata/en/44/748d595dab6fb5e10000000a155369/frameset.htm) before your receiver mail adapter module.

But since you have the requirement for the date in the subject, you could try to use Mail Package (check this blog for a reference: /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address).

With simple logics within your message mapping, you could have your subject with date and the content field as required (for line feeds in UDF, use "\n" character in the concatenated string).

Regards,

Henrique.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Does your input is coming xml tages format? If yes then in mapping you can strip them. If you have doubt please give the input file and input structure?

For subject is this hardcoded or coming from the source. If either of these just take the source and concat the date function and then send to target like source>concat>date-->target.

Regards,

---Satish

Former Member
0 Kudos

The structure of the target is what i have mentioned in the xml in my question. It has all the data. (it comes from an RFC). Even if i add a node to the target that represents the current date. It is still going to come as xml in the body of the email.

But when we use the communciation channel as "mail", the email comes with the entire xml message of the target (with the xml nodes).

Hope that clarifies.

Thanks.

Former Member
0 Kudos

Hi,

One thing comes to my mind is to write 2 interfaces. In the first interface you write the file as csv and then in the second interface you take this csv file and send as an email. Then you can get rid of the xml tags. Here no need of IR only you need is ID part.

Regards,

---Satish