cancel
Showing results for 
Search instead for 
Did you mean: 

Questions Working with Mail receiver Adapter..!!

Former Member
0 Kudos

Hi,

Mail adapter connection is working now when I downloaded the xsd and executed in the mapping as described in the blog.

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

Connection is working fine now, but im getting the below payload.

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

- <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">

<Subject>TESTING</Subject>

<From>deepthi at testing.com</From>

<To>deepthi at testing.com</To>

<Content>Testing purpose</Content>

</ns1:Mail>

The question is how to get my actual message which looks like below. this is the Idoc to file map and the resultant output file looks like below

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

<ns0:order xmlns:ns0="http://testing/xi/OrderProcessing">

<document_type>ZU</document_type>

<vendor_number>200000</vendor_number>

<vendor_email_address/>

<vendor_address_line_1>XXXXXX</vendor_address_line_1>

<vendor_address_line_2>XXXXXXXXX</vendor_address_line_2>

<vendor_address_line_3>123242343244566</vendor_address_line_3>

<vendor_address_line_4>US</vendor_address_line_4>

<delivery_address_line_1>1433</delivery_address_line_1>

<delivery_address_line_2>test</delivery_address_line_2>

</ns0:order>

How to send this file as email attachment using mail adapter. Do I need to use 2 maps?

looks like Mail adapter is working only when we use the xsd which is given above and by providing the required details.

Kindly help me if anyone worked on mail adapters.

Thanks

Deepthi,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Deepthi,

Using XI ALL, you dont choose USE MAIL PACKAGE for It.

Since your structure is not same as Mail Package , you need not to choose USE MAIL PACKAGE.

If you want this payload as Attachment now choose the Keep Attachments.

If you still face any problem let us know..

Babu

Former Member
0 Kudos

Hi Babu,

Thank you, it is working now.

How to change the attachment file name. Right now it is going with Untitiled.xml

I want to change it to PO<PO number>.xml , I need to pass the PO number dynamically from payload.

Similarly I need to send the subject line dynamically like Pucharse Order no: <Po number>, I need to pass the Po number dynamically from payload.

Kindly help me.

Thanks

Deepthi.

Former Member
0 Kudos

I think you need to do it by using dynamic configuration

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create(

"http://sap.com/xi/XI/System/File",

"FileName");

String fileName = conf.get(key);

Former Member
0 Kudos

Hi,

Always ASMA overides the Basic Config.

Now in mapping create a Udf and set the value of THeaderSUBJECT as u want... the subject line will change accordingly..

Now to change the name of file dynamaically we have 2 ways as per my knowlwdge...

1. Go for Java mapping and in the mapping u set the file name dynamically.

Please go through /people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping

2. Using an adapter module. (Of course a small code required here, but if you are developing adapter module first time.. try to avoid it)

I guess Java mapping is best option...

Babu