Sending DBF file as an email attachment

Hi,
I have a requirement to extract data from database table then send it as a DBF file in an external e-mail. By browsing the threads, i was able to create a DBF file using FM DOWNLOAD, I know this is obsolete but GUI_DOWNLOAD does not support DBF file type. This is currently stored in my local drive. This is working fine. I can view the file using FoxPro. My problem here is how to automatically send that DBF file in an email as an attachment.
I learned that FM SO_DOCUMENT_SEND_API1 can be used but I think it doesn’t support a DBF filetype. I am receiving a message something like it is not a table when I open the file in FoxPro.
Any help will be greatly appreciated. Thanks!

Change in requirement. Only store DBF in the shared folder.
Closing this thread.

Similar Messages

  • How to send text file as an email attachment havin more than 255 characters

    My requirement is to generate a text file and to send this text file as E-mail attachment. I am using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the E-mail. but here the limitation is the number of characters per line must not be more than 255 characters whereas in my case it is exceeding 1000 characters per line. could anyone please suggest me what should i do now ? Each field in the text file has to be tab delimited.

    Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
    Phil

  • Sending Flat file as an Email Attachment

    Hi,
    I have configured Mail Adapter to send XML Payload as an attachment .
    But now i need to send Flat file as an attachment using Mail Adpater . Can any body help me out in this regard

    Hi Vinay,
    Yes , steps will same as earlier, use the blog i provided you.
    *Configuring the Receiver Mail Adapter*
    For outgoing mails, you need SMTP or IMAP4 access to your mail server. To access the mail server, enter the following URL:
    smtp://YourServer or imap://YourServer/YourInbox
    By selecting the Use Mail Package checkbox, you can include additional information to the XI message payload, that is, the mail sender.
    If the mail has a plain-text format, you can select the Use Mail Package checkbox to convert the mail message to XML.
    Working with Mail Packages
    You can dynamically set the sender, receiver, and mail title by using the mail package format. When the mail package format is used, your structure of the payload must adhere to the structure of the mail package.
    You can create the mail package structure using the graphical mapping tool. The XSD of the mail package is provided as an attachment in SAP Note 748024.
    Creating a Mail Package with XSLT Mapping
    If you want to determine the mail receiver dynamically from a payload field, but want the
    payload to be sent unchanged, sometimes it is too complicated to use the graphical
    mapping tool to create the mapping. The following figure provides an XSLT example that you can use, if your original payload provides the tags sender, receiver, and subject. The XSLT will set these values and copy the whole payload to the Content tag. The original payload will be the mail body.
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:output method="xml" indent="yes" />
    <xsl:template match="*">
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
    <Subject><xsl:value-of select="//subject"/></Subject>
    <From><xsl:value-of select="//sender"/></From>
    <To><xsl:value-of select="//receiver"/></To>
    <Content><xsl:copy-of select="/"/></Content>
    </ns:Mail>
    </xsl:template>
    </xsl:stylesheet>
    When you use the MessageTransformBean module in the module processor
    configuration of the communication channel, you can directly apply the XSLT mapping to the adapter module.
    Enter localejbs/AF_Modules/MessageTransformBean as the first module. Select
    the Type Local Enterprise Bean and select a value for Module Key.
    You can also use the XSLT file for an interface mapping in the Integration Repository.
    Changing the Name and Type of the Payload
    By default, the payload of the XI message is sent as an attachment. If you use mail
    package, the mail text in the Content tag is sent as a mail body (inline). If you want to change this or influence the name of the attachment, you can do this using the
    MessageTransformBean module.
    Enter localejbs/AF_Modules/MessageTransformBean as the first module.
    Select the Type Local Enterprise Bean and select a value for Module Key.
    If you use the Mail Package, then you have to apply the Mime type in the tag
    Content_Type:
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
    <Subject>Hello</Subject>
    <From>[email protected]</From>
    <To>[email protected]</To>
    <Content>This is a mail</Content>
    <Content_Type>text/plain; charset="ISO-8859-1";
    name="MyFile.xml"</Content_Type>
    </ns:Mail>
    Exactly how the mail content is displayed at the receiver end depends on the mail client. If the customer has a different mailing system, the mail look may look different at the customer side.
    *_Sending a Mail with Attachment  (That is what you need)_*
    If you want to send a mail with a body and attachment, or with several attachments, the message sender has to provide an XI message with additional attachments. For each additional payload of the XI message, the mail adapter creates an attachment for the mail. To enable this feature, you select the Keep Attachments checkbox when configuring the mail adapter. By default, the payload of the message is also sent as an attachment. If you do not want the payload to be sent as an attachment, set ContentDisposition to inline. If you want to give each attachment a certain name, you can use the swap module. The swap module changes the main payload.
    Enter the localejbs/AF_Modules/PayloadSwapBean module as Local
    Enterprise Bean between the two modules that change the attachment names.
    Select a value for Module Key.
    You can find the name of the payload that you want to set as the main payload in the XI message monitor (SXMB_MONI).
    Useful SAP Notes
    SAP Note 748024: Here you can download the XSD structure of the Mail Package.
    SAP Note 794943: Description of the module “PayloadSwapBean”
    SAP Note 793922: Description of the module
    Hope this will help you.
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • Mail:send mail:attachment. Is there a simplest way to send a file as an email attachment ? or more correct ?

    <satellite:form  method="post" id="contact-form" enctype="multipart/form-data">
         <input type="file" name="adjunto" />
    </satellite:form>
    FTValList ftListaFichero = new FTValList(1);
    ftListaFichero.setValBLOB(ics.GetVar("adjunto_file"), ics.GetBin("adjunto"));
      <mail:send
           to="<%=to_emailaddress %>"
           from="<%=from_emailaddress%>"
           subject="Subject"
           body="<%=body %>" >
        <mail:attachment value='<%=ftListaFichero.getVal(ics.GetVar("adjunto_file"))%>'/>
      </mail:send>
    http://docs.oracle.com/cd/E29542_01/apirefs.1111/e39371/JSP/mail-attachment.html
    http://docs.oracle.com/cd/E29542_01/apirefs.1111/e39371/JSP/mail-send.html
    Regards,

    Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
    Phil

  • Starting yesterday I can scan a pdf file in from the scanner and can not send a pdf in an email attachment

    Starting yesterday I can scan a pdf file in from the scanner and can not send a pdf in an email attachment.  What happened?  Windows 8

    Adobe Reader can't scan documents. What software do you use?

  • Sending km document as an email attachment

    Hi all,
    I am trying to send a KM document as email attachment with the following peice of code. But I am getting FileNotFoundExceptio. Can anyone guide me as to where its going wrong. Any help will be appreciated.
    String filePath = "";
    ResourceContext ctx = new ResourceContext(getEP5User());
    RID rid = RID.getRID("/documents/LRForms/0000000054.pdf");
    IResource pdfResource =ResourceFactory.getInstance().getResource(rid, ctx);
    filePath =
         "irj\servlet\prt\portal\prtroot\com.sap.km.cm.docs\"
              + pdfResource.getRID().toString();
    Properties props = new Properties();
    props.put("mail.smtp.host", host);
    Session session = Session.getInstance(props, null);
    MimeMessage message = new MimeMessage(session);
    Address toAddress;
    Address fromAddress;
    Address ccAddress;
    Address bccAddress = new InternetAddress();
    MimeMultipart multipart = new MimeMultipart();
    BodyPart messageBodyPart = new MimeBodyPart();
    fromAddress = new InternetAddress("[email protected]");
    message.setFrom(fromAddress);
    toAddress = new InternetAddress("[email protected]");
    message.setRecipient(Message.RecipientType.TO, toAddress);
    message.setSubject("Subject");
    messageBodyPart.setText("Please find attached the details.");
    multipart.addBodyPart(messageBodyPart);
    messageBodyPart = new MimeBodyPart();
    DataSource source = new FileDataSource(filePath);
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName(source.getName());
    messageBodyPart.setHeader("Content-Type", "application/pdf");
    multipart.addBodyPart(messageBodyPart);
    message.setContent(multipart);
    Transport.send(message);
    On executing this code I am getting following exception.
    MessagingException javax.mail.SendFailedException: Sending failed;  nested exception is: javax.mail.MessagingException: IOException while sending message;  nested exception is: java.io.FileNotFoundException
    Thanks and regards,
    Jaydeep

    Hi,
    Did you check permissions/security zone settings on the folder/file?
    Can you access the file directly from the browser?
    Regards,
    Omri

  • Cant open a pdf file as an email attachment

    I need help. I can't open a pdf file as an email attachment. It's like my computer doesn't think reader is installed. I can open an existing file through reader. I have deinstalled and reinstalled reader and am getting the same results.

    You can save the attachment and then open it.
    We can try to help but you haven't mentioned what you are using for your email...

  • Please help!!!!!! i filled out a job application using adobe reader but i cannot send the file back via email because the file is protected with a lock. how do i unlock this file to send it?!!!!!!!!!

    please help!!!!!! i filled out a job application using adobe reader but i cannot send the file back via email because the file is protected with a lock. how do i unlock this file to send it?!!!!!!!!!

    Hi kevinv1987,
    It doesn't sound like the PDF was password protected (or Adobe Reader would prompt you for a password). Instead, it sounds like that file may be marked locked by your operating system. Are you on Mac OS or Windows? In either case, here are instructions for removing the lock icon from the file:
    Remove the Lock Icon from a Folder in Windows 7 (check Microsoft's website if you have a different version of Windows)
    On Mac OS, select the file in the Finder, and choose File > Get Info. Then, just deselect the Lock checkbox.
    Please let us know how it goes.
    Best,
    Sara

  • Create end of file character in email attachment

    Hi all,
    Currently I am attaching a text file to the email send using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    But here the issue is, in attachment file there are extra 3 blank lines are getting filled which client does't want.
    Is there any way to generate end of file character, to add after all rows got filled in internal table?
    Or is there any way to not to filled blank lines at the end of the file?
    Please advise a solution.
    Thanks and Regards
    Nishad

    Hi,
    gs_packinglist-doc_size =  gf_count * 255 .
    This is how I am passing the doc_size. In the above, gf_count is the number rows in attachment file that I am multiplying with 255 characters as I am passing attachment in contents_bin parameter.
    Thanks and regards
    Nishad

  • Pdf file sent via email attachment gets a webloc extension

    Someone sent an email with a pdf attachment to our entire school via our google mail account. People with PCs were able to open the pdf files. Mac users received the pdf files with a webloc extension (i.e. - filename.pdf.webloc) and were unable to open it. How did this happen and how can we prevent it from happening again? I had 2 of the pdf files on my mac (one of which I created) and they did not have a webloc extension. Any help would be great. Thank you!!

    Hi Kappy.
    I tried that and received a message from Adobe Acrobat that read "Adobe Reader could not open 'Absentee Ballot.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
    Since we have 300+ families who receive these emails and I don't know who has a mac and who doesn't I would rather be able to send the pdf attachments and prevent the webloc from being applied at all versus letting everyone know how to remove it once they receive it.
    Thanks for replying.
    Christina

  • Unable to send a file via my email client

    when i try to send a file via email i get the following error message : ' adobe reader could not  connect to e-mail client' - pl help.
    os; win 7 home premium[64-bit]; browser: ie9; e-mail client : hotmail & gmail

    That pretty much means you don't have an email client. This is something like Outlook Express you may have seen.
    Instead, open your email and attach the PDF.

  • How do I download a song file from an email attachment to my iPad?

    I have a song file in my email. I can hear it when I touch on it, but I want a way save it to my iPad music. I want to put it into my music so it's there on my iPad.

    Okay. This iPad is synced with my husband's iTunes. He's in California with his Mac, I'm here in New York. How do I save music from an email attachment onto the iPad.

  • Sending a file (.pdf) as an attachment via e-mail

    Hi,
    I have a selection screen with purchase order number as "select-options" and 2 radio buttons one for downloading and opening the SAP Script output to the local file and the other raido button would convert the SAP Script output into .pdf file and send that file as an attachment via e-mail to the receipent(only one).
    I'm through with the first operation. Now need to know about the e-mailing procedure and the function module(s) to be used and their import, export, etc. parameters.
    Thanks & Regards,
    Rajesh

    Re: Sending a PDF document as an attachment
    refer the above thread.
    the useful FMs in this regard are
    CONVERT_OTF
    SO_NEW_DOCUMENT_ATT_SEND_API1 to send mails with attachments:

  • Retrieve file name of email attachment

    Hi,
    it's getting more and more absurd about the fact that it is not possible to get the file name of an email attachment. It's not possible by writing a module (getName(), getContentType() nor getDescription() doesn't work) or by accessing mailadapter specific message attributes.
    I mean it's a basic requirement. Why is it so diffcult to implement it???
    -Steffen
    (frustrated)

    Hi,
    See the below links
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/9ef1680efbec4c9656eb028c44ab0b/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ad/bf93409c663228e10000000a1550b0/frameset.htm
    Mail adapter
    Regards
    Chilla..

  • Send pdf (Adobe Form) as email attachment using BCS

    Hello everybody!
    I want to send a pdf, generated by Adobe Forms function module, as an email attachment to a certain external mail receiver. I have read that the methods of the Business Communication Services can render this, but I couldn't create a working solution. Can somebody give me a coding example for this scenario?
    I would be very happy if somebody could help me!
    Best regards,
    Markus

    Hello Alex!
    your link to this document was very helpful. The scenario described in the pdf is almost what I was looking for. The only problem is, that the mail is sent to the Business Workplace Inbox. I want to send it to an external e-mail address. When I change the programm part where the recipient is defined like this:
    Create recipient
      DATA lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
      DATA l_reci    TYPE adr6-smtp_addr VALUE 'somemailaddress'.
      lo_recipient = cl_cam_address_bcs=>create_internet_address( l_reci ).
    Set sender
      lo_send_request->add_recipient(
        EXPORTING
          i_recipient = lo_recipient ).
    then no mail is sent to the recipients mailbox. I tried several variants but no mail is sent. Does somebody know how to set an external e-mail as recipient in this case?
    Best regards!
    Markus

Maybe you are looking for