on 04-11-2009 9:52 AM
Hello Experts,
I am using Asyn Proxy to Mail Scenario.
Mail receiver adapter generating the Mail with Excel file attachment by using the following details.
R3 coding (Proxy calling code):-
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-FROM = From Mail ID.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-TO = To Mail ID
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-SUBJECT = 'Alert Mail'.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-DATE = SY-DATUM.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT_TYPE = 'application/vnd.ms-excel;name="filename.CSV"'.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT = 'Field1,Field2,Field3'.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT_DISPOSITION = 'attachment'.
ID COnfiguration:-
-->Selected the Use Mail Package & Content Encoding = base64
-->Selected the Keep Attachment option.
I have two questions as mentioned below.
(1)Can i generate the Mail BODY and Excel file attachment both together in a single mail?
(2)With this same IR & ID Objects can i generate only Mail body without any attachment (i.e.
by changing the Content_Type in R/3 coding) ?
Please suggest.
Thanks & Regards
Jagesh
Hi.
>>>1)Can i generate the Mail BODY and Excel file attachment both together in a single mail?
sure you can do this
just send the excel as a proxy attachment and map something to the main message and this will be the mail body
this can be done in standard
for sending attachments with the use of proxy you can have a look at
one of my blogs in which I describe how to do that
>>>(2)With this same IR & ID Objects can i generate only Mail body without any attachment (i.e.
by changing the Content_Type in R/3 coding) ?
you can generate the body only if you don't send the attachment that's all
BTW
there is no need to use mail package in both cases I believe
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michal,
Thanks for ur reply.
I referred your Blog /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments for genreating the
Mail With attachment and Content together.
but when I select the option KEEP ATTACHMENT in the Mail Receiver Adapter and sending only the Content data without any attachment coding as shown in this Blog then also i am getitng attachment(.txt) file and no mail content. In this case i have used the following R/3 coding.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-FROM = From Mail ID.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-TO = To Mail ID.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-SUBJECT = 'subject'.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-DATE = SY-DATUM.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT = 'How are u? This is Mail Content'.
Calling the Proxy method.
Important:- with this same coding if i deselct the KEEP ATTACHMENT option in ID then i am geeting
Mail Content properly.
So i think i have to use different communication chaneel one for the Excel file attachment and second for the Mail content.
Please suggest me if i am wrong.
Regards,
Jagesh
Hi,
have a look at this blog /people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
Both the message contents and attachment are generated.....JAVA ampping is used (as against the ABAP coding used by you)...so if you are open to change the invocation pattern then have a look at it.
Regards,
Abhishek
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.