cancel
Showing results for 
Search instead for 
Did you mean: 

Query in Using dynamic mail adapter

0 Kudos

Hi,

I have a scenario , which is an IDOC to file. The file needs to sent to the target as an attachment to a mail.

Also the content of the the mail needs to be manual text with some dynamic values from the IDOC.Can anyone help me to complete this task.

Regards

Shafeek

My target structure is like this

<?xml version="1.0" encoding="UTF-8"?>

<ns0:DK_PickingRequest xmlns:ns0="urn:warehouse:o2c:cp:global:warehousemgmt:pickingrequest:100">

<Element1><FixedField> </FixedField>

<MaterialNumber>0015531</MaterialNumber>

<DeliveryDate>20090827</DeliveryDate>

<CustomerNumber>5000675</CustomerNumber>

<Batch>SSP9B006</Batch>

<NumberOfOrderedItems>200.000</NumberOfOrderedItems>

<Franco>1</Franco>

<FreightPayer></FreightPayer>

<CustomerReferenceNumber>ad200900519</CustomerReferenceNumber>

</Element1>

<Mail_Content>

<InstructiontoWarehouse> </InstructiontoWarehouse>

<FileName>8870133759.001</FileName>

<SalesOrderNumber>6000002840</SalesOrderNumber>

</Mail_Content>

</ns0:DK_PickingRequest>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

AFAIK you can set only dynamic Subject ,but not the body of the mail.

use THeaderSUBJECT adapter specific attribute of mail adpater for dynamic subject...using UDF

Rajessh

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

you content of the mail is based on the idoc, so that itself makes it dynamic

for the header, you can use the Adapter-Specific Message Attributes to set the to address, subject etc easily.

Use dynamic configuration to help you.

ref:

http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm

/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

0 Kudos

How do i separate the payloads as mail content and attachment.

I want the element record to be set as attachment and..

rest mail contents should come in body of the mail.

Also regarding file naming , the blog is mentioned is for file adapter.How can i achieve the same in mail adapter.

Former Member
0 Kudos

You need to use the

DynamicConfigurationKey.create(u201Chttp://sap.com/xi/XI/System/Mailu201D,u201CTHeaderSUBJECT");

if need to use DynamicSubject and need to set the ASMA of mail adapter..

You can add the content as attachment, if need to generate body content of the mail then need to go for Mail XSD avaliable

data type..

Rajesh

0 Kudos

Ok...

For the content i can use mail XSD.

But the attachment and content are different.So in the incase how can i achieve them.