How to process a text file (mail attachment) using the sender mail adapter?

Hi guys,
Is it possible to process mail attachments using the sender mail adapter? Let's say I have a structured text file (attachment) which needs to be mapped and sent to target system.
Post please any thoughts or experience.
Thanks,
Olian

Hi Olian,
Have a look at these helpful links -
1. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05&overridelayout=true
2. http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
3. http://help.sap.com/saphelp_nw70/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
Regards,
Sunil Chandra

Similar Messages

  • Problen when Sending the text file as attachment to the external mail

    HI,
    I am sending the text file as an attachment to a aexternal mai. mailing is going with text file attachment, but text file is empty. No information in the file is going, only empty text file is going. I am sending the code  iam using. Please suggest, if I need to change any passing parameters orany other other solution.
    tables: knb1,kna1,adr6,ITEMSET,bsid,TSP01.
               INTERNAL TABLES
    DATA: BEGIN OF it_kna1 occurs 0,
            KUNNR LIKE KNA1-KUNNR,
            ADRNR LIKE KNA1-ADRNR,
          END OF it_kna1.
    DATA: BEGIN OF it_email occurs 0,
            ADDRNUMBER LIKE ADR6-ADDRNUMBER,
            SMTP_ADDR LIKE ADR6-SMTP_ADDR,
          END OF it_email.
    DATA: BEGIN OF it_bsid occurs 0,
           KUNNR LIKE BSID-KUNNR,
           BUKRS LIKE BSID-BUKRS,
         END OF it_bsid.
    DATA: BEGIN OF it_final occurs 0,
            KUNNR LIKE KNA1-KUNNR,
            ADRNR LIKE ADR6-ADDRNUMBER,
            EMAIL LIKE ADR6-SMTP_ADDR,
          END OF it_final.
    DATA: BEGIN OF BUFFER OCCURS 10000,
              TEXT(255) TYPE C,
            END OF BUFFER.
    data:xtext type solix_tab." occurs 0 with header line."line.
    data:xi_pdf type soli_tab.
    DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2  WITH HEADER LINE,
          OBJHEAD LIKE SOLISTI1   OCCURS 1  WITH HEADER LINE,
          OBJBIN  LIKE SOLISTI1   OCCURS 0  WITH HEADER LINE,
          OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE,
          RECLIST LIKE SOMLRECI1  OCCURS 5  WITH HEADER LINE,
          DOC_CHNG  LIKE SODOCCHGI1,
         PARAMS   LIKE PRI_PARAMS,
         ARPARAMS LIKE ARC_PARAMS,
         DAYS(1)  TYPE N VALUE 8,
         COUNT(3) TYPE N VALUE 1,
         VALID    TYPE C,
         RECEIVER(30),
         STR(256).
    data:  spoolid    type tsp01-rqident,
           pdf_table like tline occurs 0 with header line,
           v_bytecount type i,
           itab_pdf like tline occurs 10 with header line,
          xi_pdf  like tline occurs 0 with header line,
          xi_pdf  like buffer occurs 0 with header line,
           xi_pdf_1 like xi_pdf,
           v_length(2) type p,
           html  like solisti1   occurs 0  with header line,
           xi_temp      like bapiqcmime occurs 0 with header line,
           xi_mime(255) type c occurs 0 with header line.
              VARIABLES
    data: g_email type adr6-smtp_addr,
          TAB_LINES LIKE SY-TABIX,
          G_FLAG(1) TYPE C.
         g_norm(1) TYPE C,
         g_shbv(1) TYPE C,
         g_merk(1) TYPE C,
         g_park(1) TYPE C,
         g_apar(1) TYPE C.
    data: l_lines     type i,
          line1       type i,
          l_temp(500) type c,
          l_offset    type p,
          l_lineslen(2) type p,
          l_mimelen(2)  type p,
          v_spono like tsp01-rqident,
          l_tabix       like sy-tabix.
    *****VIA SELECTION-SCREEN
    ENDFORM.                    " SEND_TO_SPOOL
    *&      Form  GET_SPOOL_ID
    *&      Form  CONVERT_SPOOL_TO_PDF
    *&      Form  SEND_MAIL
    FORM SEND_MAIL .
      data:l_lin  like sy-tabix,
            l_lint like sy-tabix,
            it_list like abaplist occurs 0,
            l_newline(2) type x value '0D0A'.
    *--Data for the status output after sending
      data: user_address like sousradri1 occurs 1 with header line,
            sent_to_all like sonv-flag.
      clear: reclist, reclist[],
             objtxt , objtxt[],
             objpack, objpack[],
             objbin , objbin[],
             doc_chng.
    *--move list to office table objbin
    *--Start of Changes to support PDF attachments - UB20030116
    loop at html.
       objbin-line = html-line.
       append objbin.
       clear objbin.
    endloop.
    loop at xi_pdf.
       objbin-line = xi_pdf-text.
       append objbin.
       clear objbin.
    endloop.
    *--We may write additional text to the main document
    *--For faxing this will be the cover page. Like sending from SAPoffice
    *--the layout set Office-Telefax will be used.
      objtxt-line = 'NOTE : Please Consider the below Headers'.
      append objtxt.
      clear objtxt.
      objtxt-line = 'Assignment -->  Purchase order number '.
      append objtxt.
      clear objtxt.
      objtxt-line = 'Document  -->   Invoice No '.
      append objtxt.
      clear objtxt.
      objtxt-line = 'Amount In DC --> Amount Due '.
      append objtxt.
      clear objtxt.
      objtxt-line = '                                            '.
      append objtxt.
      clear objtxt.
      objtxt-line = '                                            '.
      append objtxt.
      clear objtxt.
      objtxt-line = 'Please find attached statement for this week'.
      append objtxt.
      clear objtxt.
      objtxt-line = '                                            '.
      append objtxt.
      clear objtxt.
      objtxt-line = 'This is an AUTO GENERATED MAIL'.
      concatenate objtxt-line 'Please Do not reply to this mail' into
      objtxt-line separated by ' '.
      append objtxt.
      clear objtxt.
      describe table objtxt lines tab_lines.
      read table objtxt index tab_lines.
    *--Create the document which is to be sent
    doc_chng-obj_name  = 'List'.
      doc_chng-obj_name = 'SAPRPT'.
    doc_chng-obj_descr = 'Customer statement for the week'.
      concatenate 'Customer statement for '
                  sy-datum into
                  doc_chng-obj_descr
                  separated by ' '.
      doc_chng-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
    *--Fill the fields of the packing_list for the main document:
    *--It is a text document
      clear objpack-transf_bin.
    *--The document needs no header (head_num = 0)
      objpack-head_start = 1.
      objpack-head_num = 0.
    *--but it has a body
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
    *--of type RAW
      objpack-doc_type = 'RAW'.
      append objpack.
    *--Create the attachment (the list itself)
      describe table objbin lines tab_lines.
    *--Fill the fields of the packing_list for the attachment:
    *--It is binary document
    objpack-transf_bin = 'X'.
    *--we need no header
      objpack-head_start = 1.
      objpack-head_num = 0.
    *--but a body
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
    *--of type G_DOC_TYPE
    objpack-doc_type = 'PDF'. "commented on 12/13/2007
      objpack-doc_type = 'TXT'. "commented on 12/13/2007
      objpack-obj_name = 'Attachment'.
    objpack-obj_descr = 'Customer Statement'.
      concatenate 'Customer Statement' sy-datum into objpack-obj_descr.
      objpack-doc_size = tab_lines * 255.
      append objpack.
      reclist-receiver = g_email.
      reclist-rec_type = 'U'.
    reclist-com_type = 'FAX'.
      append reclist.
      data:xi type soli.
    xi-line = 'haisdgsfsdf'.
    append xi to xi_pdf.
    xi-line = 'haisdfdsfd'.
    append xi to xi_pdf.
    xi-line = 'haisfgsdfsd'.
    append xi to xi_pdf.
    xi-line = 'haisdfsgfsdgg'.
    append xi to xi_pdf.
    *xi_pdf-text = 'hai'.
    *append xi_pdf.
    *xi_pdf-text = 'hai'.
    *append xi_pdf.
    *xi_pdf-text = 'hai'.
    *append xi_pdf.
    *xi_pdf-text = 'hai'.
    *append xi_pdf.
    CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
        EXPORTING
          ip_solitab        = xi_pdf[]
       IMPORTING
         EP_SOLIXTAB       = xtext[].
    **--Send the document by calling the SAPoffice API1 module for sending
    **--documents with attachments
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = doc_chng
          PUT_IN_OUTBOX              = 'X'
         COMMIT_WORK                = 'X'
        IMPORTING
          sent_to_all                = sent_to_all
        TABLES
          packing_list               = objpack
          object_header              = objhead
         contents_bin               = objbin
          contents_txt               = objtxt
          contents_hex               = xtext
          receivers                  = reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          others                     = 99.

    HI,
    There are lots of bugs.
    Please refer this sample program to fix it.
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Best regards,
    Prashant

  • Hi friends, how to process a text file.?

    1)how to process a text file.?

    Hi Ganga,
    Use following scenarios:-
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-ii
    /people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-i
    /people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi
    /people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    Vishal
    Reward points for useful reply

  • How to attach a document using the Send mail component

    Hello,
    I would like to know how to attach a document in a email using the Send mail component.
    There are these nodes into the atom but I don't know how to use it.
    <attachment doc="/ds/grp/doc" pltype="xml">
              <xsl:copy-of select="/vpf:Msg/vpf:Body/vpf:Payload[@Role='S']/vpf:Msg/vpf:Body"/>
            </attachment>
    Does anyone know ?
    Thank you.

    Hello All,
    Regarding to the mail adapter, here are some updates:
    1. B1i will support sending HTML attachemnt via "Send Email" atom in B1 882 PL09. An example here:
    <attachment doc="test.htm" pltype="htm">
    <![CDATA[<html>
      <head>
        <title>Enter the title of your HTML document here</title>
      </head>
      <body>
        <p>Enter the body text of your HTML document here</p>
      </body>
    </html>]]>
    </attachment>
    2. In addition, B1i will support sending binary attachment and sending html content in Q1,2013.
    Thanks & Best Regards,
    Qiaoli

  • 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...

  • Why does mail sent using the MacOSX mail client not show up in my sent folder when I access my Gmail account in a browser?

    I've recently started using my first Mac, and I hooked my work email (Forwarded to Google Mail) and my personal email (Gmail) into the MacOSX mail client. Everything seemed to be going smoothly, until I noticed that sent mail from my work email through the MacOSX Mail client is not showing up in my sent box on any other clients. Sent mail does show up in my personal email in Gmail, though.
    Can anyone help me understand why mail sent from the MacOSX Mail client doesn't end up in the sent folder of my work Gmail account? I suspect it has something to do with the forwarding-to-Google process -- a sort of "too many cooks in the kitchen" situation. Has anyone heard of this problem before? What should I try?

    I've been noticing that too.  Just told me there were 6 outgoing messages, even though I did not create any new messages.
    One hypothesis is that it's generating those messages when a rule moves an email from one folder to another.
    Can someone at Apple confirm this?

  • Can't get my mail when use the USB Ethernet adapter

    I can't get my mail when use the Apple USB Ethernet Adapter. If I use a wireless connection, there is no problem. The LAN which I'm trying to connect is behind a proxy server but the Internet is working 100%.

    Hi ViK,
    This sounds like a question for the network administrator of the location. Without knowing how the proxy is set it's impossible to know what it's blocking (incoming/outgoing). It sounds like it might be filtering the incoming mail server.

  • How to Process an Empty File and deliver to the receiver channel

    Hello Gurus,
    We had a requirements to process an empty file and send it to the receiver channel .  We had successfully configured and polling an empty file, but the message output of the empty file was never sent to the receiver channel.  Is there any solution to process an empty file and move it to the receiver directory.
    XI 7.0 with latest sp
    Thanks so much in advanced,
    dn

    Thanks guys for a quick response!
    As mentioned above, we had already configured to handling "Process empty files" and were able to have the files polling successfully. The problem that we are facing is that, the output file were never created or delivered to the receiver directory. We want all files to process and deliver to the recipients even though it is an empty file.
    Thanks,
    David

  • Get filename of an e-mail attachment from the sender

    Hi,
    I have a question regarding attachments in a sender mail adapter. I have to detach the attachment and save it on the local file system. That's not the problem, I'm able to swap the payload and save on the filesystem.
    The problem is to get the orginal file name of the attachment. I see in the message monitor it is stored in the content-type, eg:
    content-type:application/octet-stream;name="filename.csv"
    How do I get the "filename.csv", to be able to save the csv file under that name on the file sytem.
    Thanks for answering.

    Yes, for PI the next SP is 11, but SP 12 corresponds with XI SP 20 and SP 14 corresponds to XI SP 21. SP 11 and SP 13 are intermediate SPs.
    Don't ask me why.
    Here the schedule:
    https://service.sap.com/~sapdownload/011000358700000294692004E/Stack_Planning.htm
    Regards
    Stefan

  • Rename the  attachment  of the Sender mail adapter

    Hello Everyone,
    i have Mail to file scenario. There is an  attachment in mail and this file needs to be renamed and dropped in FTP server. 
    is it possible to read the attachment and then rename it .
    How to achieve this solution because i could not find ASMA in sender mail adapter . so could not use Dynamic configuration.
    Regards,
    Ravi
    Edited by: Ravi Maheshwari on Feb 16, 2012 1:50 PM

    This blog could help you
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6107

  • HT1338 how can i find which files that are using the most storage?

    help please !!! because my storage availability is getting lower !

    Try a program such as Disk Inventory X or OmniDiskSweeper.
    (70433)

  • How to send concurrent program output file as an attachment in the notification mail

    Hi All,
    We are on Oracle apps version - 11.5.10.2
    We have a requirement wherein we need to send the concurrent program output file as an attachment while sending the notification mail to the user.
    Currently we have tried the approach wherein we are specifying the user id in the OPTIONS tab (Notifying the following people) while submitting the concurrent program.
    But using this approach, the user gets only the URL of the output file in the notification mail and not the output file as an attachment.
    Kindly let us know if anyone has incorporated the logic to send the output file as attachment in the notification mail.
    Please Note - We do not want any custom code to be written to send the attachment.
    Any pointers to this will be helpful.
    Regards,
    Shruti

    Hi All,
    We are on Oracle apps version - 11.5.10.2
    We have a requirement wherein we need to send the concurrent program output file as an attachment while sending the notification mail to the user.
    Currently we have tried the approach wherein we are specifying the user id in the OPTIONS tab (Notifying the following people) while submitting the concurrent program.
    But using this approach, the user gets only the URL of the output file in the notification mail and not the output file as an attachment.
    Kindly let us know if anyone has incorporated the logic to send the output file as attachment in the notification mail.
    Please Note - We do not want any custom code to be written to send the attachment.
    Any pointers to this will be helpful.
    Regards,
    Shruti

  • Process a text file?

    hi..
      How 2 process a text file?
    bye.

    Hi,
    Have a sender file adapter and do the Content conversion...
    <a href="/people/sukumar.natarajan/blog/2007/06/12/content-conversion-in-sender-file-adapter--2-new-useful-parameters Conversion in Sender File Adapter</a> by Sukumarar
    Also go thru this wiki
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/flatFILETOFLATFILE&">File - XI - File</a>
    Regards
    Santhosh
    Remember to set the thread to solved when you have received a solution
    [url=Use a Good Subject Line, One Question Per Posting - Award Points;  Use a Good Subject Line, One Question Per Posting - Award Points[/url]

  • Using the Mail content and Mail Attachment in the mapping

    Hi,
    I have a requirement in which I need to read a file from the mail server and I am using the sender mail adapter for this. I have to convert the attachment of the mail in to the payload. To do this I am using the payload swap bean and mail transform bean. Now the issue is I have to get the information from both attachment and the mail content and need to map it to the target message. Please let me know how to do this.
    Thanks!
    ~Vaas

    Not sure if there is a staright forward way to achieve this.
    But I can think of a work around for your scenario.
    >>To do this I am using the payload swap bean and mail transform bean.
    Instead of doing it this way, try
    1. Message Transform bean that will transform the payload(content of the mail) to XML.
    2. PayloadSwapBean to switch Payload and Attachment.
    3. Message Transform bean to transform the attachment to XML.
    4. Custom adapter module to read the attachment, contnet and create your own desired XML.
    Alternatively, step 4 could be replaced by a Java mapping doing the same operation.
    Regards
    Jai

  • How to send mails in HTML format from the send mail step of workflow?

    Hi,
    I have a requirement where I need to send mails in the html format from the send mail step of the workflows.
    But what I found out that the html tags are not renderd and as such the output is in plain text.
    I know that there is an alternative of using an activity step and use my own custom code from within there,But due to certain business constraints, I need to use the send mail step only.
    My SCOT settings are all right.
    Please let me know how it can be done.
    Thanks,
    Samrat.

    Samrat,
    It can't be done, you have to use your own activity step.
    What are these constraints that refrain you from doing that?
    Rgds,
    Patrick

Maybe you are looking for

  • Lion, Boot Camp and Windows 7 Issues

    Couple of questions regarding Lion, Boot Camp and Windows 7... I never had issues with Snow Leopard and setting up Windows 7 on my iMac (expcept the dreaded black screen after restart, bu got that fixed) Let me start off with my specs and then I will

  • Problem in Extended Idoc

    Hi All, I have Extended ORDERS05 for adding custom fields for inbound process, Steps i have fallowed to create Extend Idoc: 1,Created new segment with all Z-fields and released, 2,Created Extension Idoc with reference standard Idoc ORDER05, and added

  • Noise on export

    New development engine is really great, but there is an issue which did exist in LR3 and got much stronger in LR4 beta, Very often the image visible in Develop module looks much better noise wise than the one which is exported out. Take a look at the

  • SYNC problem  after os4

    Once I have upgraded os to os4, none of my contacts are getting synced into iphone (old 3g) with outlook 2007 and Windows 7. Have tried all options on support but none works, anyone please help, its terrible without contacts... INDIA <Edited by Host>

  • HAVING A HARD TIME WITH SPRY MENU BAR - #2

    To V1: Thanks for the answer - it took care of the problem. After I changed the links in the site to absolute,  another problem occurred: the links only function  on the uploaded site, not in DW (when I click on "preview in browser" in DW, the link i