Extra spaces in attachment when sending a file via SO_DOCUMENT_SEND_API1

Hello
help please
Sending attachment (a binary form) function SO_DOCUMENT_SEND_API1
give the description of the file in ls_mail_data, lt_packing_list and lt_attach - Fail in binary form,
including transferred file size (the length of the text)
example the length of the text of 887 characters
consequently, the last line in lt_attach zero-padded to 255 characters.
here should be used properties of a file (its length) to the final fail.csv not contain spaces. if I'm wrong and popravte me please
the problem is that Fail eventually contain spaces, if I'm right and the function should work as described above may have some notes to fix the problem with spaces

what is the document type of attachment? is it excel?

Similar Messages

  • Date formatting issue when sending excel file via mail

    hello People ,
    I am facing date issue .
    I have inetrnal format of date as yyyymmdd.
    I am converting it into  YYYY-MM-DD.
    CONCATENATE gs_output-end_date(4)
                        gs_output-end_date+4(2)
                        gs_output-end_date+6(2)
                        INTO lv_date_to SEPARATED BY gc_seperator. " gc_separator = '-'.
            gs_output-end_date = lv_date_to.
    I am writing this date and sending an excel file via MAIL . I get date result as MM/DD/YYYY always.
    Now if i pass in YYYY.MM.DD and used the same code where gc_separtor = '.'.
    I get output as YYYY.MM.DD.
    Can any one give me an idea why in format YYYY-MM-DD it is getting overwritten but for yyyy.mm.dd it gives me as yyyy.mm.dd?
    Regards,
    Abhi..
    Edited by: Thomas Zloch on Jul 11, 2011 2:30 PM - subject enhanced

    Thanks , Rohit ,
    I have change my date format in SU01 settings .
    It is now made to [ YYYY-MM-DD] but still '-' is replaced by MM/DD/YYYY.
    Also note that when i format in the following way
       CONCATENATE gs_output-rdadate(4)
                        gs_output-rdadate+4(2)
                        gs_output-rdadate+6(2)
                        INTO lv_rda_date.
    instead of
       CONCATENATE gs_output-rdadate(4)
                        gs_output-rdadate+4(2)
                        gs_output-rdadate+6(2)
                        INTO lv_rda_date sepearted by '-'.
    I get output as YYYYMMDD.
    Regards,
    Abhishek.

  • Pdf extension changes to .dat when send a file via e-mail from adobe acrobat 9

    to convert a file from microsoft word 2007 to PDF and send as an attachment via e-mail from adobe 9, the file is received with the extension changed to. dat, so recipients can not open it.
    Can anyone help me with this.

    What is the OS of the sending computer?
    What mail client?
    I receive plenty of files on my PC as .dat files, which come from Mac user(s), rename the extension to what I think they ought to be and have no further problem. (I cannot change the senders email settings where the problem originates)
    If the receiver knows it is a pdf file, they can drag it into Acrobat, but renaming the extension serves future use.

  • Has anyone experienced Apple Mail flattening .PSD file attachment when sending?

    One of my students encountered the case when Apple Mail flattens .PSD file when sending an attachment.
    Running latest Mac OS X 10.6.2 (10C540) Mail Version 4.2 (1077). Multi layered .PSD file 120K was saved on desktop and than attached to email. None of the Adobe applications were running at that time. After it was sent, the attached file in Send mail folder was flattened and it size dropped to 88K.
    The flattened file was sent to destination. Although we could not reproduce this problem on the other computers, it always happens on this particular machine.
    When the problem was reported to Apple, the answer from engineers was more disturbing than the problem itself.
    They said "... it is OK to flatten the file to reduce the size of attachment when sending. It is expected email behavior". I am very troubled by this attitude from Apple. Flattening the image discards information contained in individual layers. This is actually EDITING the contents of an attachment when sending it.
    Has anyone experience this problem? Also, I would appreciate feedback on Apple's position that it is OK to edit attachments when sending them withou asking the user first.

    Marian,
    I'm afraid you have missed the point. People send binary files via email all the time: images, video and music clips - in fact any attachment is a binary file. Underlying protocols are implementation details, a mail client may choose any form of encoding/encryption to send an attachment. However, the internet standard requires that an attached file is delivered exactly as it was sent, mail clients/servers are not allowed to take upon themselves to "optimize" attachments without the end user knowledge and permission. It creates a dangerous precedent. In this particular case my photography student had no way of knowing that for whatever reason his particular setup would flatten the image and ruin his homework.
    Also, none of the protocols: FTP, SMTP or HTTP is inherently binary or MIME encoded, it depends on the settings and implementation ( Check RFC's)
    I am not asking for a work around, which is trivial. I am simply trying find how serious is the problem. This is not a normal behavior, I know for certain only about two cases when it happens. With such a rare occurrence it seem to be a bug rather than a feature. That is why Apple reaction to is so surprising.
    Sergei Petrov
    http://spandas.com

  • When I click attach when sending an email with an attachment I get a dropdown that says "single image" or "default multiple". I choose one. Nothing happens as far as offering a choice as to what doc or photo to attach. What do i need to do?

    When I click attach when sending an email with an attachment I get a dropdown that says "single image" or "default multiple". I choose one. Nothing happens as far as offering a choice as to what doc or photo to attach. I continue between the attach and attachment and still nothing .What do i need to do?

    Hmmm, Permissions are messed up somewhere!?
    Can you open to pic say in Preview, select All, Copy, 7 Paste into Mail?

  • 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 to send a file via e-mail with director

    Is it even possible to have a button in a free-standing
    projector that would send a file via e-mail, or open up an e-mail
    program and have the file attached and addressed? Or is it possible
    to put a file on a server? Of course, both of these methods would
    alert the user and ask for their permission.

    To just open the user's email program, you can use the
    standard lingo:
    goToNetPage(mailto:[email protected])
    That approach is kind of annoying because it actually opens
    an empty
    browser window then the user's email program. I don't think
    you can use
    that approach to send attachments though.
    A much better way is the fabulous DirectEmail xtra from
    DirectXtras.
    Check out their site:
    http://www.directxtras.com/demail_home.asp?UUID=1217348
    DirectEmail can do everything you are asking for (and more).
    It is
    cross-platform, shockwave safe, can handle text or HTML
    email, can do
    attachments, can use a mail server or not, and is really easy
    to use.
    The same company makes DirectFTP which you can get from:
    http://www.directxtras.com/DFTP_home.asp?UUID=1217348
    DirectFTP can put files onto an FTP site with a minimum of
    fuss. I have
    used both on quite a few occasions and they rock. You can
    actually
    write a full-fledged email or ftp program with those xtras
    and Director.

  • How do i send a file via email so it opens in booklet form to other people

    how do i send a file via email so it opens in booklet form to other people

    You would appear to be doing the right method as in this work through:http://support.en.belgacom.be/app/staticpages/devices/en/#/nokia/c3-00/email/sending-an-email-messag...
    Is there similar problem with Email without attachment?
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Can not send any file via bluetooth

    my 5800 Xpress music can not recently send any msg via Bluetooth. As soon as sending started, the phone will be locked where as no more action possible no keys works the phone does not even switch off by pressing its button otherwise removing the battery. pls help me

    What does it says when you try to send a file via Bluetooth?
    Previous Phones: 6600, 7610, 6230, 6230i, 1100, 1112, N70, N73, N95, N95 8GB, 5800XM, 5230, C5, iPhone 3GS, SE Xperia X10, N900, N8, SE Xperia Arc
    Current Phones: Nokia N9, iPhone 4

  • How to send .CSV file via email in Oracle10g/11g PL/SQL

    Hi Guys,
    Can any one let me know or suggest me how to send .csv file via email attachment using Oracle PL/SQL.
    Thanks in advance!
    Regards,
    LRK

    A FAQ. Use UTL_MAIL (if attachment is 32KB less). Else use UTL_SMTP. Search this forum. Search using google.

  • A black airplay info window floats around on my HDTV screen when sending audio content via airplay up to sound system w Apple TV.  How can I get rid of this?

    A black airplay info window floats around on my HDTV screen when sending audio content via airplay up to sound system w Apple TV.  How can I get rid of this?

    Had this happen to me after a recent update, was super annoying.  To turn off, go to Settings > AirPlay > Conference Room Display > Off.

  • C5-03 -how to send music files via bluetooth

    hi
    i've c5-03 mobile
    1.can any one tell me how to send music files via bluetooth
    2.there only mark all option ann no mark several option can any one tell me r there any software updates for this
    Solved!
    Go to Solution.

    PerLs wrote:
    Hi,
    You can do it with the file manager this is how i use to do it. You will find it in menu|applications|office folder
    There is also a possibility to long press on the track and send. Im not sure if C5-03 support this... But go to you music libery and find the track you want then long press on it and press send.the long press method works
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Corrupt file attachment when sending sapscript form by mail

    i have requirment to send sapscript through mail but when open my attachment it is giving file is corrupted.let me know where i am wrong
    i am specifying the code here
    CALL FUNCTION 'CONVERT_OTF'
       EXPORTING
         format                      = 'PDF'
    *     MAX_LINEWIDTH               = 132
    *     ARCHIVE_INDEX               = ' '
    *     COPYNUMBER                  = 0
    *     ASCII_BIDI_VIS2LOG          = ' '
    *     PDF_DELETE_OTFTAB           = ' '
    *     PDF_USERNAME                = ' '
       IMPORTING
         bin_filesize                = binfilesize
    *     BIN_FILE                    =
        TABLES
          otf                         = datab[]
          lines                       = pdftab[]
       EXCEPTIONS
         ERR_MAX_LINEWIDTH           = 1
         ERR_FORMAT                  = 2
         ERR_CONV_NOT_POSSIBLE       = 3
         ERR_BAD_OTF                 = 4
         OTHERS                      = 5
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      REFRESH it_pdf[].
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        EXPORTING
          line_width_dst              = '255'
        TABLES
          content_in                  = pdftab[]
          content_out                 = it_pdf[]
        EXCEPTIONS
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          OTHERS                      = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        "Subject of the mail.
        w_document_data-obj_name  = 'MAIL_TO_HEAD'.
        w_document_data-obj_descr = 'Regarding Mail Program by SAP ABAP'.
        "Body of the mail
        w_body_msg = 'This is body of mail msg.'.
        APPEND w_body_msg TO i_body_msg.
        CLEAR  w_body_msg.
        "Write Packing List for Body
        DESCRIBE TABLE i_body_msg LINES g_tab_lines.
        w_packing_list-head_start = 1.
        w_packing_list-head_num   = 0.
        w_packing_list-body_start = 1.
        w_packing_list-body_num   = g_tab_lines.
        w_packing_list-doc_type   = 'RAW'.
        APPEND w_packing_list TO i_packing_list.
        CLEAR  w_packing_list.
        "Write Packing List for Attachment
        w_packing_list-transf_bin = 'X'.
        w_packing_list-head_start = 1.
        w_packing_list-head_num   = 0.
        w_packing_list-body_start = 1.
        DESCRIBE TABLE it_pdf LINES w_packing_list-body_num.
        w_packing_list-doc_type   = 'PDF'.
        w_packing_list-obj_descr  = 'PDF Attachment'.
        w_packing_list-obj_name   = 'PDF_ATTACHMENT'.
        w_packing_list-doc_size   = w_packing_list-body_num * 255.
        APPEND w_packing_list TO i_packing_list.
        CLEAR  w_packing_list.
        "Fill the document data and get size of attachment
        w_document_data-obj_langu  = sy-langu.
        READ TABLE i_body_msg INTO w_body_msg INDEX g_tab_lines.
        w_document_data-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( w_body_msg ).
        "Receivers List.
        w_receivers-rec_type   = 'U'."Internet address
        w_receivers-receiver   = p_mail.
        w_receivers-com_type   = 'INT'.
        w_receivers-notif_del  = 'X'.
        w_receivers-notif_ndel = 'X'.
        APPEND w_receivers TO i_receivers .
        CLEAR:w_receivers.
        "Function module to send mail to Recipients
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = w_document_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          IMPORTING
            sent_to_all                = g_sent_to_all
          TABLES
            packing_list               = i_packing_list
            contents_bin               = it_pdf
            contents_txt               = i_body_msg
            receivers                  = i_receivers
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        else.
          MESSAGE 'Mail Successfully Sent' type 'S'.
        ENDIF.
    Edited by: sam_ins123524 on Oct 8, 2010 9:31 AM
    Edited by: sam_ins123524 on Oct 8, 2010 9:33 AM
    Moderator message: subject corrected for you, please use a more descriptive one next time, also use code tags.
    Edited by: Thomas Zloch on Oct 8, 2010 10:51 AM

    Hi,
    Once you get otf data, Use FM 'SX_OBJECT_CONVERT_OTF_PDF' to convert it to PDF. Then use CONTENT_BIN to send mail.
    Refer below code:
    * Converting OTF data to single line
      LOOP AT I_OTF INTO WA_OTF.
        CONCATENATE WA_OTF-TDPRINTCOM WA_OTF-TDPRINTPAR INTO WA_PDF.
        MOVE WA_PDF TO WA_CONTENT_TXT.
        APPEND WA_CONTENT_TXT TO I_CONTENT_TXT.
        CLEAR: WA_CONTENT_TXT.
      ENDLOOP.
    * Converting to PDF Format
      CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
        EXPORTING
          FORMAT_SRC      = C_OTF
          FORMAT_DST      = C_PDF
          DEVTYPE         = C_PRINTER
        CHANGING
          TRANSFER_BIN    = WA_TRANSFER_BIN
          CONTENT_TXT     = I_CONTENT_TXT
          CONTENT_BIN     = I_CONTENT_BIN
          OBJHEAD         = WA_OBJHEAD
          LEN             = V_LEN_IN.
    *- Send mail
        CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
          EXPORTING
            DOCUMENT_DATA                    = L_WA_DOCUMENT_DATA
          TABLES
            OBJECT_CONTENT                   = I_CONTENT_BIN
            RECEIVERS                        = L_I_RECEIVERS.

  • Facing problem with logo in the PDF attachment when sending mail...

    hi friends,
    i'm facing problem with logo in the PDF attachment to the mail.
    my requirement:
    1. enter spool number and mail id in the selection screen.
    process:
    1. now the program will fetch the spool data and converts it to PDF.
    2. but when i'm trying to send mail with this PDF as attachment.
    when i open the PDF file from the mail, logo is not coming properly (looks disturbed).
    can anyone help me how to resolve this issue...
    thanks in advance, murashali.

    hi dinakar, thanks for your mail...
    logo looks good in spool/script/smartform.
    even it look good when i download this spool to pdf and to the presentation server as pdf file.
    i'm using CONVERT_OTFSPOOLJOB_2_PDF.
    when i used CONVERT_ABAPSPOOLJOB_2_PDF, is gives a msg - 'spool number not found'.
    here i'm using folloing code to pass pdf to the function module: SO_NEW_DOCUMENT_ATT_SEND_API1.
    code:
    Transfer the 132-long strings to 255-long strings
      lt_mtab_pdf[] = pdf[].
      LOOP AT lt_mtab_pdf INTO lwa_mtab_pdf.
        TRANSLATE lwa_mtab_pdf USING ' ~'.
        CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
        CLEAR lwa_mtab_pdf.
      ENDLOOP.
      TRANSLATE lv_gd_buffer USING '~ '.
      DO.
        lwa_mess_att = lv_gd_buffer.
        APPEND lwa_mess_att TO lt_mess_att.
        CLEAR lwa_mess_att.
        SHIFT lv_gd_buffer LEFT BY 255 PLACES.
        IF lv_gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    NOTE: problem i believe is with ''.  i'm getting this tilt symbol () in my pdf internal table.  here in the above code the line   TRANSLATE lv_gd_buffer USING '~ ' is changing the existing tilt to space.  so my logo is getting disturbed.
    even i tried with REPLACE this tilt with other char, but it doent work.
    can you give any idea...

  • Error Attachment when sending email in Hotmail

    I have Safari 5.0.3 and using Hotmail.  Unable to insert attachment and error "This file couldn't be added because it appears to be empty (0 bytes)" appears.  Attachment is in Word.doc format.  Have saved as "PDF" and still same problem appears.  Can someone please help.

    5.0.3 is an oudated version of Safari.
    Try updating your software.  Install Safari 5.0.6 for Leopard
    Then restart your Mac, launch Safari.
    Go to Safari > Preferences then select the Security tab. Click Show Cookies
    Type Microsoft in the search field top right corner of that window then click Remove All > Done
    Now type Hotmail in and do the same thing.
    Now go to the Safari menu bar click Safari > Empty Cache
    Back to the menu again, click Safari > Reset Safari
    Select the top 7 boxes, click Reset.
    Try an attachment sending email in your Hotmail account.

Maybe you are looking for