Filename in sender Mail Adapter
Hi Experts,
Brief about Scenario:
Invoice generated with PDF format in R/3 system and send to mail box. XI pick that file from mail box and deposited in SFTP Server.
Landscape in XI end.
Mailbox - - - XI 7.0 - - - SFTP
The file name generated with CompanyCode_InvoiceType_InvoiceNumber.PDF from R/3 system. So that Same file name should be deposited in SFTP Server . Here CompanyCode and InvoiceType are static and invoiceNumber generated dynamically with PDF format.
My question is How to get file name from mail box.
Thanks in advance.
Hups. I forgot what was your main problem
To get attachment file name you can try to implement you own adapter module as described [here|http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Get%20Attachment%20Name?bc=true]:
I found it in this [thread|Need to get the Mail attachment name as it is to the receiver file adapter;.
Please check that thread. The question is "not answered" but the last post states it was solved that way.
Similar Messages
-
Sender Mail adapter encounters MalformedInputException
I have a sender mail adapter that processes the attached .csv file. All is working fine. I use FCC in module to convert the attachment and pass to an IDOC adapter for processing in SAP system.
My problem is sometimes the sender mail CC fails with ...........
exception caught during processing mail message[1]; com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
It only fails with some files. At the moment when we test we FORWARD the email to our email account. If I detach the failed email attachment and attach it to a NEW email it will then work.
So why does it not work when forwarding emails? But it works when I attach the same file to a new email and send?
Other threads for this error seem to point to encoding. But how do I know which to use. I currently use the following in my module config:
Transfer.ContentType application/octet-stream;charset="ISO-8859-1"I have this in my configuration:
localejbs/AF_Modules/PayloadSwapBean on local
TRANSFORM
localejbs/AF_Modules/MessageTransformBean on local
txtxml
TRANSFORM swap.keyName payload-name
TRANSFORM swap.keyValue MailAttachment-1
txtxml Transfer.ContentType application/octet-stream;charset="ISO-8859-1"
txtxml Transform.Class com.sap.aii.messaging.adapter.Conversion
txtxml Transform.ContentDescription MailAttachment-1
txtxml Transform.ContentDisposition attachment;filename="MailAttachment-1.bin"
txtxml xml.conversionType SimplePlain2XML
txtxml xml.documentName MT_BCD_INVOICES
txtxml xml.documentNamespace urn://federalmogul.com/BCDTRAVEL/FINGLOBCD001/00
txtxml xml.fieldNames COST_CENTRE,EMPLOYEE_ID,PRODUCT_GROUP,COMP_CODE,BCD_ACCOUNT,INVOICE_DATE,TRAVELER_NAME,TRAVELER_FIRST_NAME,INVOICE_NO,AMOUNT_EXCL_VAT,CURRENCY1,AMOUNT_VAT,CURRENCY2,AMOUNT_DOC_CURRENCY,CURRENCY3
txtxml xml.fieldSeparator ;
txtxml xml.lastFieldsOptional YES
txtxml xml.processFieldNames fromConfiguration
txtxml xml.structureTitle RECORDSET -
Sender Mail adapter configuration with attachment
Hi,
I read the below blog regarding the mail adapter
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
I have the same requirement but the attachment file is not an XML, it is CSV file so in the module tab if I change like below is it enough?
TRANSFORM swap.keyValue attachment; filename=u201DMailAttachment-1.csvu201D (I think MailAttachment-1 is the file name, am I correct?)
If I change like above is it ok? or any other thing is required, Could you please give me the inputs
Thanks
RameshI have the same requirement but the attachment file is not an XML, it is CSV file so in the module tab if I change like below is
it enough?
PayloadSwapBean will ensure that the input to the mapping is from the attachment.....in the blog the attachment is in XML format and hence there was no need for any conversion.....yours is however a CSV file so you need to convert it to XML first and then do the further processing.....you can either use the MessageTransformationBean as shown in this blog:
/people/gabrielsagayaselvam.panneerselvam/blog/2009/08/31/solve-key-field-problem-using-structplain2xml-in-messagetransformationbean
Or write your own module code for the conversion.
Regards,
Abhishek. -
Sender Mail Adapter with PayloadSwapBean
Hello Experts!
I have a Sender Mail Adapter receiving emails with attachments! I'm using PayloadSwapBean, because I have to manipulate (to do mapping) the XML attachment.
Sender Mail Adapter Configuration:
Default Interface Namespace = urn:mynamespace.com
Default Interface Name = abs_async_myInterface
swap.keyName = Content-Disposition
swap.keyName = Content-Description
swap.keyValue = attachment;filename="MailAttachment-1.xml"
swap.keyValue = MailAttachment-1
Well, my problems are:
1) Although my Default Interface Namespace is urn:mynamespace.com, sometimes the namespace that cames to SXMB_MONI is http://sap.com/xi/XI/System/Mail. In that case, an Receiver Determination error happens.
2) My XML can be the first (MailAttachment-1), the second (MailAttachment-2), the third (MailAttachment-3), or any other attachment position. Since my swap.keyValue is set to "MailAttachment-1", I'm able to pick the XML only if it is the first attachment.Hi Julio,
Writing an Adapter Module for the same can make your task easy.
Thanks'
Sunil Singh -
Different Attachment extension(.xls,.txt) in sender mail adapter
Hi Experts
Is it possible to use different type of attachment extension (e.g .xls,.txt) in the sender mail adapter?
My requirement is , the attachment in the mail adapter will be used as the main payload.So I am using PayloadSwapBean adapter module.
Currently I am using the following module key for .xls attachment and it is working.Configuration for .xls attachment is as follows
swap.keyName-Content-Disposition
swap.keyname-Content-Description
swap.keyName-Content-Type
swap.keyValue-attachment;filename="MailAttachment-1.xls"
swap.keyValue-MailAttachment-1
swap.keyValue-application/vnd.ms-excel.
Now, the attachment may be .xls or .txt file.
Now If I want to use .txt atachment then do I need to define all these parameter again and in that case what will be my content type for .txt file.
Your inputs required
thanks
AyanPayloadSwapBean will only convert the attachment as the main payload.
Yeah for reading excel file I have a separate custom adapter module.This is not in the scope of my question..
All I am asking , can .txt as well as .xls attachment be used in the same sender mail adapter.
If that is possible what will be my content-type for .txt or can I remove content-type and use only content-disposition and content-description so that any type of attachment it can recognise.
The momment I am specifying content-type , I am making it particular that only say .xls attachment , it will identify.
I hope I make you clear.Inputs required
Thanks
Ayan -
Email attachment name in sender mail adapter to the receiver file adapter
HI ,
Ths is regarding email to file scenario. I am trying to create file (in rceiver file adapter) with the same name as the email attachment that i read from mail sender adapter. I want ro use adapter module for this. I could find from blogs that there is module - GetAttachmentName - available that i can use for this in sender mail adapter.
Can you please let me know what whetehr i neeed to mention any module key and parameters for this.
I assume , i need to do following steps :Please confirm.
1. i can use this module - after payload swap module and before standard mail adapter module in sender mail adapter
2. select ASMA option in advanced tab in sender mail adapter
3. In receiver file adapter select ASMA option in advanced tab in sender mail adapter
4. Also select file name option in ASMA in sender mail adapter
Thanks,
VamsiHi Vamsi,
your scenario is also described here: Re: sender mail adapter - attachment name
If you use the Module getAttachmentName, which is described here,
http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0GetAttachmentName
your scenario should work as you described it.
You just need to make sure that the Attachment Name that you read in the first place, is mapped to the Filename Attribute of the
Fileadapter (http://sap.com/xi/XI/System/File/FileName).
regards,
Daniel -
Hello All,
Iu2019m reading the blog: /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step to apply in my scenario. But Iu2019m having a issue. The messages in sxmb_moni are with state waiting.
I do the same configurations of the blog. But the message go to outbound queue (SMQ2) and have a SYSFAIL with this errror: "Access via 'NULL' object reference not possible".
Anybody have any ideia what's this?Stefan,
I put just this:
localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean TRANSFORM
TRANSFORM swap.keyName payload-name
TRANSFORM swap.keyValue MailAttachment-1
The raw format of e-mails:
--SAP_913fb6e1-6fb1-11de-9ed3-0013725ef0f0_END
Content-ID: <payload-913d45e56fb111deb3b50013725ef0f0 at sap.com>
Content-Type: text/xml; name="MailAttachment-1.xml"
Content-Disposition: attachment;filename="MailAttachment-1.xml"
Content-Description: MailAttachment-1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><nfeProc versao="1.10" xmlns="http://www.portalfiscal.inf.br/nfe"></nfeProc>
SAP_913fb6e1-6fb1-11de-9ed3-0013725ef0f0_END
But the messages in sxmb_moni still was with status Scheduled for Outbound processing and not finished.
Do you have more any ideia?
Regards,
Thiago -
Does Sender Mail Adapter support "PayloadZipBean" module
Hi everyone,
I have a scenario where, I get the email with an zip file as an attachment and I need to extract this file and send across. There is no mapping transformation done here, only I need to forward the attached file to the file server.
Zip file always contains 1 file and is a text file.
so Its an Email to File Scenario.
Can I send the zip file as it is without unzipping i.e., send the attachment as iit is to the file server?
If I want to unzip the file, does the module "PayloadZipBean" support in case of sender mail adapter. ?
Thanks,
VarunHi Varun,
Use "PayloadZipBean " Module at Receiver Communication Channel in the Module Tab Set the "Module Key.mode = unzip"
and Receiver communication Channel file should be "FileName.txt".
http://help.sap.com/saphelp_nw2004s/helpdata/en/bd/c91241c738f423e10000000a155106/frameset.htm
Regards,
Naga. -
Sender Mail Adapter Attachment
Hi All
The mail I get from the 3rd party has a body and attachment. I have done the TRANSORM module as described in some of the forums, and then the Plain2XML.
On sxmb_moni I see the MailMessage and MailAttachment-1, where the MailMessage is in XML format and MailAttachment in normal text. What should I do to completely ignore the MailMessage(body of the mail) and just send MailAttachment to the receiver.
I have tried to split the message to two receivers, but because the attachment message does not transform to xml, it gives me a mapping error. Is there anyway I can either ignore the body and just send the attachment to the receiver without doing JAVA code.
Thanks in advance
ClintonHi Jin
Thanks for your answer.
This is how I am using the module within the Sender Mail Adapter.
localejbs/AF_Modules/PayloadSwapBean TRANSFORM
localejbs/AF_Modules/MessageTransformBean Plain2XML
TRANSFORM swap.keyName Content-Description
TRANSFORM swap.keyName Content-Disposition
TRANSFORM swap.keyValue attachment;filename="MailAttachment-1.xml"
TRANSFORM swap.keyValue MailAttachment-1.xml
Plain2XML Transform.Class com.sap.aii.messaging.adapter.Conversion
Plain2XML Transform.ContentType text/xml;charset=utf-8
Plain2XML xml.conversionType SimplePlain2XML
Plain2XML xml.documentName MT_TEBA_Contractor_Details
Plain2XML xml.documentNamespace http://lonmin.co.za/TEBA_to_SAP
Plain2XML xml.fieldNames ENG_TYPE,INDUST_NO,COMPANY_NUMBER,SURNAME,INITIALS,NAME,REGISTERED,MALE,EXPERIENCE,RACE,MARITAL,DEPENDENTS,BIRTH_DATE,LANGUAGE,EDUCATION,SPOUSE,RELIGION,OFFICE,SERIAL_NO,REG_YEAR,SERV_START,SERV_EXPIRE,SERV_PER,LAST_CHANGE_DATE,LAST_CHNAGE_TIME,ID_DOC,ID_EFF_DATE,ID_EXP_DATE,PASSPORT,PASS_EFF_DATE,PASS_EXP_DATE,COUNTRY,DISTRICT,ADDR1,ADDR2,ADDR3,POSTCODE,PHONE,BI_1733_NO,REASON
Plain2XML xml.fieldSeparator |
Plain2XML xml.processFieldNames fromConfiguration
Plain2XML xml.structureTitle Details
Using it like this it does not do the swap correct and it still put the data within the body as xml, and leave the attachment as txt.
Can you see something wrong here.
Thanks
Clinton -
B2B Inbound Error - sender mail adapter - SMTP
Boa tarde
Estou tendo um erro quando tento ler uma caixa de e-mail via scenario B2B inbound utilizando sender adapter mail (SMTP)
estou passando as seguintes informações no adapter sender :
Transport Protocol: POP3
Message Protocol: XIPAYLOAD
URL :smtp://sepcsawi003.xxxx.xxx.
Authentication Method : Plain
USER : monit.nfe
SENHA : XXXXX
Poll interval(Min) : 1
Keep Attachments : X
namespace : http://sap.com/xi/NFE/005a
interface name : NFB2B_procNFe_OB
Segue o log extraido do comuncation Channel Monitoring :
In the Last 20 Minutes Server 0 70_34165 not initialized
Na sxmb_moni não aparece nada.
Essa configuração está correta para uso de SMTP com sender mail adapter?
Entrei na máquina do PI e executei o comando telnet sepcsawi003 25 para acessar o servidor de email.
Recebi o retorno:
Connecting To sepcsawi003...Could not open connection to the host, on port 25: Connect failed
Meu administrador me disse que as máquina PI e Email estão se conectando.
Vocês podem me ajudar?
Abs,
Sérgio SalomãBoa Tarde
Lembrando
se for Pop3 a vc tem que ter acesso a porta 110 e IMAP4 143 se não me engano por padrão
de uma olhada nesse link
http://wiki.sdn.sap.com/wiki/display/XI/StepbyStepMailToFileScenario
não esqueça no adapter sender mail
na aba module
Processing Sequence
1 localejbs/AF_Modules/PayloadSwapBean | Local Enterprise Bean | 1
2 localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean | Local Enterprise Bean | mail
Module Configuration
1 | swap.keyName | Content-Disposition
1 | swap.keyName | Content-Description
1 | swap.keyValue | attachment; filename="MailAttachment-1.xml"
1 | swap.keyValue | MailAttachment-1
Att
Ronaldo de Moraes -
Hi,
I am working on Sender Mail Adapter. I have done the total configuration but unable to sucess the scenarios. In the CC monitoring, it is saying that "Not Intialised" Even though i send and receive the messages from My Lotus Notes Inbox. I activated all the objects.
I have done the following examples:
Transport Protocal: POP3
Message Protocal: XIALL
Given the URL and UserId and PWD also
Poll Intevel: 1 (Mins)
Adapter Status: Active
Please help to me solve this problem. I already raised the one more thread today but didn't get solutions.
<b>Note: Do i need to do any setting from the Lotus notes(Mail Server) to diver my messages.</b>
Thanks in Advance,
<b>I found the problem with SMTP Address. Can i use the SMTP Url for POP3 or IMP4 protocal. Is there any thing else because if i use the Same SMTP Address, it is giving exception</b>
Best Regards,
Vijay
Message was edited by:
Gangisetty Vijaya Bhaskarudu
Message was edited by:
Gangisetty Vijaya BhaskaruduHi Gangisetty,
SMTP is the out going server(for sending mails out) while POP3 is the in coming(receiving mails) server. So for a sender channel, you need to use the POP server details not SMTP.
cheers
danus -
Sender Mail Adapter - forcing content as an attachement
Hi all,
We are using the Sender Mail Adapter to pull emails from the inboxes of some users of an exchange server. We use the Mail Package option.
We have noticed that the content of the emails are by-default added as attachments when there are no real attachments to the emails. However the content is not added as an attachment when one or more attachments are present in these emails.
Is there a way of forcing the Sender Mail Adapter to always add the content as an attachment and keeping the other attachments as well? and of course maintain the Mail Package message type as the main payload...?
Many thanks,
AldoHi Stefan,
Thanks for your reply. I am glad to hear that I am wrong again )
In your opinion is it possible to force the Outlook Exchange server to add the content attachment every time? I mean by doing some configuration on it...?
The reason why we would like to do this is because when - in the content tag of a Mail Package message - we have MIME message parts that are of content-type text/html we are having problems in decoding the html back to a readable format.
To do this we use the apache QuotedPrintableCodec Java class.
This works fine when the content type of the message is just text/plain but we get an exception when we try with text/html.
The exception we get is:
org.apache.commons.codec.DecoderException: Invalid URL encoding: not a valid digit (radix 16): 13
I don't know if this is because of the two character sets we have in the payload (utf-8 and iso-8859-1) or if it is for other reasons...
If you could help me figure out how to forward any HTML email to another system in a readable format it would be great.
Thanks for your support,
Aldo -
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. -
Sender "Mail" adapter - CSV file attachment
Hi there
I'm looking for some help in configuring a sender mail adapter that receives ".csv" files. I did read some blogs that mention using the "PayloadSwapBean" module to read the mail attachment instead of the mail content. My problem is to now convert the ".csv" file into a message. Is there a module that I can use ( is it the "MessageTransfomBean" ) and how. Any help would be appreciated.
Thanks
SalilHi Salil,
If you want to send a mail with a body and attachments, the message sender HAS to provide an XI message with attachments. I doubt a CSV file does justice.
As Renjith said you need to convert CSV to XmL.
A short description about the Standard Modules:
MessageTransformationBean is a standard module used to apply the XSLT mapping to the adapter module by using <i>Transform.class</i> ( This xslt mapping is done to create a mail package, Dont confuse with the actual mapping in your case this is NOT for converting csv to xml).
Also this module can be used to change the name and type of payloads by using <i>Transform.contentType</i>, <i>Transform.contentDisposition</i>, <i>Transform.contentDescription</i>.
PayloadSwapbean is a standard module for replacing payloads with other payloads (SWAP)
If you want to give each attachment a certain name use Parameters, <i>swap.keyname</i> for name of the payload and <i>swap.keyvalue</i>.
I Hope the use of standard modules is understood. -
Sender Mail Adapter, technical Acknowledgement
Hi all,
I have a SMTP --> XI --> Proxy Scenario. For the inbound message I get via SMTP, I'd like to send a technical acknowledgement back to the Sender (via SMTP, too). The acknowledgement has a specific message structure, for example it contains the DocumentID of the inbound message I get via SMTP.
My idea now is: Within ReceiverDetermination, I configure two receivers:
1. Backend system for the Inbound Proxy
2. original Sender System
Within Interface Determination, I'll do 2 mappings:
1. Mapping from source message to ABAP proxy interface
2. Mapping from source message to technical acknowledgement structure
Then, receiver agreements / receiver communication channels for both interfaces.
My question now is: is there a more elegant solution then doing the scenario like described above? Maybe something I can do in the Sender Mail Adapter to create the specific technical acknowledgement and sent it back to the sending application?
Best regards
HolgerHi Holger !
XI supported acks are not available for your scenariom because the smtp/mail sender cannot request it.
http://help.sap.com/saphelp_nw04s/helpdata/en/f4/8620c6b58c422c960c53f3ed71b432/frameset.htm
You should create some kind of artificial ack, that should be part of your own protocol. What I meant with the SYNC proxy, is to use its response message as your own defined ack, because it is not supported as is.
If you call your proxy async, then you will not receive any feedback to use it as ack info.
Another idea could be to forget the ack per se, and just use define an alert in case of problems with the scenario to send a mail to the specified users.
Regards,
Matias
Maybe you are looking for
-
Flashing Question Mark on Folder Icon on Startup: Not Yet Fatal
I running into a potential problem with my White, 13" MacBook. I'm running 10.5.6 (upgraded from 10.4). I recently bought a new, larger capacity hard drive. I used the Applications "SuperDuper" to clone my existing drive onto the new drive. My comput
-
Variable in derived class more public
Hello, I thought variables in a derived class could not be more public than the variables they hide (in the base class) e.g. the "var" variable in "DerivedDemo" could not be more public than the "var" variable in Demo. (which would be the opposite to
-
How to show different JTable without flickering JFrame?
I write a simple application with 2 different tables. if user clicks "1" button, the frame will display table 1. else frame display table2. at the moment the code is like: JPanel panel1 = new JPanel(); ......//make the panel1 contains
-
How do I download my text messages to my pc so that I can send them to an email accout,????
-
Freight Charges Accounting through SLA
Dear All I have a requirement to hit different natural accounts in accounts receivable for different charges applied at order level. As all/ combine charge amount is booked in single natural account as given in autoaccounting rule - standard function