Alignment problem in Email Attachment

Hi,
I am sending error reports of BDC thru email as attachment in Notepad format.
The records are not aligning properly coming as a paragraph, I need to display the errors in separate rows.
Is there any way that i can align all error records to come row by row in HTML format??
Can any one help on this please...
Thanks
Karthik

I have used excel as output and " cl_abap_char_utilities=>newline" for each record coming in new line..
regards
Karthik.

Similar Messages

  • Problem pdf email attachment

    Hi Friends,
    I need expertise help in pdf email attachment. I have data in internal table which has to be sent as pdf mail attachment. I need help in converting the data to pdf format. After conversion I can use SO_NEW_DOCUMENT_ATT_SEND_API1 to send the mail.
    Expect earliest reply.
    Thanks,
    Nidhya

    Dear Friends,
    Thanks for your reply, but I need help in converting the data in internal table to pdf.
    Pls find my code below: With this code, I get email send with PDF attach, but the data inside the file is not in correct format.
    Pls help me to correct.
    DATA : mailrec    LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
           mailbin    LIKE solisti1 OCCURS 0 WITH HEADER LINE,
           mailbin1   LIKE solisti1 OCCURS 0 WITH HEADER LINE,
           mailtxt    LIKE solisti1 OCCURS 0 WITH HEADER LINE,
           mailhead   LIKE solisti1 OCCURS 0 WITH HEADER LINE,
           i_otf      LIKE solisti1 OCCURS 0 WITH HEADER LINE,
           i_pdf      LIKE solisti1 OCCURS 0 WITH HEADER LINE,
           mailstruc  LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
           maildata   LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF i_sotf OCCURS 0.
           INCLUDE STRUCTURE itcoo.
    DATA : END OF i_sotf.
    DATA : i_itcpo LIKE itcpo,
           i_itcpp LIKE itcpp.
    DATA : v_tlines   TYPE i,
           v_len_in   LIKE  sood-objlen,
           v_len_out  LIKE sood-objlen.
    maildata-obj_name = 'Document'.
    maildata-obj_descr = 'Transfer Details'.
    maildata-obj_prio = 1.
    maildata-doc_size = strlen( mailtxt ).
    mailstruc-head_start = 1.
    mailstruc-head_num = 0.
    mailstruc-body_start = 1.
    mailstruc-body_num = 1.
    mailstruc-obj_name = 'transfer'.
    mailstruc-doc_type = 'RAW'.
    APPEND mailstruc.
    mailrec-receiver = '[email protected]'.
    mailrec-rec_type = 'U'.
    APPEND mailrec.
    CLEAR i_itcpo.
    i_itcpo-tdgetotf = 'X'.
    REFRESH mailbin.CLEAR mailbin.
    WRITE 'Report Title:' TO mailbin-line+3.
    WRITE sy-repid         TO mailbin-line+18.
    APPEND mailbin. CLEAR mailbin.
    WRITE  'User : ' TO mailbin-line.
    WRITE  sy-uname TO mailbin-line+11.
    APPEND mailbin. CLEAR mailbin.
    WRITE  'Date of Report : ' TO mailbin-line+3.
    WRITE sy-datum USING EDIT MASK mask MM/DD/YYYY TO mailbin-line+21.
    APPEND mailbin. CLEAR mailbin.
    WRITE  'Time of Report : ' TO mailbin-line+3.
    WRITE  sy-uzeit TO mailbin-line+21.
    APPEND mailbin. CLEAR mailbin.
    APPEND mailbin.
    WRITE  'Transfer ' to mailbin-line+3.
    APPEND mailbin. CLEAR mailbin.
    APPEND mailbin.
    WRITE  sy-uline TO mailbin-line+3.
    APPEND mailbin. CLEAR mailbin.
    LOOP AT i_disp.
    SHIFT i_disp-index LEFT DELETING LEADING '0'.
    WRITE i_disp-index TO mailbin+3.
    WRITE i_disp-pernr TO mailbin+6.
    WRITE i_disp-ename TO mailbin+16.
    WRITE i_disp-persk TO mailbin+57.
    WRITE i_disp-btrtl TO mailbin+60.
    APPEND mailbin. CLEAR mailbin.
    ENDLOOP.
    CALL FUNCTION 'SX_OBJECT_CONVERT_SCR_OTF'
      EXPORTING
        FORMAT_SRC            = 'RAW'
        FORMAT_DST            = 'OTF'
        DEVTYPE               = 'POSTSCPT'
        FUNCPARA              = ''
        LEN_IN                = v_len_in
    IMPORTING
       LEN_OUT               = v_len_out
      TABLES
        CONTENT_IN            = mailbin
        CONTENT_OUT           = mailbin1
    EXCEPTIONS
       ERR_CONV_FAILED       = 1
       OTHERS                = 2 .
    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 mailbin.
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
      EXPORTING
        FORMAT_SRC            = 'OTF'
        FORMAT_DST            = 'PDF'
        DEVTYPE               = 'POSTSCPT'
      FUNCPARA              =
        LEN_IN                = v_len_in
    IMPORTING
       LEN_OUT               = v_len_out
      TABLES
        CONTENT_IN            = mailbin1
        CONTENT_OUT           = mailbin
    EXCEPTIONS
       ERR_CONV_FAILED       = 1
       OTHERS                = 2 .
    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 mailbin1.
    DESCRIBE TABLE mailbin LINES v_tlines.
    mailstruc-head_start = 1.
    mailstruc-head_num = 0.
    mailstruc-body_start = 1.
    mailstruc-body_num = v_tlines.
    mailstruc-transf_bin = 'X'.
    mailstruc-doc_type = 'PDF'.
    mailstruc-obj_name = 'Mid-month transfer'.
    mailstruc-doc_size = v_tlines * 255.
    APPEND mailstruc.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA                    = maildata
       PUT_IN_OUTBOX                    = 'X'
      TABLES
        PACKING_LIST                     = mailstruc
       OBJECT_HEADER                    = mailhead
       CONTENTS_BIN                     = mailbin
        RECEIVERS                        = mailrec
    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.
    ENDIF.
    But i dont get the result in expected format. I am not getting first 2 characers of the line. instead of report, date, time in separate line I get everything in a single line as follows :
    Report Title: ZHRPY0003
    er : VACNIDHYA Date of Report : 02.05.2007 Time of Report
    : 10:31:27 Mid-month Inter-Company Transfer
    --- 1 00002609 Carla Pineda FT
    2010
    - 1 -

  • Problem with Email attachment

    Hi,
    I am using the method add_attachment, to add attachments to my Email.
    The mail is being triggered successfully with the attachments, but with the following problems:
    a. The attachment is being populated with incomplete data.
    CALL METHOD document->add_attachment
    EXPORTING
    i_attachment_type    = file_type
    i_attachment_subject = attach_name1
    i_att_content_text   = it_attach[].
    Although it_attach[] has all the data in it, the data in the attachment is incomplete.
    Is there a limit on the attachment size? How can this be increased.
    b. There is a space after every character in the attachment data. How can this be corrected?
    Thanks,
    Smitha.

    Below is the code:
    FUNCTION Z_XI_SEND_MAIL_ATT_DYN_EMAILID.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SUBJECT) TYPE  SO_OBJ_DES OPTIONAL
    *"     VALUE(ATTACH_NAME1) TYPE  SOOD-OBJDES OPTIONAL
    *"     VALUE(FILE_TYPE) TYPE  SOODK-OBJTP OPTIONAL
    *"     VALUE(ATTACH_NAME2) TYPE  SOOD-OBJDES OPTIONAL
    *"  TABLES
    *"      IT_CONTENT TYPE  SOLI_TAB OPTIONAL
    *"      IT_ATTACH TYPE  SOLI_TAB OPTIONAL
    *"      IT_ATTACH1 TYPE  SOLI_TAB OPTIONAL
    *"      IT_EMAILID TYPE  SOLI_TAB OPTIONAL
    DATA: send_request       TYPE REF TO cl_bcs.
      DATA: document           TYPE REF TO cl_document_bcs.
      DATA: sender             TYPE REF TO cl_sapuser_bcs.
      DATA: recipient          TYPE REF TO if_recipient_bcs.
      DATA: exception_info     TYPE REF TO if_os_exception_info,
      bcs_exception      TYPE REF TO cx_document_bcs.
      DATA i_attachment_size TYPE sood-objlen.
      DATA it_recv LIKE zmailmap OCCURS 0 WITH HEADER LINE.
      DATA ext(3).
      DATA: it_attach_hex type standard table of solix .
      DATA: it_attach1_hex type standard table of solix .
    * Create persistent send request
      send_request = cl_bcs=>create_persistent( ).
      TRY.
          document = cl_document_bcs=>create_document(
                                        i_type    = 'txt'
                                        i_text = it_content[]
                                        i_subject = subject ).
          DESCRIBE TABLE it_attach.
          SPLIT attach_name1 AT '.' INTO attach_name1 ext.
    **************** Convert text to binary***********************
    call function 'SO_SOLITAB_TO_SOLIXTAB'
    exporting
    ip_solitab = it_attach[]
    importing
    ep_solixtab = it_attach_hex[].
          CALL METHOD document->add_attachment
            EXPORTING
              i_attachment_type    = file_type
              i_attachment_subject = attach_name1
              i_att_content_hex   = it_attach_hex[].
    ****Additional code for QRN Interface*****
          IF file_type = 'QRN'.
            SPLIT attach_name2 AT '.' INTO attach_name2 ext.
            DESCRIBE TABLE it_attach1.
    *********Convert text to binary***************
    call function 'SO_SOLITAB_TO_SOLIXTAB'
    exporting
    ip_solitab = it_attach1[]
    importing
    ep_solixtab = it_attach1_hex[].
            CALL METHOD document->add_attachment
              EXPORTING
                i_attachment_type    = 'QTX'
                i_attachment_subject = attach_name2
                i_att_content_hex   = it_attach1_hex[].
          ENDIF.
    * Add document to send request
          CALL METHOD send_request->set_document( document ).
    * Get sender object
          sender = cl_sapuser_bcs=>create( sy-uname ).
    * Add sender
          CALL METHOD send_request->set_sender
            EXPORTING
            i_sender = sender.
    ********Determine the receipients (Extra code added for QRN interface - 31st May 2007)************
    ****Add Reciepents
    IF file_type = 'QRN'.
      LOOP AT IT_EMAILID.
      it_recv-MAILID = IT_EMAILID.
      APPEND it_recv.
      CLEAR it_recv.
      ENDLOOP.
    **it_recv-mailid = IT_EMAILID.
    **APPEND it_recv.
    ELSE.
      SELECT * FROM zmailmap INTO TABLE it_recv  WHERE filetype = file_type.
    ENDIF.
          LOOP AT it_recv.
            TRANSLATE it_recv-mailid TO LOWER CASE.
            recipient = cl_cam_address_bcs=>create_internet_address(
           it_recv-mailid ).
            CALL METHOD send_request->add_recipient
              EXPORTING
                i_recipient  = recipient
                i_express    = 'U'
                i_copy       = ' '
                i_blind_copy = ' '
                i_no_forward = ' '.
          ENDLOOP.
    ***********Trigger e-mails immediately*****************************
          send_request->set_send_immediately( 'X' ).
          CALL METHOD send_request->send( ).
          COMMIT WORK.
        CATCH cx_document_bcs INTO bcs_exception.
      ENDTRY.
    ENDFUNCTION.

  • Problem processing Email attachment when Body text exists

    Using an Email communication channel (POP3) we are successfully processing emails with an attachment of type csv or xml.
    These attachments are swapped with the Payload message then sent into an IP for processing.
    The IP splits the inbound message into multiple messages (1:n) and feeds them individually into a “For Each Block” where we perform a transformation then a send to a JDBC adapter.
    Everything works well until someone enters text into the body of the email. Then we end up with an error.
    Error handling for work item 000000102646
    Work item 000000102648: Object CL_SWF_XI_MSG_BROKER method SEND_SYNCHRON cannot be executed
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor d
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor d
    When body text is encountered we end up with two payloads:
    1.     Main Document (application/xml)
    2.     Mail Message (multipart/alternative boundary..)
    We are currently at XI 3.0 Service 17 (SAPKB64017)
    The mail channel for the XML attachment is configured with the following Modules:
    •     localejbs/AF_Modules/PayloadSwapBean LEB
    o      swap.keyName    Content-Description
    o     swap.keyValue     MailAttachment-1
    •     ASMA with Variable Transport Binding has been selected
    •     Mail attributes (only keep attachments was selected)
    •     Message Protocol XIPAYLOAD
    •     Transport Protocol POP3
    The mail channel for the CSV attachment is set up the same except it has an additional module specification for localejbs/AF_Modules/MessageTransformBean to generate an XML document from a csv attachment.
    Has anybody had the same experience? Or suggestions?

    Maybe the error is related to the fact that the payload is not a valid XML.
    Try to send some text in body like "<test><data>abcd</data></test>" just to see if the same error occurs.
    Regards,
    Henrique.

  • Problem opening email attachment Blackberry 8900

    Hi I am a recent user of Blackberry 8900 on Airtel in India, I have 2 email accounts Gmail and another work account on Rediffmailpro with pop3 access, I can open word, xls & pdf attachments in Gmail but not on my Rediffmail Pro account.
    I was earlier using Blackberry connect on Nokia E61 and everything worked fine.
    Also when I open Blackberry Maps the screen just becomes blank, I can use Google maps. Does the Blackberry maps require a separate service from my Cellphone provider. I already have GPRS active on my phone
    Can some one help
    Best regards
    Uday

    Do you have a full BlackBerry Data Plan on your account?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Email attachment in PDF problem with Images

    Hi All,
    Can any one tell me how to solve the problem with Email attachment in PDF. If i remove the logo of the client in the Smartform i am getting the Email attachment fine but when i put back the image in the smartform the PDF is giving error and not opening the attachment.
    Regards,
    Lakshmikanth.

    Hi All,
    Can any one tell me how to solve the problem with Email attachment in PDF. If i remove the logo of the client in the Smartform i am getting the Email attachment fine but when i put back the image in the smartform the PDF is giving error and not opening the attachment.
    Regards,
    Lakshmikanth.

  • PDF email attachment logo problem

    Hi All,
    Can any one tell me how to solve the problem with Email attachment in PDF. If i remove the logo of the client in the Smartform i am getting the Email attachment fine but when i put back the image in the smartform the PDF is giving error and not opening the attachment.
    The image is working fine in 4.6 system but the problem with ECC6.
    Regards,
    Lakshmikanth.

    Hi All,
    Can any one tell me how to solve the problem with Email attachment in PDF. If i remove the logo of the client in the Smartform i am getting the Email attachment fine but when i put back the image in the smartform the PDF is giving error and not opening the attachment.
    The image is working fine in 4.6 system but the problem with ECC6.
    Regards,
    Lakshmikanth.

  • Email Attachment Problem

    Hi Gurus!!!
    We are sending email in HTML format and has the option of attaching PDF, Excel and Text files. Now the problem occurs in attaching text file, when the email is received the contents of the email is unrecognizable. <b>It converted the format of the email to TEXT</b>. I don't know what causing this but in PDF and Excel attachments it has no problem at all. Its seems that that HTML format email doesn't recognize <b>.txt</b> attachments.  We are using class <b>CL_DOCUMENT_BCS</b> for the email. Does anyone knows how to fix this?
    Thanks and Best regards,
          JP

    I've been having the same problem attaching documents with Firefox. I finally sent a large file for free through YouSendIt.com. Take a look. It's free unless you want special services.

  • TS1506 In most of my email attachment the logo ( Mimi attachment ) show and I can not open that attachment , why and how to solve this problem ??? iPad 2, iOS 7

    In most of my email attachment the logo ( Mimi attachment ) show and I can not open that attachment , why and how to solve this problem ???
    iPad 2, iOS 7

    When did this start?  What was the last thing you changed before problem started?
    Have you tried sending the attachment from a different account.  Have a friend send you an attachment. Get a gmail account.
    Send the email with attachments to two different accounts one to your ipad and the other to a gmail account in a web browser and not on an iPad.  See if you can read the ones to the gmail account.
    You did reboot your ipad?
    Standard stuff for ipad.
    http://www.my-iguru.com/ipad/ipad-hints-tips/ipad-viewing-saving-email-attachmen ts.php

  • Web OS 1.4, PDF email attachment problem

    Since 1.4 I can no longer expand/zoom in on a PDF page email attachment. I get a lot of my purchase orders by email this way and now I can no longer read them when on the road. Gee thanks PALM, you just set me back to the dark ages.
    Anyone else having this problem?
    This question was solved.
    View Solution.

    Thanks for such a speedy solution - I will scamper back into my cave now........
    Kevin

  • New document: How to avoid known PDF email attachment problems

    Have you ever had problems with PDF attachments sent from Adobe Reader for iOS using Share > E-mail Document?
    You may find this document useful to avoid the problems.
    How to avoid known PDF email attachment problems
    Please let us know if you have encountered different types of problems with PDF attachments.  We can look for solutions or workarounds for you.

    Unfortunately, we (Adobe Reader mobile team) do not know if/when Apple will fix the attachment problems (software defects) in Apple Mail.
    In particular, the attachment problem with Microsoft Outlook (See Problem #2 in How to avoid known PDF email attachment problems) appears to be a long-standing defect that has been known for years.  However, Apple has not provided any fix for Apple Mail yet.
    Adobe Reader for iOS merely launches Apple Mail (the default mail app on iOS) to send a PDF document as an attachment.  Adobe Reader has no control over whether or not to embed a preview image of an attachment in the body of an email message, which is known to cause the problem with Microsoft Outlook (on the receiving side).  The same problem happens when you send a single-page PDF document as an attachment along with an email signature from Apple iBooks on iOS.
    For now, all iPad/iPhone users can do is to avoid the problems by using the workarounds that are described in How to avoid known PDF email attachment problems.
    When new and different problems with PDF attachments are reported by Adobe Reader for iOS users, we will update the document above.
    Sorry for the inconvenience.

  • Problem - email attachment, Elements 7 & Windows 7

    Both email attachment and photo mail do not work.  I just purchased a new Dell computer with Windows 7 and they installed Photoshop Elements 7.  I have tried setting the email setting to both Windows Live mail and to Adobe email service and neither works - I get error messages with both.
    Does Photoshop Elements 7 work with Windows 7.  If it does, how can I get email attachment and photo mail to work?
    I have set my default email to Windows Live Mail (Outlook express is not supported in Windows 7) and it doesn't help.
    I need help.  Does anyone have an answer?

    Please tryout the suggestion by Adobe employee http://forums.adobe.com/message/2664893#2664893. It should work. Let me know if it solves the issue.
    ~V

  • Problem with pdf as email attachment

    Hi All,
    when i am opening the pdf file(email attachment), getting the error  "file type not support or content conversion....."
    the peice of code is as followed...
    IF p_email = 'X'.
        CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
          EXPORTING
            rqident = mi_rqident   (spool number)
          TABLES
            buffer  = l_contents.  
        IF l_contents IS NOT INITIAL.
          CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
            EXPORTING
              ip_solitab  = l_contents
            IMPORTING
              ep_solixtab = contents_hex.
    Create the send request
          TRY.
              l_send_request = cl_bcs=>create_persistent( ).
    Create the main document
              l_doc = cl_document_bcs=>create_document(
                     i_type = 'RAW'
                     i_text = l_text
                     i_subject = p_sub ).
    Add attachment to document
              l_doc->add_attachment( i_attachment_type = 'PDF'
                                     i_attachment_subject = p_doc
                                  i_att_content_text = contents_text ).
                                   i_att_content_hex = contents_hex ).
    Add document to send request
              l_send_request->set_document( l_doc ).
    Add recipients to send request
              l_recipient = cl_cam_address_bcs=>create_internet_address(
                           p_email1-low ).
              l_send_request->add_recipient( i_recipient = l_recipient ).
    Send email
              l_sent_all = l_send_request->send( ).
    and other way also i tried, please let me know the solution.
    thanks in advance

    try this code ..
    For mailing(converting data to char 255)
        IF ch2 EQ 'X'.
          DATA sub TYPE string.
          CALL FUNCTION 'QCE1_CONVERT'
            TABLES
              t_source_tab         = i_tline
              t_target_tab         = so_ali[]
            EXCEPTIONS
              convert_not_possible = 1
              OTHERS               = 2.
    Mail Contents
          refresh objtxt[].
          objtxt = space.
          APPEND objtxt.
          objtxt = 'Dear Sir/Madam,'.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
          CLEAR : sub.
          CONCATENATE 'Sub: Dispatch Details - Invoice Number :' invno '.' INTO sub SEPARATED BY space.
          objtxt = sub.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
          objtxt = 'We have dispatched the subject consignment from our factory, and'.
          APPEND objtxt.
          objtxt = 'enclose the Invoice(pdf file) for your kind reference.'.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
          objtxt = 'Note: Please cover insurance on all risks in case INCO TERMS as "EXW, FCA, FOB, CFR"'.
          APPEND objtxt.
          objtxt = 'in the subject consignment.'.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
          objtxt = 'For Delivery Management - International,'.
          APPEND objtxt.
          objtxt = 'Pricol Limited,'.
          APPEND objtxt.
          objtxt = 'Coimbatore. India.'.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
    Determining the Email Ids of Mail Receivers
          PERFORM fetch_mailids.
          objtxt = 'Copy to :'.
          APPEND objtxt.
          LOOP AT reclist.
            objtxt = reclist-receiver.
            APPEND objtxt.
          ENDLOOP.
          objtxt = space.
          APPEND objtxt.
          objtxt = '<This is system generated message>.'.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
    Mail Body of message over.
          DESCRIBE TABLE objtxt[] LINES v_lines_txt.
          CONCATENATE 'Inv.' invno INTO sub SEPARATED BY space.
          doc_chng-obj_name = sub.
          doc_chng-expiry_dat = sy-datum + 10.
    Mail Subject
          refresh objpack[].
          CONCATENATE 'Pricol Dispatch - Invoice' invno '- Reg.' INTO sub SEPARATED BY space.
          doc_chng-obj_descr = sub.
          doc_chng-sensitivty = 'F'.
          doc_chng-doc_size = v_lines_txt * 255.
          objpack-transf_bin = ' '.
          objpack-head_start = 1.
          objpack-head_num = 0.
          objpack-body_start = 1.
          objpack-body_num = v_lines_txt.
          objpack-doc_type = 'RAW'.
          APPEND objpack.
    *PDF Attachment
          DESCRIBE TABLE so_ali[] LINES lineno.
          objpack-transf_bin = 'X'.
          objpack-head_start = 1.
          objpack-head_num = 1.
          objpack-body_start = 1.
          objpack-doc_size = lineno * 255 .
          objpack-body_num = lineno.
          objpack-doc_type = 'PDF'.
          objpack-obj_name = 'INVOICE'.
          objpack-obj_descr = 'Invoice'.
          objpack-obj_langu = 'E'.
          APPEND objpack.
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
          document_data = doc_chng
          put_in_outbox = 'X'
          commit_work = 'X'
          TABLES
          packing_list = objpack
          contents_txt = objtxt[]
          contents_bin = so_ali[]
    *contents_hex = so_ali[]
          receivers = reclist[]
          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.
            PERFORM mail.
            MESSAGE 'Mail sent successfully' TYPE 'S'.
    *SUBMIT RSCONN01 WITH MODE = MODE.
          ENDIF.
        ENDIF.
      ENDLOOP.

  • Problem with Emailing the Internal table data as an excel attachment

    Hi Friends,
    I am facing problem with Emailing an internal table data as an excel file. I am using standard function module "SO_NEW_DOCUMENT_ATT_SEND_API1" which is using SOLI structure can have record with 255 character length. But my Internal table having each record means after concatenating all the fields it is going to be morethan 450 characters. so i t is not displaying all the data in excel file.
    Can somebody help me if there is any other function module or any other way that i need to follow.
    thanks for help
    venkat.

    You must use the the :
    CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as a field seperator and
    CL_ABAP_CHAR_UTILITIES=>CR_LF as a record seperator.
    Check this example:
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Regards,
    Naimesh Patel

  • Mac won't open some files MasterPlan.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).

    I had this problem of not being able to open some files a couple of years ago and eventually was able to fix it but i can't remember how. Any help would be grateful.

    The following document should help: Error: Adobe Reader could not open '*.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 was not correctly decoded.)
    Please update this thread if your issue is resolved.
    Thanks,
    Shashi

