How to handle Multiple attachments in sender Mail Adapter
Hi,
In our requirement is mutiple documents send through mail adapter, In custom java module we read the each document details and do it bussiness process. But now i am not able to read the multiple files at a time. we are able to read single file only. So plz give the solution for that.
1) How to send multiple attachments(like word, PDF, JPG etc..) using mail apapter.
2) How to read multiple attachments in custom java module.
Thanks & Regards
Vijay
Hi Vijay,
Go through this weblog this explains steps to multile attachments.
/people/sravya.talanki2/blog/2006/01/12/xi-triggering-e-mails-with-multiple-attachments--problems
Regards,
Ashwin.
Similar Messages
-
How to handle multiple attachments in XI mail sender adapter?
Hi,
is it possible to handle multiple attachments in a mail receiving in XI?
Our customer wants to send us mails with multiple attachments and we have to convert each attachment to an idoc.
But as I know XI (receiving mails) can handle only a single attachment in a mail. Is it true?
Any ideas?
Thanks a lot!
Regards
WolfgangHi Wolfgang,
Well, although I have never tried a scenario of picking more than two attachments from one mail, I wonder if its possible in the first place!
Here are the reasons why I think it is possible:-
It is not mentioned anywhere in the SAP Notes for mail adapter that it is not possible.
*It is not mentioned anywhere in the SAP help documentation that it is not possible
*Also, I think if the receiver mail adapter can create more than one attachment, the sender should be able to pick more than one!:)
Have you tried defining a PayloadSwapBean module to pick up more than one attachment?
Just try experimenting with this particular part of the module code:-
Content-Disposition: attachment;filename="MailAttachment-1.xml"
Content-Description: MailAttachment-1
I think even the following weblog might be able to help you to a certain extent:-
"Receiving E-Mail and processing it with ABAP - Version 610 and Higher" - /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
Regards,
Sushumna
Regards,
Sushumna -
How to handle multiple responses in Receiver Mail adapter?
Hello,
I have a scenario where I get n number of responses which has to be sent as an email.
My response looks like this -
<Response>
<Status/>
<Text>TEST 1</Text>
</Response>
<Response>
<Status/>
<Text>TEST 2</Text>
</Response>
Please let me know if there is any way to send this response as email.
ThanksHello,
Check below mapping and change it as per ur source (response) and target (content) fields.
Note - In below mapping i have used return as xml functionality on Record node, u have to use the same on ur source field.
After implementing above mapping, just execute ur E2E scenario and check how content is getting generated in ur mail?
Thanks
Amit Srivastava -
How to attach Multiple attachments to single mail
How to attach multiple pdfs to single mail ?
or
how to attach one pdf & One excel & One word document to single mail ?
Thanks In AdvanceHello Karunya,
Please refer to the link below.
https://wiki.sdn.sap.com/wiki/display/Snippets/Send%20email%20with%20multiple%20zipped%20attachments
Regards,
P Bansal -
Multiple attachment in sender mail adapter with PI 7.11
Hello all,
I've got a scenario MAIL -> PI -> MAIL.
In my sender adapter mail, i have two attachment.
From what i've saw on different thread, it wasn't possible to handle this case in standard with PI 7.0.
Is it possible now with PI 7.11 ? Or must i develop a specific module for that ?
Thank you.Hi Jean ,
I got the same issue too, the Scenario is MAIL ->FILE . Mail Sender Adapter picks up the 1 PDF attachment and saves in network folder successfully but not multiple attachments of a mail.
These are the setting in Module configuration I made:
1. The IMAPS was used in Mail Sender Adapter : imaps://10.192.101.16:993/Inbox
*IP address of the Mail Server was got from the Admin )
2. Ports : 143, 993 are opened for the Mail Server to access for XI SERver ( Raised an Ticket to open Ports of Mail server :NZTxxx.dknz.nzcorp.net)
3. As the attachment was only in PDF : Added swapbean in Module tab as below :
Process Sequesnce :
-Make sure: AF_Modules/PayloadSwapBean Modul key : TRANSFORM is added before sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
-And under Module Configuration select : TRANSFORM as Module Key and add >
swap.keyName Content-Disposition
swap.keyName Content-Description
swap.keyValue attachment;filename='MailAttachment-1.pdf"
swap.keyValue MailAttachment-1
-IF you get to know how to fetch multiple attachment , Please update.
Thanks,
Vara -
Read multi-tabbed excel file attachments from Sender Mail Adapter.
There is a need to read excel attachments from incoming email to a
mailbox. We know we can use Sender Mail adapter to easily read .xml, .txt
or .csv attachments.
For excel attachments we know from SDN that you have to write
adapter modules to handle excel. However the excel file we need to read has
multiple worksheets(tabs) and data may be contained in any of them.
Is it possible to use SAP XI Mailsender adapter to read such a file as an attachment? What kind of module development would we need for this? I am not much of a Java programmer so examples or links to other documentation would help.
Thanks,
RudraRudra,
Use Java Mapping. There is a free java api available called JExcelAPI to achieve this.
Shabarish's blog describes about this. This might be helpful to you
/people/shabarish.vijayakumar/blog/2009/04/05/excel-files--how-to-handle-them-in-sap-xipi-the-alternatives -
How to define multiple recipents for send mail option
Dear all,
I am trying to send mail to multiple recipients. can some help me with a solution as we donot have orgnizational chart maintained in our organization.
also
is there some study material for how to use expression in send mail option
thanks in advance.
Best of regards,
Gaurav SoodI don't know if there is a comparable FM like SO_USER_READ_API1 that uses a table for SOUDNAMEI1. I simply create a table of SOUDNAMEI1, loop SO_USER_READ_API1 adding to recipients and then SEND.
This what you referring to?
if there is a comparable FM, let me know. I don't 'see' any in package SO's FGs.
Rick -
How to save multiple attachments in Lion Mail?
In Snow Leopard Mail, I can save multiple attachments to my Downloads folder with one click. In Lion Mail, I see no way to save attachments except by right-clicking on them one at a time. I must be missing something. Information appreciated.
I believe you are missing something. I'm not on my Mac right now but there should be a setting where to save attachments and also muiltiples at one time.
-
Does anyone know how to download multiple attachments in icloud mail?
Have tried looking for an answer for this for a long time, but it seems its not possible. Or am I wrong?
The problem with mail is it uses a huge amount of broadband. Also takes up a lot of disk space. Thats why I use icloud mail. On both my imac and laptop I would be using double the broadband.
Sounds like there is no way to download several attachments at once on icloud mail? -
Sender Mail Adapter Configuration - Process Multiple Attachments
Dear sirs,
I need to process several attachments at the same mail message as individual payloads.
In default configuration of sender mail adapter only the body of message is used as payload.
So I added PayloadSwapBean Module at Processing Sequence and it processed the attachment I set in Module Configuration. I'm not able to process all attachments available, just one attachment is sent to PI pipeline.
How can I process all attachments of a single mail message?
Thank you in advance.
Fabio PurcinoHi Jose,
We are trying to implement reading multiple attachment in sender mail adapter.
Our Requirement is : Reading a mail having multiple .xls files. This should be read and converted to payload .
package multiswap;
//import com.sap.aii.adapter.xi.ms.XIMessage;
import com.sap.aii.af.lib.mp.module.*;
import com.sap.aii.af.lib.trace.Trace;
import com.sap.aii.af.sdk.xi.mo.Message;
import com.sap.aii.af.sdk.xi.mo.MessageContext;
import com.sap.aii.af.sdk.xi.mo.xmb.XMBMessageOperator;
import com.sap.aii.af.sdk.xi.mo.xmb.XMBPayload;
import com.sap.aii.af.sdk.xi.util.PayloadType;
import com.sap.aii.af.service.auditlog.Audit;
import com.sap.aii.af.service.cpa.*;
import com.sap.engine.interfaces.messaging.api.MessageDirection;
import com.sap.engine.interfaces.messaging.api.MessageKey;
import com.sap.engine.interfaces.messaging.api.Payload;
import com.sap.engine.interfaces.messaging.api.auditlog.AuditLogStatus;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Locale;
import javax.ejb.*;
public class MultiSwapRead
implements SessionBean, Module
private static final String VERSION_ID = "$Id: //tc/xpi.af/NW731EXT_07_REL/src/_af_application_ejb_module/ejbm/api/com/sap" +
"/aii/af/app/modules/PayloadSwapBean.java#1 $"
private static final Trace TRACE = new Trace("$Id: //tc/xpi.af/NW731EXT_07_REL/src/_af_application_ejb_module/ejbm/api/com/sap" +
"/aii/af/app/modules/PayloadSwapBean.java#1 $"
private static final String SIGNATURE_PROCESS = "process(ModuleContext , ModuleData)";
protected Hashtable cachedChannels;
protected SessionContext myContext;
public MultiSwapRead()
cachedChannels = new Hashtable();
public void ejbRemove()
public void ejbActivate()
public void ejbPassivate()
public void setSessionContext(SessionContext context)
myContext = context;
public void ejbCreate()
throws CreateException
public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
throws ModuleException
if(TRACE.beLogged(200))
TRACE.entering("process(ModuleContext , ModuleData)", new Object[] {
moduleContext, inputModuleData
ModuleData outputModuleData;
Iterator itr;
outputModuleData = inputModuleData;
String chid = moduleContext.getChannelID();
TRACE.infoT("process(ModuleContext , ModuleData)", ModuleCategories.SAP_MODULE_ROOT, (new StringBuilder()).append("performing payload swap for channel ").append(chid).toString());
LookupManager lman = LookupManager.getInstance();
Channel chan = null;
try {
chan = (Channel)LookupManager.getInstance().getCPAObject(CPAObjectType.CHANNEL, chid);
} catch (CPAObjectNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (CPAException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
Direction direction = chan.getDirection();
String swapkey = moduleContext.getContextData("swap.keyName");
String keyvalue = moduleContext.getContextData("swap.keyValue");
Object obj = inputModuleData.getPrincipalData();
Object pivotedObj = inputModuleData.getSupplementalData("mp.pivoted");
boolean pivoted = pivotedObj == null || !(pivotedObj instanceof Boolean) ? false : ((Boolean)pivotedObj).booleanValue();
Message mo = null;
if(obj instanceof com.sap.engine.interfaces.messaging.api.Message)
mo = (Message)((com.sap.engine.interfaces.messaging.api.Message)obj);
} else
if(obj instanceof MessageContext)
mo = ((MessageContext)obj).getMessage();
} else
TRACE.warningT("process(ModuleContext , ModuleData)", ModuleCategories.SAP_MODULE_ROOT, "no message found");
if(mo != null && XMBMessageOperator.numberOfPayloads(mo) > 0)
// String midstr = XMBMessageOperator.getMessageId(mo).toString();
MessageKey auditkey = new MessageKey(((com.sap.engine.interfaces.messaging.api.Message) mo).getMessageId(), com.sap.engine.interfaces.messaging.api.MessageDirection.INBOUND);
itr = (Iterator) mo.getAttachments();
if(swapkey != null && keyvalue != null)
StringBuffer textSwappingbyBuf = new StringBuffer();
textSwappingbyBuf.append("Swap: swapping by '").append(swapkey).append("' ? '").append(keyvalue).append("'");
String textSwappingby = textSwappingbyBuf.toString();
TRACE.infoT("process(ModuleContext , ModuleData)", ModuleCategories.SAP_MODULE_ROOT, textSwappingby);
Audit.addAuditLogEntry(auditkey, AuditLogStatus.SUCCESS, textSwappingby);
while (itr.hasNext()){
boolean swappedp = swapPayloads(mo, swapkey, keyvalue);
String swappedStatus = swappedp ? "Swap: successfully swapped" : "Swap: no matching payload found";
Audit.addAuditLogEntry(auditkey, AuditLogStatus.SUCCESS, swappedStatus);
} else
StringBuffer textInvalidBuf = new StringBuffer();
textInvalidBuf.append("Swap: parameter missing ");
if(swapkey == null)
textInvalidBuf.append("swap.keyName");
if(swapkey == null && keyvalue == null)
textInvalidBuf.append(" and ");
if(keyvalue == null)
textInvalidBuf.append("swap.keyValue");
String textInvalid = textInvalidBuf.toString();
TRACE.warningT("process(ModuleContext , ModuleData)", ModuleCategories.SAP_MODULE_ROOT, textInvalid);
Audit.addAuditLogEntry(auditkey, AuditLogStatus.WARNING, textInvalid);
} else
String messageEmpty = "Swap: message is empty or has no payload";
TRACE.infoT("process(ModuleContext , ModuleData)", ModuleCategories.SAP_MODULE_ROOT, messageEmpty);
return outputModuleData;
private static boolean swapPayloads(Message mo, String swapkey, String keyvalue)
swapkey = swapkey.toUpperCase(Locale.ENGLISH);
keyvalue = keyvalue.toUpperCase(Locale.ENGLISH);
int ifound = -1;
for(int i = 0; i < XMBMessageOperator.numberOfPayloads(mo); i++)
XMBPayload pldi = XMBMessageOperator.getPayload(mo, i);
String pldivalue = null;
if(swapkey.equals("PAYLOAD-DESCRIPTION"))
pldivalue = pldi.getPayloadDescription();
} else
if(swapkey.equals("PAYLOAD-NAME"))
pldivalue = pldi.getPayloadName();
} else
pldivalue = pldi.getContentAttribute(swapkey);
if(pldivalue == null)
continue;
pldivalue = pldivalue.toUpperCase(Locale.ENGLISH);
if(pldivalue.indexOf(keyvalue) < 0)
continue;
ifound = i;
break;
if(ifound >= 0)
XMBPayload pldfound = XMBMessageOperator.getPayload(mo, ifound);
if(pldfound.getPayloadType() != PayloadType.APPLICATION)
XMBPayload pldapp = XMBMessageOperator.getApplicationPayload(mo);
if(pldapp == null)
pldfound.setPayloadType(PayloadType.APPLICATION);
} else
pldapp.setPayloadType(PayloadType.APPLICATION_ATTACHMENT);
pldfound.setPayloadType(PayloadType.APPLICATION);
TRACE.infoT("process(ModuleContext , ModuleData)", ModuleCategories.SAP_MODULE_ROOT, "successfully swapped");
return true;
} else
TRACE.warningT("process(ModuleContext , ModuleData)", ModuleCategories.SAP_MODULE_ROOT, "no matching found");
return false;
We couldn't go further. Please have a look in highlighted code.
Regards,
Kesava. -
Support package of attachment for Sender mail adapter
can anyone tell me after which support package XI supports
Attachments in sender mail Adapter.
Thanks
Sunil Singhhi sunil,
check this links
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
http://www.sapag.co.in/SAP-XI-Mail-Adaptor-FAQ'S.html
regards
srinivas -
How to select multiple recipients in iPad mail
I have read that I can't create groups, but how to select multiple recipients in iPad mail?
I was looking for this when setting up for two new people who are going to have the iPad as their only device.. and they do need to email a bunch of people at once..
I was sending out the 'I have a new email address' BCC for them.
Thanks.You can select multiple contacts by tapping on the + sign in the upper right corner in the To: field when you are typing a new email. Just keep tapping the + sign and your contacts will pop up in a window. Select the contact that you want to add, repeat the process in order to add as many recipients as you want.
There are other mail apps that let you creat groups and email to those groups.
https://itunes.apple.com/us/app/group-email!-mail-client-attachments/id380690305 ?l=es&mt=8
https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
I am sure there are other, but those are two that I know of. -
How to download / read text attachment in Sender Mail Adapter IN XI
Hi
I would like to know how to download / read text attachment in sender mail Adapter & sent same attachment to target system using file adapter.
Please help how to design / resolve this concept.
Regards
DSRI would like to know how to download / read text attachment in sender mail Adapter & sent same
attachment to target system using file adapter.
Take help from this blog:
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
From the blog:
However in most cases
our message will not be a part of the e-mail's payload but will be sent as a file attachment.
Can XI's mail adapter handle such scenarios? Sure it can but with a little help
from the PayloadSwapBean adapter module
Once your message (attachment) is read by the sender CC, you can perform the basic mapping requirement (if any) to convert the mail message fromat to the file format.....configure a receiver FILE CC and send the message...this should be the design...
Regards,
Abhishek. -
How to accept multiple attachments on selection screen?
Hi All,
I need to know how to accept multiple attachments on selection screen and send them as email to external system (outlook).
Basically, my req is to send a common email with attachments to certain users. These users are displayed in ALV. User will select ALL or specific user from ALV and send an email with message entered on selection screen.
I used text editor control to input message body. I need to know how to accept attachments and send them.
Appreciate any inputs.
Thanks,
SKJSAP uses a nifty little button called 'Object Services' on ME23N (top left) which you can use to attach documents to business objects.
http://help.sap.com/saphelp_nw70/helpdata/EN/be/3fe63659241157e10000009b38f889/frameset.htm
It's a complicated way of doing it but might give you extra functionality in the long run. -
How to handle multiple actions in the webservice ?
Hi Guys,
I have multiple operations in the webservcie and under soap action in the receiver soap adapter, i dont know how to handle multiple soap operations.
can anybody guide me, how to acheive this ?
Thanks,
sriniHi Srini !
This weblog shows the general design of a scenario with BPM
/people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm
This link:
http://help.sap.com/saphelp_nw04/helpdata/en/de/766840bf0cbf49e10000000a1550b0/content.htm
show how to insert a predefined BPM pattern. You could use one of the BpmPatternSerialize.... patterns to see how you BPM should look like...
Basically it should be:
1) Receive Step (async/sync, as you need) to trigger the BPM
2) Send step (sync) for first webservice
3) Send step (sync) for second webservice
N) Send step (sync) for N webservice
N+1) if the whole communication is sync, here you need to use a send step to return back the answer to sender.
Regards,
Matias.
Maybe you are looking for
-
ComboBox scroll and selected/highlight on glasspane
I'm using JInternalFrame as a modal frame( we couldn't use JDialog). For that I used an example that i found on net, which in this way the JInternalFrame is added to GlassPane of JFrame . On JInternalFrame there is a JComboBox. When I drag its scroll
-
Error in installing erp 4.7
ERROR 2010-08-23 19:26:03 MSC-01003 ESyException: ESAPinstException: error text undefined ERROR 2010-08-23 19:26:03 FJS-00012 Error when executing script. ERROR 2010-08-23 19:26:03 FCO-00011 The step fillR3loadPackageTable with step key SAPSYSTEM|
-
OAS 10G 10.1.2 Oracle_Home Size = 5GB Plus
Dear Experts, I have installed OAS 10G 10.1.2 (Forms & Report Services) five months before. My problem is the size of Oracle_Home which is now 5.15 GB. Which may effect on performace of OAS as currently i need to restart the report server daily. Plea
-
Portal - bursting via attribut "e-mail" in InfoObject 0PROJECT
Hello We are facing a problem in SAP Portal. Via Infoobject 0PROJECT (with customer display attribut zemail) we intend to burst a workbook to the appropriate user entries in the project. After executing we get the error message in a separate window
-
Business Catalyst Website with CC
I was under the impression that I got a free Business Catalyst account with my Creative Cloud, however the site I created is unuseable unless I upgrade it.