cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Mail receiver adapter

Former Member
0 Kudos

Hi,

I have the following scenario, Proxy ABAP-XI -Mail. I have configured my scenario, and the payload is correctly sent to the email address that i have configured in the mail adapter, but in xml format, the point is that I have to send the attached message as txt format.

I have done the following configuration in the receiving mail adapter channel, in the module section:

<b>Processing sequence</b>

localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail

localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean XML2Plain

<b>Module configuration</b>

XML2Plain Transform.Class com.sap.aii.messaging.adapter.Conversion

XML2Plain Transform.ContentDisposition attachment;filename="Gen.txt"

XML2Plain Transform.ContentType text/plain;charset=utf-8

XML2Plain xml.REGISTRO_CABECERA.fieldFixedLengths 52

XML2Plain xml.REGISTRO_DE_DATOS.fieldSeparator ;

XML2Plain xml.REGISTRO_PIE.fieldFixedLengths 10

XML2Plain xml.addHeaderLine 0

XML2Plain xml.conversionType StructXML2Plain

XML2Plain xml.recordsetStructure REGISTRO_CABECERA,REGISTRO_DE_DATOS,REGISTRO_PIE

Maybe i missed something in my configuration, or maybe this is not the right way for doing it, can anyone help me with this??

Thanks a lot in advanced,

Luis

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member206604
Active Contributor
0 Kudos

Hi,

You can also check out this blogs and see if you can use it

/people/community.user/blog/2006/09/07/email-reporting

/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword

Regards,

Prakash

Former Member
0 Kudos

Hi Prakash,

Thanks for your answer, but your has not too much to do with my needs, i dont know how to convert the xml payload into text with the mail adapter, Ive done something wrong in my module configuration, because is still sending the attachment as xml...maybe I missed something in the module configuration, because is so strange that it doesnt try to do any kind of conversion.

Thanks,

Luis

former_member206604
Active Contributor
0 Kudos

Hi,

In the modules you need to change the content type as Text. If you do that I think it should work.

http://help.sap.com/saphelp_nw04s/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm

In the above link check for MessageTransformBean Parameters

Actually you can achive that with the method mentioned in that blog by setting the content type.

Regards,

Prakash

Former Member
0 Kudos

Hi,

Do you mean this? XML2Plain Transform.ContentType text/plain;charset=utf-8

If so, you can see in my first post that I had already done it. If isnt that please tell me a bit more clearly what you mean.

Regards,

Luis

former_member206604
Active Contributor
0 Kudos

Hi,

Hmm yes you are right... but I think your processing sequence of Modules is the problem. Actually it should be the reverse case. Change the order and try it.

Regards,

Prakash

Former Member
0 Kudos

Hi Prakrash,

how it would be?? Could you write the correct order, please?

Thanks a lot,

Luis

former_member206604
Active Contributor
0 Kudos

Hi,

1. localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean XML2Plain

l2. ocalejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail

Check out the page 13 in the following URL

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac2...

Page 8 in the following

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/99593f86-0601-0010-059d-d2d...

Former Member
0 Kudos

Thanks a lot for your help Prakash, I will try to change the order to see if it works..

Regards,

Luis

former_member206604
Active Contributor
0 Kudos

Hi Luis,

Sure try it and let us know. Once again gone thru ur post eveything looks fine. This is the problem.

Regards,

Prakash

Former Member
0 Kudos

Hi Prakash,

I have already tried with the changes you suggested and it worked out, but the problem is that the payload is filled in the body of the mail, and not like an attachment, do you know how to fix this?

thanks a lot!

Luis

Former Member
0 Kudos

That problem is already solved, the last thing is how to use the endSeparator parameter, in file content conversion it works with 'nl', but here when I set that value in the parameter value it does not work, any idea??

thanks,

Luis

former_member206604
Active Contributor
0 Kudos

Hi Luis,

Where are you trying to set 'nl' endSeprator? Do you need a new line in your mail body or this is something different? can you please explain what are you trying to do?

Just a suggestion you try out with some newline control characters.

Regards,

Prakash

Former Member
0 Kudos

Hello Luis,

you got to use <yourrecordtype>.lineSeparator value to use is \r\n

Regards,

Jasper

Message was edited by: Jasper

Jasper Brugman