Maybe you are looking for

  • Cannot install 10.4.3 on my brand new mini

    Help! I have a brand-new mac mini OSX 10.4, which is not connected to the internet. It tells me that the HD has 37.1GB, 25.2GB free. I downloaded the 10.4.3 update onto my 256MB "datakey" (USB flash drive) and tried to install it onto my new mini. Wh

  • Line itemwise report for operational WCD

    Hi, We are using the Mechanical and process isolations in the operational WCD. one WCD for Mechanical isolation and another one for process isoaltion. There are multiple Isolation points used for process isolation. Example: 20 process isolation point

  • Trace example in examples.jar

    Hello: The Trace example in examples.jar that comes with JDK 1.4 is very useful, but very slow. I was thinking how could the source code be modified so that I could use the same by connecting to a running JVM so that it doesn't log at startup. The ap

  • InDesign Crashes When Exporting a .PDF

    I am having a horrible time dealing with Adobe InDesign. I paid $2,500 for the Master Collection and cannot get InDesign to export a simple PDF. I called adobe but all they'll willing to do is forward me to this article (http://kb2.adobe.com/cps/499/

  • JMS MQ Headers

    I have my JMS Adpater working but now I want to add an Websphere MQ Header. The IBM documentation describes the options available with JMS messages but how would I set them up in an XI Receiver Channel ? Thanks, Mike