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

Similar Messages

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

  • INPUT THE END-OF-FILE CHARACTER/ CRTL-C in Jdeveloper

    I'm trynta input the end-of-file character in the program input window (JDeveloper) so i can exit the while loop below. The window accepts all other characters except the CTRL-C character sequence in windows. How does the user exit this loop?
    while (input.hasNext()) { //loop until EOF character
    try {
    //retrieve data to be input
    record.setAccount(input.nextInt());
    record.setFirstName(input.next());
    record.setLastName(input.next());
    record.setBalance(input.nextDouble());
    if (record.getAccount() > 0) {
    output.format("%d %s %s %.2f\n", record.getAccount(),
    record.getFirstName(), record.getLastName(),
    record.getBalance());
    } else {
    System.out.println("Account number must be greater than 0");
    } //end try
    catch (FormatterClosedException e) {
    System.err.println("Error writing to file.");
    return;
    } catch (NoSuchElementException e) {
    System.err.println("Invlaid input. Please try again.");
    input.nextLine();
    System.out.printf("%s %s\n%s", "Enter account number (>0), ",
    "first name, last name, and balance.", "? ");
    } //end while
    //...

    Hi,
    U need to use one class. Refer below given code.
    TYPES : BEGIN OF lt_record_input,
              rec(1000) TYPE c,
            END OF lt_record_input.
    DATA : li_record_input TYPE TABLE OF lt_record_input .
    DATA lv_cr TYPE c.
    lv_cr = cl_abap_char_utilities=>cr_lf.
    CONCATENATE '/opt/isv/cti_app/DOCU/INCOMING/PROCESSED/UNSUCCESSFUL/'
    gv_filename INTO lv_path.
    OPEN DATASET lv_path FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc = 0.
      DO.
        READ DATASET lv_path INTO lw_record_input-rec.
        IF sy-subrc EQ 0.
          REPLACE lv_cr IN lw_record_input-rec WITH space.
          APPEND lw_record_input TO li_record_input.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE DATASET lv_path.
    ENDIF.
    Hope it help u.

  • End.of.file character sequence in jdeveloper

    I'm unable to input the windows end-of-file character in the program input window (JDeveloper) so i can exit the while loop below. The window accepts all other characters except the CTRL-C character sequence in windows. How does a user exit this loop in the \\\jdev
    while (input.hasNext()) { //loop until EOF character
    try {
    //retrieve data to be input
    record.setAccount(input.nextInt());
    record.setFirstName(input.next());
    record.setLastName(input.next());
    record.setBalance(input.nextDouble());
    if (record.getAccount() > 0) {
    output.format("%d %s %s %.2f\n", record.getAccount(),
    record.getFirstName(), record.getLastName(),
    record.getBalance());
    } else {
    System.out.println("Account number must be greater than 0");
    } //end try
    catch (FormatterClosedException e) {
    System.err.println("Error writing to file.");
    return;
    } catch (NoSuchElementException e) {
    System.err.println("Invlaid input. Please try again.");
    input.nextLine();
    System.out.printf("%s %s\n%s", "Enter account number (>0), ",
    "first name, last name, and balance.", "? ");
    } //end while
    //...

    Hi,
    That charecter comes in the last field in the file as it is the end , so write a code in transformations from PSA to DSO of the last  field.
    Here i am giving the code that needs to be included in the field routine.
    DATA : INT_VAR TYPE /BI0/OIMATERIAL. (give your field insted of material)
    DATA : STR_VAR1(20) TYPE C. (give your field type here)
    DATA : VAR2 TYPE I.
    DATA : VAR3 TYPE I.
    DATA : VAR4 TYPE I.
    DATA : STR_VAR6(20) TYPE C.
    MOVE SOURCE_FIELDS-MATERIAL TO INT_VAR.
    TRANSLATE INT_VAR TO UPPER CASE .
    IF INT_VAR CN
    ',<>?/\:;"''ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890' .
    STR_VAR1 = INT_VAR+0(SY-FDPOS).
    VAR2 = STRLEN( INT_VAR ).
    VAR3 = SY-FDPOS + 1.
    VAR4 = VAR2 - VAR3.
    STR_VAR6 = INT_VAR+VAR3(VAR4).
    CONCATENATE STR_VAR1 STR_VAR6 INTO RESULT.
    ELSE.
    RESULT = INT_VAR.
    ENDIF.
    Hope this works good in your case
    Cheers,
    Srinath.

  • 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

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

  • Converting html file into zip file and send email attaching zip file

    Hi Experts,
    I am trying to send email with attachment(html). Which contains more than 7MB. So, It is throwing an error like Size exceeded.
    So, Now i need to compress the data for less than 7MB.
    I decided to convert HTML File into ZIP File.
    Kindly suggest me to convert the HTML file into ZIP file and sending email with attached ZIP file.
    Correct answer rewarded,
    Thanks & Regards,
    N. HARISH KUMAR

    Hi Experts,
    *// HTML_TAB converting into ZIP File
       DATA  : zip_tool TYPE REF TO cl_abap_zip,
               filename TYPE string ,
               filename_zip TYPE string .
       DATA  : t_data_tab TYPE TABLE OF x255,
               bin_size TYPE i,
               buffer_x TYPE xstring,
               buffer_zip TYPE xstring.
    filename = text-007.                                                                          "'HTML_TAB
    *describe the attachment
       DESCRIBE TABLE html_tab LINES tab_lines.
       bin_size = tab_lines * 255.
       CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
         EXPORTING
           input_length = bin_size
         IMPORTING
           buffer       = buffer_x
         TABLES
           binary_tab   = html_tab.
       IF sy-subrc <> 0.
    *     message id sy-msgid type sy-msgty number sy-msgno
    *     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    *create zip tool
       CREATE OBJECT zip_tool.
    *add binary file
       CALL METHOD zip_tool->add
         EXPORTING
           name    = 'FSSAI_MAIL.HTML'
           content = buffer_x.
    *get binary ZIP file
       CALL METHOD zip_tool->save
         RECEIVING
           zip = buffer_zip.
       CLEAR: t_data_tab[],bin_size.
       CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
         EXPORTING
           buffer        = buffer_zip
         IMPORTING
           output_length = bin_size
         TABLES
           binary_tab    = html_tab.
    Thanks & Regards,
    N. HARISH KUMAR

  • How do I create a ".mailloc" file from an email address?

    Before Snow Leopard I simply would drag an email to a project folder and it would create a ".mailloc" file. Later if I was referencing a contact or needed an email I could simply double click it and it would open a new email to that address.
    When I updated to Snow Leopard that functionality doesn't work now? All I get is a dumb *** "Text Clipping" which I don't want nor is it as useful to me as a ".mailloc" file. Anyone know how to save an email address as a ".mailloc" file format?
    In Safari on Snow Leopard you can still drag a URL and it'll create a ".webloc" file format so not sure why they messed with Apple Mail when it wasn't broken.
    I'd appreciate any help.
    Thanks.
    Von

    Paste the email address into any text field and drag it to the desktop.
    (52616)

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

  • 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

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

  • Problem in opening of word and excell files downloaded from email attachment in MS office professional 2013 paper licence

    Hi,
    I am facing the problem in opening the word and excel files received through email in my MS office professional 2013 paper licence, Microsoft Windows 8.1 enviornment. please help in this matter
    regards
    Rajeev Bhagwat
    Administrative Officer-I
    Purchase and Store Section
    UGC-DAE Consortium for Scientific Research,
    University Campus, Khandwa Road, Indore (M.P.), India.
    Telefax-+917312361546

    I should further say the files I sent are .xlsx and .docx files.  They look fine my end and I send such files all the time without problems.
    However, I did try to cheat by going in via the Safari onto my 'live' online email account and the Safari automatically transfers them to winmail.dat files with the same result.
    Ahh - have just been on using my PC this time and you are right, it seems that the service provider does the transfer and then when my outlook opens the file (on the PC), it must reconvert to .xlsx etc again.
    Very strange.
    Ergo, I guess the question should be how I open wimail.dat files ??

  • Symbol at end of file name prevents email recipient from opening PDF

    The special symbol looks like: ˥  However, there is a tiny little arrow that is on the end of the horizontal part that points left. It is located immediately after the file name, but before the .extension. I have been sending out resumes and the ones that appear with this symbol in the shadow box (the file name box that appears if you hover over the icon once it has been attached via email) appear as a blank (but gray) PDF once it is opened by the recipient.
    What is this and how do I stop it?
    Thanks

    Please let me know the following details:
    1. Which version of Adobe Reader are you using (You can check the same from Help > About Adobe Reader)
    2. Which OS are you using?
    3. How exactly are you attaching the PDFs to the emails? Are you using the Attach to Email functionality from within Reader? Or are you attaching them by yourself?

  • 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

  • Setting up the File Name of email Attachment from Received File Name

    Hello All,
    I have to send the Received File in attachment to an Email if there is any exception. Here I can attach the file, but I cannot set the file name of attachment as the Received File Name. Is there anyway of doing this without using custom pipeline component.
    Here I am using the Orchestration and SMTP Adapter.Any help is greatly appreciated.
    Thanks

    It might work if you use a custom pipeline component on your send port and in the Execute method populate the MIME.FileName property of the body part.
    Something like:
    public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
    string filename = inmsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
    inmsg.BodyPart.PartProperties.Write( "FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", "filename);
    return inmsg;
    You can take reference from similar post here
    SMTP - Setting attachment filename
    Anther good article with MIME is here
    Setting attachment filename with the SMTP Adapter
    For MIME case your SMTP message construct statement would be like below
    multipartMessage.MessagePart_1= InMSG;
    multipartMessage.MessagePart_2="This is message part2 as a string";
    multipartMessage(SMTP.Subject) ="Email From Dynamic Port";
    multipartMessage(SMTP.From) ="[email protected]";
    multipartMessage(SMTP.SMTPHost) ="yoursmypserver.com";
    multipartMessage.MessagePart_2(MIME.FileName) = "Attachment_Name";
    multipartMessage(SMTP.SMTPAuthenticate) =0;
    Thanks
    Abhishek

Maybe you are looking for

  • Returning to android home after done with internet

    Sometimes I check my bank account with my android phone. After logging out it does not allow backing up pages, always returning you to its sign in page, but no further back. I can type in a new urn & go there, so no problem on my laptop. But with Fir

  • IDVD Quality Issues

        Hello, I have been using IDVD to finalize and burn my Final Cut Pro and Adobe projects for a while now I have recently run into a problem I had not noticed before. I created a 9 min and 4 second video project using Adobe Premiere Pro CS 5.5. I ex

  • Help with itunes/ipod

    My iTunes is not working properly. It is not showing that my iPod is connected. My iPod continues to show the Do not disconnect display. How do I eject it if it does not show up on itunes? If I have accidently disconnected it while it was showing the

  • Return arguments from a process exposed as webservice

    Hi! I'm exposing a process as a web services, the activity exposed is a Wait activity. After the web service is called a variable that I'm using for a caducity transition is being updated, when the caducity transition is excecuted, the instance arriv

  • I have an apple acct. and an itune acct., how do i access them from my ACER laptop ? tks.  jeff

    i have an apple acct. and itune acct.  how do i access them from my ACER laptop ? tks. jeff