Converting Sender File as attachment using PayloadSwapBean module

Hi Expert,
I have a scenario where I have to pick up a file from PI & send it to another PI server as an attachement using XI Adapter.
I went through SDN & found several messages describing configuration for attachement for mail & SOAP adapter.
I attached PayloadSwapBean in my sender File channel & passed keyname as Conent-Disposition & keyValue as attachment however I dont see file being converted as an attachment in SXMB_MONI. It still shows it as main payload.
Please help me on how to convert a sender file payload into attachement. I would like to keep attachment name same as file name. Let me know how we can do that. I also noticed that on receiver XI adapter (which I would be using to send data to next PI system), you can't attach modules. Let me know if there is some other standard way of achieving this requirement.
Thanks
Regards
Sushil

Hi Stefan,
No, I dont see dynamic configuration values in second PI system. I am able to see them in first system.
Hi Amol,
Do you see dynamic configuration in second PI? I am still referring ASMA in second PI system as file parameters? Should it be HTTP header? (How are you referring ASMA in second PI). Below is my code which give me null at run time.
DynamicConfiguration dCon =(DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dKey = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","Directory");
String FileDirectory = dCon.get(dKey);
return FileDirectory;

Similar Messages

  • Sending File as attachment using Mail adapter with naming convention

    Dear All,
    I am working on a scenario in which my sender file adapter is sending one file named 'ABC.ok' in one of the folders in application server. I have to send the same file with the same name  to one of the folders at FTP and also to my customer at his email id.
    I have used File Content onversion at the receiver side and has selected adapter specific attributes due to which the required file is getting generated at FTP folder with the same name as that of the source. But how to send the same file using the mail adapter by keeping same name as "ABC.ok". Kindly guide me out in this.
    Regards,
    NJ

    what you need to do:
    1) Select ASMA in Sender and receiver File CC...already done
    2) Using the Dynamic Config UDF get the sender file name in the field Content-Type...for this you need to have a return statement in your UDF
    3) now before pushing this file name to the Content-Type you have to append (concat)the actual type of the file content (xml, txt)
    so your entire Content-Type node will have something like text/plain; name="abc.ok"
    SAP Note has reference on how to do this:
    https://service.sap.com/sap/support/notes/856599
    From the note:
    Q: How can I set the file name of a mail attachment?
    Regards,
    Abhishek.

  • Send files as attachment with BCS-methods

    Hi,
    I want to load file(s) from application server
    and send it as attachment per mail.
    In 4.6c I had a program with fm 'SO_DOCUMENT_SEND_API1'
    that worked fine. But not any longer in 7.01.
    So i tried it with the new method of BCS*
    But it worked not fully correct.
    German mutations are not correct.
    and e.g. in excel ther is a message "too many columns" although there're only 130 col.
    In 4.6 I opend the data file(s) in binary mode and saved it to solix
    Which addition I must choose to the open-command?
    And what I have to note by the converting method  cl_bcs_convert=>string_to_solix?
    Do you know a sample program to my problem ?
    In BCS_EXAMPLE* I did not found anyone
    thanks
    Andreas
    Edited by: Andreas Mann on Oct 25, 2011 4:22 PM

    I do have sample code
    sending email with attachment using BCS,
    i can only post it by thursday,
    currently refer this.. i will post sample code later
    DATA lt_message TYPE bcsy_text.
    DATA lv_mail_title TYPE so_obj_des.
    DATA document TYPE REF TO cl_document_bcs.
    DATA recipient TYPE REF TO if_recipient_bcs.
    DATA send_request TYPE REF TO cl_bcs.
    DATA sent_to_all TYPE os_boolean.
    DATA bcs_execption TYPE REF TO cx_bcs.
    DATA email_id TYPE ADR6-SMTP_ADDR
    send_request = cl_bcs=>create_persistent( ).
    *Create Title
    CONCATENATE 'Mail Subject' '-' 'xxx'
    INTO lv_mail_title RESPECTING BLANKS.
    *Create Message(EMAIL Body)
    APPEND '<p>Dear Sir/Madam</p>' TO lt_message.
    APPEND '<p>The Message body.......</p>' TO lt_message.
    APPEND '<br>' TO lt_message.
    *Create Document
    document = cl_document_bcs=>create_document(
         i_type = 'HTM'
         i_text =  message_body
         i_subject = subject ).
    *Add Attachement
    document->add_attachment(..
    ...). "Check this method
    *Add document to email
    send_request->set_document( document ).
    recipient = cl_cam_address_bcs=>create_internet_address(
    i_address_string = email_id ).
    *add recipients to send request
    send_request->add_recipient( i_recipient = recipient ).
    sent_to_all = send_request->send(
    i_with_error_screen = 'X' ).
    COMMIT WORK.
    IF sent_to_all = 'X'.
    MESSAGE s398(00) WITH 'Message Sent Succesfully'.
    RETURN.
    ENDIF.
    thanks & regards,
    suji

  • Send file as attachment

    Hi,
    I recently switch from a complete Windows envrionment to a Mac one. I use a MacBook air with Mac OS X Lion.
    I recently installed Office for Mac 2011 to use Outlook 2011 with my Exchange. I changed the setting in the Mail app and Outlook to use my Outlook as default mail client.
    There's still something I need to correct. When I "right-click" a file and select send file as attachment, it opens the Mail App to send it. I don't know how to completely switch to Outlook. I don't care about not using mail app at all.
    I've tried a couple of things, like deleting com.apple.LaunchServices.plist but I still have the same issue.
    Any suggestions ?
    Thanks

    That service is hard-coded to Mail and can't be changed through any user setting. Try this workaround:
    http://www.officeformachelp.com/2010/11/create-a-service-to-attach-files-to-a-ne w-outlook-for-mac-mail-message/
    If Library in Automator does not list Microsoft Outlook, the "Create New Outlook Mail Message" action should be listed in the second pane (along with all the other Microsoft application actions).
    Regards.

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • Not able to convert word file to PDF using Adobe Acrobat 9 Standard

    Hi,
    I am not able to convert word file to PDF using Adobe Acrobat 9 Standard. When I try to convert, it starts the process and in between I am getting this prompt, as shown in figure below and the conversion process stops. The PDF is not created.
    Note: The filename 'Acr85.doc' in the above prompt keeps changing and is random.
    I tried clicking Yes, No and Cancel on the above prompt, but the conversion process just stops and PDF is not getting generated.
    I am able to create PDFs from web pages. No issues with that. Not working only with Word.
    Can someone help me with this.
    Thanks,
    Vinay Jaassiel Kankipati
    Technical Writer

    In MSWord please changes the settings as "Adobe PDF" menu => "Change Conversion Settings" goto Tab Bookmark and clicks the option Convert Word Bookmarks. Now you convert the Doc to PDF you can achieve the Bookmark.
    Hope this help you
    Sudhakar

  • How can I convert .pdf file to .doc using the free adobe reader app? when I try to convert the .pdf file it asks me to sign in. when I click on "sign in", I am taken to a service subscription page. So, no free conversions using free adobe reader app?

    how can I convert .pdf file to .doc using the free adobe reader app? when I try to convert the .pdf file it asks me to sign in. when I click on "sign in", I am taken to a service subscription page. So, no free conversions using free adobe reader app?

    As has been mentioned Adobe Reader cannot export PDF page content. Nor can it create PDF or manipulate PDF page content.
    What you can do is use one of Adobe's online subscription services. Two provide for PDF  to Word export.
    There's ExportPDF and PDF Pack.
    Be well...

  • Converting *.mpg files to mpeg4 using Quick Time Pro 7.

    Recently I have tried to convert *.mpg files to mpeg4 using Quick Time Pro 7, I managed to convert the file to mpeg4 but there is no audio in the output file.
    Is there a way to overcome this problem
    Thanks.

    ok yes thats the ploblem I have i think Qicktime Pro is thw worst converter you could get this is the program i use
    Videora
    http://www.videora.com/en-us/Converter/xcast.html
    its way better than pro give it a try its free and very easy to use
      Windows XP  

  • Converting .XSL file to RFC using File Adapter

    Hi,
    I need to convert .xsl file using XI and send an RFC. I am not sure how to do that. Do i need to write some JAVA API's for the same. Is File adapter capable of converting .xsl files.
    Any pointers are most welcome.
    Thanks in Advance
    Regards,
    Vikas

    HI,
    try in the following ways
    Write a simple XSLT mapping or java mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT or Java map as the second mapping step in your interface mapping.
    An example of the XSL code might be as follow:
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method='xml' encoding='ISO-8859-1' />
    <xsl:template match="/">
    <xsl:copy-of select="*" />
    </xsl:template>
    </xsl:stylesheet>
    OR
    see the below links
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    How to write ModuleData process exit bean in the sender file adapter
    Adapter module for file renaming
    Module processor usage in File ADapter
    Regards
    Chilla

  • FTP Sender - file as attachment

    Hi all,
    I need to build a scenario where I have two files that needs to be picked up from ftp location.
    One file needs to be attached as binary document to the second file (xml).
    How can I achieve this?
    We are using SAP PI 7.31.
    Thanks in advance!

    Hi Tim,
    Option1: You can consider the files as single zip file and then use payloadzipbean to unzip them in sender file adapter.
    Option2: You can write an adapter module with similar functionality of "Specifying Additional Files"
    Regards,
    Praveen Gujjeti

  • Want to send PDF as attachement using Java Mail

    HI,
    I am using Java mail API for sending PDF as attachment. Here is my sample code
    messageBodyPart = new MimeBodyPart();
    messageBodyPart.setDataHandler(new DataHandler("String data for PDF using iText", "text/plain" ));
    I am generating String for PDF file using iTEXT but I am unable to find out mimetype for passing into DataHandler as second paramete.
    Any idea?
    Thanks
    Shailesh

    Don't convert the data to String. It isn't text so
    you'll damage the binary content by doing that. In
    the "demos" directory of your JavaMail download
    you'll find a ByteArrayDataSource class you can use
    instead of a FileDataSource. Yes, this worked for me. I create the pdf in memory as as StringBuffer and I just changed the code from
    messageBodyPart.setDataHandler(new DataHandler(pdf.toString(), "application/pdf"));
    to
    messageBodyPart.setDataHandler(new DataHandler(new ByteArrayDataSource(pdf.toString(), "application/pdf")));
    and it worked.
    Thanks a lot for your help,
    Dennis

  • How to convert xml file to xsl using java

    Hi all,
    I have an XML file with which i need to convert(transform) it to an xsl file using java.
    I am new to converting xml file to xslt.Please send me if u have code .
    Thanks in advance
    regards
    Ram

    You seem to be asking the wrong question. An XSL file can be used to transform an XML file, but transforming an XML into an XSL does not make sense. The API for running XSL transforms on the Java platform is described here:
    http://java.sun.com/javase/6/docs/api/javax/xml/transform/package-summary.html

  • Converting flat file to XML using JMS

    Hi,
    I want to convert flat file to xml. My sender adapter is JMS,
    Can anyone tell me that how to do that conversion ? Conversion is very simple.
    Can we use File content conversion in JMS Sender ? any link or blog ? or any other idea to achieve this ?
    Regards
    Kulwinder

    Hi,
    The pdf has been removed from that link i suppose.
    Anyways, go through the below help, everything that is there in "HowToConveModuleJMS.pdf" has been mentioned in this...
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
    Hope it would surely help you.
    You can go through the below link, for better understanding..
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a05b2347-01e7-2910-ceac-c45577e574e0
    Regards,
    Swetha.
    Edited by: Swetha Reddy on Feb 26, 2009 5:30 AM

  • Issue with the sender file interfaces when using UTF-8 files

    Hello experts,
         We are having number of File to SAP interface scenarios in our business process. In the past, we are having the files coming to us in ASCII text format. Recently, because of the business process change(to handle multiple languages like Chinese), we are getting now the same files in UTF-8 format. So, we have changed the attribute File Type in the sender communication channel from Binary to Text and used encoding format as UTF-8.
    Now, when we see the processed files in PI, we are missing the Header record in the message. For example, we have the PO interface in the following format:
    Identifier     Information
    H     PO header information
    I     PO Item information
    I     PO Item information
    Once the file adapter picks this format kind of file and when we see the XML message in PI, it is just having only two Items information. The header part is not coming to PI at all and the message is trying to get processed inside SAP and therefore interface is failing.
    Additional observations made:
    u2022     We have checked the Document Offset field value too; it is initial for the interface.
    u2022     We added an empty line in the UTF-8 text file, it worked fine. But, this is not an ideal solution for us, because the system which generates these files, canu2019t handle it.
       Does any one has observed this kind of problem before? If so, can you please help me ...
    Thanks,
    Adithya K

    Thanks for all the information. Currently i've tried to use both modules (TextCodepageConversionBean and XMLAnonymizerBean) in my Sender File Adapter, but for now without any result...
    To describe the situation: i am using flatfiles which i am fetched from the file system (NFS) by the Sender File Adapter. To translate the characters to the XML strucutre, the File Content Conversion protocol is been used.
    The content conversion defines the structure base on the first two characters on each row in the flat file. This worked fine till one of our suppliers is delivering BOM characters like "EF BB BF" in the beginning of the file.The content conversion is not able to recognize my header characters in this situation, which will normally start with "01".
    Any suggestions?

  • Finder: Right Click to send file as attachment of new thunderbird email

    Hi,
    I am working with Thunderbird.
    To open Thunderbird from the Terminal with a new message and an attachment, I have to write in Terminal:
    /Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin -compose attachment='/Users/JoergMeier/Documents/2010/OpenOfficeHilfeInhaltsVerzeichnis. pdf'
    Now I would like to add an action to the context menu, to use in finder, to send the marked file as attachment of a new thunderbird email.
    How can I do this?
    Automator?
    Thx
    Joerg

    That service is hard-coded to Mail and can't be changed through any user setting. Try this workaround:
    http://www.officeformachelp.com/2010/11/create-a-service-to-attach-files-to-a-ne w-outlook-for-mac-mail-message/
    If Library in Automator does not list Microsoft Outlook, the "Create New Outlook Mail Message" action should be listed in the second pane (along with all the other Microsoft application actions).
    Regards.

Maybe you are looking for

  • Window size always changes after restart in 10.9.2. How can I fix it- as in older OS-Versions?

    Hi, I'm using OSX for a long time. Now I bought a new MBA 10' with Mavericks 10.9.2. I'm really tired about ever changing window sizes after restarting my MBA, espacialy the sidebar is skipping to a wider size, then the window, I used before turning

  • Sender JDBC Adapter - Stored procedure

    Hello all, I just read a lot of topics in this forum about this subject. I found two indications in contracdictions in the documentation :<a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm">Configurin

  • Hyperlink in pdf forms

    I want to provide a link as a static text while designing the xdp.Please help me for this. Any info. related to this is highly appreciated. Thanks in advance.

  • Wireless Mighty Mouse vs. Wired Mighty Mouse

    Hello, I am looking to buy a mouse and saw someone selling a wireless one on ebay mentioning they are selling theirs because of the lag the bluetooth has. Is this true? Is there a lag between moving the mouse and the pointer moving because of the blu

  • How to delete a field in Infotype.

    Hi All, Can anyone suggest me how to delete a field in infotype. Thanks, Chakradhar.