SO_NEW_DOCUMENT_ATT_SEND_API1 plus attachment

Hi;
i´m using FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send email with 3 attachments, the problem is with the result size of the 3 XLS files in the attachment.
The first XLS attachment file code:
  lt_packing_list-transf_bin  = 'X'.
  lt_packing_list-head_start  = 1.
  lt_packing_list-head_num    = 1.
  lt_packing_list-body_start  = 1.
  lt_packing_list-body_num    = LINES( lt_attachment ).
  lt_packing_list-doc_type    = 'XLS'.
  lt_packing_list-obj_name    = 'ims_productos.xls'.
  lt_packing_list-obj_descr   = 'ims_productos.xls'.
  lt_packing_list-doc_size    = lt_packing_list-body_num * 255.
  APPEND lt_packing_list. CLEAR lt_packing_list.
the result file size = 1.28mb
if i copy the data to a new excel file the result size is: 588kb
The second XLS attachment file code:
  lt_packing_list-transf_bin  = 'X'.
  lt_packing_list-head_start  = 1.
  lt_packing_list-head_num    = 1.
  lt_packing_list-body_start  = lineas + 1.
  lt_packing_list-body_num    = LINES( lt_attachment ) - lineas.
  lt_packing_list-doc_type    = 'XLS'.
  lt_packing_list-obj_name    = 'ims_clientes.xls'.
  lt_packing_list-obj_descr   = 'ims_clientes.xls'.
  lt_packing_list-doc_size    = lt_packing_list-body_num * 255.
  APPEND lt_packing_list. CLEAR lt_packing_list.
the result file size = 2.95mb
if i copy the data to a new excel file the result size is: 2.46mb
The third XLS attachment file code:
  lt_packing_list-transf_bin  = 'X'.
  lt_packing_list-head_start  = 1.
  lt_packing_list-head_num    = 1.
  lt_packing_list-body_start  = line + 1.
  lt_packing_list-body_num    = LINES( lt_attachment ) - line.
  lt_packing_list-doc_type    = 'XLS'.
  lt_packing_list-obj_name    = 'ims_ventas.xls'.
  lt_packing_list-obj_descr   = 'ims_ventas.xls'.
  lt_packing_list-doc_size    = lt_packing_list-body_num * 255.
  APPEND lt_packing_list. CLEAR lt_packing_list.
the result file size = 8.86mb
if i copy the data to a new excel file the result size is: 2.03mb
I know this line ( lt_packing_list-doc_size  = lt_packing_list-body_num * 255.) gives the size of the file, but what can i do to get a size file like the one i get if a create the file and copy the data by hand.
the last file using "GUI_DOWNLOAD" gets the file with 2MB size, but as attachment the size increase to almost 9MB.
Any help.
David Fúnez
Tegucigalpa, Honduras

Thanks for reply;
the problem is that the XLS attachment files are created larger that they should be, if i cut the same data of the XLS attachment and paste it in an excel sheet the size of the new XLS file is lower than the generated attachment.
what i need is to get a real size of the XLS attachment files... because is not the same multiply N lines * 255 = file_size than the size of the XLS file with the same data created by hand.
Now i´m getting an XLS attachment file with 9MB when the real size is 2MB with the same amount of data.
i hope i explained better this time.
I have no problem sending files, the problem is the size of the generated attachments.
Edited by: David Funez on Aug 31, 2010 10:00 PM
Edited by: David Funez on Aug 31, 2010 10:05 PM

Similar Messages

  • SO_NEW_DOCUMENT_ATT_SEND_API1 Text attachment issue after upgrade 4.7 to ECC6

    Hi,
      We are using function module so_new_document_att_send_api1 for sending mail with text document. It was working fine 4.7 system but in ECC system it is sending blank attachement with mail. Program remain same and no changes in that. I have attached code. please advise how to resolve this issue.
    Thanks

    Hello Venu,
    Move attachment to packinglist internal table and clear lt_packing_list-transf_bin as below.
    I copied your code and did some correction.
    *  lt_packing_list-transf_bin  = 'X'.
       lt_packing_list-head_start  = 2.
       lt_packing_list-head_num    = 1.
       lt_packing_list-body_start  = LINES( lt_mailtxt ) + 1.
       APPEND LINES OF lt_attachment TO lt_mailtxt.
       lt_packing_list-body_num    = LINES( lt_attachment ).
       lt_packing_list-doc_type    = 'RAW'. " You can give RAW incase if you want just a txt file.
       lt_packing_list-obj_name    = 'data.txt'.
       lt_packing_list-obj_descr   = 'data.txt'.
       lt_packing_list-doc_size    = lt_packing_list-body_num * 255.
       APPEND lt_packing_list. CLEAR lt_packing_list.
    In FM SO_NEW_DOCUMENT_ATT_SEND_ATI1, no need to pass the ITAB attachment i fyou can merge everything to ITAB packing list.

  • SO_NEW_DOCUMENT_ATT_SEND_API1 pdf attachment sending thru mail ecc 6.0

    Hi All,
    I'm using ECC 6.0 version, I'm trying to attach a pdf file to a mail using the function module SO_NEW_DOCUMENT_ATT_SEND_API1. But gtting error as "wasn't decoded correctly", but the same coding is working fine in 4.6 version. What changes i should do while using this function module in ECC 6.0 to get it corrected.
    Thanks & Regards,
    Sabu.

    Hi ,
    I tried with SBWP, I'm able to see the pdf file attached while sending from SBWP.
    Please see the below coding
          FORM make_the_message                                         *
    FORM make_the_message.
    Create Message Body
    Title and Description
      CLEAR : docdata,
              objtxt[],
              objpack[],
              objbin[].
      docdata-obj_name  = sy-repid.
      docdata-obj_descr = p_subj.
    Main Text
      LOOP AT gt_text INTO objtxt.
        APPEND objtxt.
      ENDLOOP.
    Write Packing List (Main)
      DESCRIBE TABLE objtxt LINES tab_lines.
      READ     TABLE objtxt INDEX tab_lines.
      docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
      CLEAR objpack-transf_bin.
      objpack-head_start = 1.
      objpack-head_num   = 0.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
    Sabu
      objpack-doc_type   = 'RAW'.
    objpack-doc_type   = 'PDF'.
    End Sabu
      APPEND objpack.
    *Start of Upgrade ECC 6.0
      Data: l_mi_bytecount TYPE i.
    *End of Upgrade ECC 6.0
    Create Message Attachment (As read earlier from frontend)
    Write Packing List (Attachment)
    Handle the attached file.
      objbin[] = gt_pdffile[].
      att_type = 'PDF'.
      DESCRIBE TABLE objbin LINES tab_lines.
      READ     TABLE objbin INDEX tab_lines.
      objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
    *****Sabu 8496
    objpack-head_num   = 0.
      objpack-head_num   = 1.
    End Sabu
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
    *Start of Upgrade ECC 6.0
      objpack-doc_type   = att_type.
      objpack-obj_name   = 'ATTACHMENT.pdf'.
      objpack-obj_descr  = 'Attached Document'.
    *End of Upgrade ECC 6.0
      APPEND objpack.
    Create receiver list
    Generate ALV list for either Customers/Vendors/Contact persons etc.
    ENDFORM.                    "make_the_message
          FORM fill_the_distribution_list                               *
    FORM fill_the_distribution_list USING i_test
                                          i_fax
                                          i_faxcntry
                                          i_email.
    Just as a test...
      CLEAR: reclist, reclist[].
      IF i_test EQ 'X'.
        CASE 'X'.
          WHEN p_sndfax.
          By Fax
            rec_fax-rec_fax   = i_fax.
            rec_fax-rec_state = i_faxcntry.
    Start of Changes 07/09/2008
           reclist-receiver  = rec_fax.
            ASSIGN reclist-receiver TO <fs_reclist> CASTING.
            <fs_reclist> = rec_fax.
           rec_fax = <fs_reclist>.
    End of Changes 07/09/2008
            reclist-rec_type  = 'F'.
            APPEND reclist.
          WHEN p_sndint.
          By Email
            reclist-receiver = i_email.
            reclist-rec_type = 'U'.
            reclist-BLIND_COPY = 'X'.
            APPEND reclist.
        ENDCASE.
      ELSE.
      This is not a test....
        LOOP AT gt_detail INTO gs_detail.
          CHECK gs_detail-flag EQ icon_green_light.
          CASE 'X'.
            WHEN p_sndfax.
            By Fax
              rec_fax-rec_fax   = gs_detail-faxnr.
              rec_fax-rec_state = gs_detail-land1.
    Start of Changes 07/09/2008
              ASSIGN reclist-receiver TO <fs_reclist> CASTING.
              <fs_reclist> = rec_fax.
              rec_fax = <fs_reclist>.
             reclist-receiver  = rec_fax
    End of Changes 07/09/2008
              reclist-rec_type  = 'F'.
              APPEND reclist.
            WHEN p_sndint.
            By Email
              reclist-receiver = gs_detail-email.
              reclist-rec_type = 'U'.
              reclist-BLIND_COPY = 'X'.
              APPEND reclist.
          ENDCASE.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "fill_the_distribution_list
          FORM send_the_messages                                        *
    FORM send_the_messages.
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
              document_data                    = docdata
              put_in_outbox                    = 'X'
              commit_work                      = 'X'
        IMPORTING
            SENT_TO_ALL                      =
            NEW_OBJECT_ID                    =
          TABLES
              packing_list                     = objpack
              object_header                    = objhead
              contents_bin                     = objbin
              contents_txt                     = objtxt
            OBJECT_PARA                      =
            OBJECT_PARB                      =
              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.
        MESSAGE ID     'SO'
                TYPE   'S'
                NUMBER '023'
                WITH   docdata-obj_name.
      ELSE.
        PERFORM popup.
      ENDIF.
    ENDFORM.                    "send_the_messages
    Thanks & Regards,
    Sabu

  • I can't send an email plus attachment

    I have the same problem as griffonmeister! I can't send emails with attachments out from my Office Apps.
    (Office HD and Quickoffice)
    If I choose send .doc the site open - I can see the attachment - enter the adress - press the button send,
    the site disappear but nothing goes away!

    Your SMTP setting .
    Ensure the settings in your Phone are those required by your carrier if using cellular or if wifi as required by by your broadband supplier
    http://www.apple.com/support/iphone/mail/

  • HT4863 I sent an email from my iPhone 3GS (via iCloud account) with around 16GB of attachment. It slowed down the phone for a few seconds, then appeared to be sent. However, the message is now not in the sent box, and I can't see an outbox at all. Any ide

    I sent an email from my iPhone 3GS (via iCloud account) with around 16GB of attachment. It slowed down the phone for a few seconds, then appeared to be sent. However, the message is now not in the sent box, and I can't see an outbox at all. Any ideas?

    That changes things a little bit , login to icloud.com and see if you can find it in your sent folder.
    If it is there you did send, just need to wait until you phone syncs "sent folder" perhaps on wifi.
    If it is not, then I would say it is lost and you may have to send again. They have 20 megs limit, so make sure that message plus attachment is under that limit.

  • SmartForms - Is there a way to put PDF attachment in the body of Email?

    Hello All,
    Currently I have a Smart Form that generates an MAIL with a PDF attachment.  It works very nicely with from, to, and subject information correct.  A new request from the users is to show in the PDF output in the email vs. an attachment.  They mention that not all consumers open the PDF attachment.
    Is there a way I can write the form in the email that would look exactly like the attached PDF format?
    Or is there a way I can leave the PDF attachement with text in the email like 'Open the attachment to view the items that have been shipped in your recent order'.
    Currently I'm using CALL FUNCTION lf_fm_name with control parameters, mail_appl_obj, mail_recipient, mail_sender, and output options.
    I would greatly appreciate help in solving this ASAP.  Thanks!

    Vijaya,
    thank you for you quick response.
    i have followed your example logic and i now see a brief message in the body of the email.  Which i part of my requirement but i'm unable to open the PDF doument.
    i'm getting the error message "Abobe reader could not open 'test.PDF' because it is either not a supported file type or because the file has been damaged"
    Any idea why?  Before adding your logic after calling the smarform to use 'CONVERT_OTF'  and 'SO_NEW_DOCUMENT_ATT_SEND_API1' the attached PDF file was perfect.
    below is the the call function for my SF.  after this call i have added the logic your suggested.
    call smartform
          CALL FUNCTION lf_fm_name
               EXPORTING
                         control_parameters       = control_parameters
                         mail_appl_obj            = appl_object_id
                         mail_recipient           = recipient_id
                         mail_sender              = sender_id
                         output_options           = ls_composer_param
                         user_settings            = 'X'  "ADDED THIS SETTING
    > SmartForm specific fields
                          gi_salesord_num      = gi_salesord_num
                          gi_goods_mvmnt_date  = gi_goods_mvmnt_date
                          gi_tracking_number   = gi_tracking_number
                          gi_carrier_name      = gi_carrier_name
                          gi_email_to          = gi_email_to
                          gi_coupon            = gi_coupon            
                          gi_url_name          = gi_url_name         
               IMPORTING
                 job_output_info               = job_output_info "w_return    "ADDED IMPORTING AS TABLE
               TABLES     git_item_tab         = git_item_tab
    <
               EXCEPTIONS formatting_error     = 1
                          internal_error       = 2
                          send_error           = 3
                          user_canceled        = 4
                          OTHERS               = 5.
    in bebug mode if i look at the retuned table in debug i see values like below:
        1     //        |XPDF1        0640 00000000001                                <
        2     IN        |04EYZSF_SD_WKI_EMAIL_CONF                                      <
        3     IN        |05FIRST                                                        <
        4     OP        |LETTER  P 144  240 1581712189000010000100001                   <
        5     IN        |06WK_BRANDS_COLOR_LOGO                                         <
        6     MT        |0210001134                                                     <
    << Unformatable text removed >>>
    it looks like there is an issue with the convert or i've got some logic wrong.  Any ideas?
    Edited by: Rob Burbank on May 7, 2009 2:55 PM

  • Email XML file as attachment in 4.6c

    Hi,
    I have a requirement to generate an XML file and email it.
    I am using Class CL_IXML to create the xml requirement.  The code is listed below
    When I download the file to the PC, i am able to open the file and the XML format is ok, but when
    I email the file using SO_NEW_DOCUMENT_ATT_SEND_API1, the attachment is still in the Binary format. Does anyone know how to send the file as an XML attachment.
    We are using SAP R/3 ver 4.6c.
    Load the class definition
      CLASS cl_ixml DEFINITION LOAD.
          Creating a ixml factory
      l_ixml = cl_ixml=>create( ).
          Creating the dom object model
      l_document = l_ixml->create_document( ).
    Message
      l_element_message  = l_document->create_simple_element(
                    name = 'Message'
                  parent = l_document ).
    Message Header
      l_element_message_hdr  = l_document->create_simple_element(
                        name = 'MessageHeader'
                      parent = l_element_message ).
    Sender Id
      l_element_dummy = l_document->create_simple_element(
                 name = 'SenderID'
                value = 'ABCDE'
               parent = l_element_message_hdr ).
    Receipient Id
      l_element_dummy = l_document->create_simple_element(
                 name = 'RecipientID'
                value = 'ZZZZZZZZZZZ'
               parent = l_element_message_hdr ).
    Prepared
      l_element_dummy = l_document->create_simple_element(
                 name = 'Prepared'
                value = '2009-03-31T14:30:00'
               parent = l_element_message_hdr ).
    Msg ID
      l_element_dummy = l_document->create_simple_element(
                 name = 'MessageID'
                value = '1234567896'
               parent = l_element_message_hdr ).
    Msg type
      l_element_dummy = l_document->create_simple_element(
                 name = 'MessageType'
                value = 'MANIFEST'
               parent = l_element_message_hdr ).
    Msg ver
      l_element_dummy = l_document->create_simple_element(
                 name = 'MessageVersion'
                value = '02'
               parent = l_element_message_hdr ).
      Creating a stream factory
      l_streamfactory = l_ixml->create_stream_factory( ).
      Connect internal XML table to stream factory
      l_ostream = l_streamfactory->create_ostream_itable( table = l_xml_table ).
      Rendering the document
      l_renderer = l_ixml->create_renderer( ostream  = l_ostream
                                                           document = l_document ).
      l_rc = l_renderer->render( ).
      Saving the XML document
      l_xml_size = l_ostream->get_num_written_raw( ).
    Thanks
    ND

    Hi,
      I have one program conerts data to xml format.
    TABLES:
      MAKT,                                "Mat description
      MARC,                                "Material / plant
      T001W,                               "plant name
      BHDGD.                               "Batch heading
    Internal tables
    DATA:
      BEGIN OF GT_MARC OCCURS 0,
        WERKS LIKE MARC-WERKS,
        MATNR LIKE MARC-MATNR,
      END OF GT_MARC,
    Table to be downloaded as xml. Each line stores start and end tags
    and the value
      BEGIN OF GT_XML OCCURS 0,
        LINE(120),
      END OF GT_XML,
      G_MAKTX(120).
    User-input
    SELECT-OPTIONS:
      S_WERKS FOR MARC-WERKS,
      S_MATNR FOR MARC-MATNR.
    START-OF-SELECTION.
    Extract all required data
      PERFORM MAIN_PROCESSING.
    END-OF-SELECTION.
      SORT GT_MARC BY WERKS MATNR.
      LOOP AT GT_MARC.
        AT FIRST.                          "First tag must be root
          CLEAR GT_XML.
          GT_XML-LINE = ''.
        APPEND GT_XML.
        CLEAR GT_XML.
    display data
        FORMAT COLOR 2 ON.
        WRITE :/ GT_MARC-MATNR, MAKT-MAKTX.
        FORMAT COLOR 2 OFF.
      ENDLOOP.
    The last tag must be the root closing tag --*
      GT_XML-LINE = '</LOCATIONS>'.
      APPEND GT_XML.
      CLEAR GT_XML.
      CALL FUNCTION 'DOWNLOAD'
           EXPORTING
                FILENAME = 'C:PLANT1.XML'
                FILETYPE = 'ASC'
           TABLES
                DATA_TAB = GT_XML.
    TOP-OF-PAGE.
      MOVE SY-TITLE TO BHDGD-LINE1.
      MOVE SY-REPID TO BHDGD-REPID.
      MOVE SY-UNAME TO BHDGD-UNAME.
      MOVE SY-DATUM TO BHDGD-DATUM.
      MOVE '0' TO BHDGD-INIFL.
      MOVE '132' TO BHDGD-LINES.
      FORMAT INTENSIFIED ON COLOR COL_HEADING.
      PERFORM BATCH-HEADING(RSBTCHH0).     "report header
    Form READ_PLANT
    FORM READ_PLANT.
    Get plant name
      CLEAR T001W.
      SELECT SINGLE NAME1
        INTO T001W-NAME1
        FROM T001W
       WHERE WERKS EQ GT_MARC-WERKS.
    ENDFORM.                               " READ_PLANT
    Form MAIN_PROCESSING
    FORM MAIN_PROCESSING.
    Material and plant basic data
      SELECT WERKS MATNR
        INTO TABLE GT_MARC
        FROM MARC
       WHERE WERKS IN S_WERKS
         AND MATNR IN S_MATNR.
    ENDFORM.                               " MAIN_PROCESSING
    Form READ_DESCRIPTION
    FORM READ_DESCRIPTION.
    Material name
      CLEAR G_MAKTX.
      SELECT SINGLE MAKTX
        INTO G_MAKTX
        FROM MAKT
       WHERE MATNR EQ GT_MARC-MATNR
         AND SPRAS EQ 'E'.
    Replace special character
      DO.
        REPLACE '&' WITH '*ù%;' INTO G_MAKTX.
        IF NOT SY-SUBRC IS INITIAL. EXIT.ENDIF.
      ENDDO.
      DO.
        REPLACE '*ù%;' WITH '&amp;' INTO G_MAKTX.
        IF NOT SY-SUBRC IS INITIAL. EXIT.ENDIF.
      ENDDO.
      DO.
        REPLACE '/' WITH '&#47;' INTO G_MAKTX.
        IF NOT SY-SUBRC IS INITIAL. EXIT.ENDIF.
      ENDDO.
    ENDFORM.                               " READ_DESCRIPTION
    END OF PROGRAM Z_DOWN_XML ************************
    *******For sending data to mail check the following link*****
    http://itknowledgeexchange.techtarget.com/itanswers/is-there-an-xml-function-module/
                                              (OR)
    search in sdn.sap.com for mail data(xml)

  • SO_NEW_DOCUMENT_ATT_SEND_API1 ERROR

    Hi Everyone,
                    I am facing problem when i am calling the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'  the attachment is automatically getting converted into encripted form.
    Actually my attachment having only 3 records after the calling the function module its giving 6 record with that converted format.
    Please give some of your inputs on this.
    Thannks and regards
    Lakshman.

    Hi Everyone,
                    I am facing problem when i am calling the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'  the attachment is automatically getting converted into encripted form.
    Actually my attachment having only 3 records after the calling the function module its giving 6 record with that converted format.
    Please give some of your inputs on this.
    Thannks and regards
    Lakshman.

  • Zen V Plus - Media Explorer not detecti

    Hi, I'm not sure if this has been posted somewhere along the lines. If it has sorry.
    Anyway, my problem is I have my V plus attached to my PC I have it turned on and it says it's docked.
    But my Media Explorer and other various Media Sync programs won't detect it.
    It shows up in My Computer as a Portable Device but that doesn't really help me that much.
    I can transfer files onto it the old fashioned way of dragging and dropping but i'd really like the convenience of the Media Explorer.
    If anyone could provide me with a solution to this I would be quite greatful.Message Edited by Konis on 04-6-200702:24 PM

    I had the same. I understand, that another programs ocupate player befor Zen media Explorer. GoControl Panel-> System-> Devace Manaderhere you will find? Portable DevicesIn my PC here was MCT devise (something that, not remember)I delete it !!!Than start Creative Media Explorer and after ?Disconnect Zen Player and connect again.Now Explorer find Zen Player and in Portable devices I have Creative Zen V plus?Enjoy

  • Redirect Printer is not working in windows 2008 R2 Server( Server Running as AD and Terminal Service(both role in single server))

    Dear Team
    i need solution from Microsoft for the issue;
    My infrastructure
    - Windows Server 2008 R2 (Role - AD and Terminal Service)- Updated
    - Client Machine running with windows 7 pro (Updated)
    - Client Using RDP Client to connect Windows 2008 Terminal Session
    - All are working fine, but Redirect Printing is not working (Through Windows 7 Pro) ... (HP Laser Jet 1020 plus - attached in Client PC)
    - it is working fine from Windows XP
    - i was done All terminal setting in both end, also try RDP Login with Administrator User, but issue is not resolve;
    What Microsoft can say about the issue;
    Thanks & Regards,
    VIMAL PRAJAPATI | 09824111686

    Have you checked the Print Service log in event viewer?
    Here's How.
    I have the Microsoft XPS driver on my clients, so I use that fact to my advantage below.
    Click Start Button/Administrative Tools/Remote Desktop Services/Remote Desktop Services Manager on the RDSH server
    Click the Sessions tab.  PC’s are listed Under Client Name by their computer name.  Take Note of the corresponding
    ID.  We will use this to locate the Printer information in the Event Log.  
    In the Event Log open Application and Services Logs/Microsoft/Windows/Print Service/Admin/ and Find the Event ID 823 entry that has the corresponding ID from the sessions tab you previously noted.  
    This Event Log Entry is created at Logon and you can only get the session ID when they are logged in.
    This tells you what client printer was mapped for the client.  The name that appears is the name of the Printer that was set on the client when the printer was installed.
    See if you see any errors here.
    If you see Event Id 823 with the following message “The default printer was changed to Microsoft XPS Document Writer,winspool,Ne00:. See the event user data for context information.”  Twice in a row with no other messages in between, and the first occurs
    at the time the user logged in, then their printer was not properly redirected.
    You see the Microsoft XPS driver mapped for each session prior to Easy Print redirecting the client machine’s Default Printer.
    Since your printer is the HP 1020 I would bet the driver on the client does not work with Easyprint.  I would try the  the HP Universal Print Driver or the driver for a printer that is very close, like the HP 1018.
    Thanks,
    Jeremy

  • Error opening pdf in email

    I am trying to email a smartform as pdf. But getting the error that File cannot be opened as it is damaged and cannot be repaired.
    I am getting the otf data from Smartform FM. Then convert it to pdf. And then sending it through SO_NEW_DOCUMENT_ATT_SEND_API1. Attached is my code. I don't know what I am doing wrong. I first tried to send it directly through smartform email parameters. It didn't work. I also tried other functions for OTF to PDF conversions. But always getting the same error . I've also checked SCOT for SMTP node setup. The o/p format for smartforms is PDF.
    Has anybody ever succeeded in getting the good pdf from smart form in the email ? Any idea what I am doing wrong ?
    V_FORMNAME = 'ZSD_DAILY_SHEET_DB'.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = v_formname
    importing
    fm_name = fm_name
    exceptions
    no_form = 1
    no_function_module = 2
    others = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION fm_name
      EXPORTING
       CONTROL_PARAMETERS         = w_ctrlop
       OUTPUT_OPTIONS             = w_compop
       USER_SETTINGS              = 'X'
       VTITLE                     = SY-TITLE
       VDATE                      = P_DATE
       VDATE2                     = SY-DATUM
    IMPORTING
       JOB_OUTPUT_INFO            = w_return
      TABLES
        I_DAILY                    = it_daily
        I_MONTHLY                  = it_monthly
        I_YEARLY                   = it_yearly
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 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.
    i_otf[] = w_return-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 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.
    ENDIF.
    * Convert PDF from 132 to 255.
    LOOP AT i_tline.
    * Replacing space by ~
    TRANSLATE i_tline USING ' ~'.
    CONCATENATE w_buffer i_tline INTO w_buffer.
    ENDLOOP.
    * Replacing ~ by space
    TRANSLATE w_buffer USING '~ '.
    DO.
    i_record = w_buffer.
    * Appending 255 characters as a record
    APPEND i_record.
    SHIFT w_buffer LEFT BY 255 PLACES.
    IF w_buffer IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    Refresh: i_reclist,
    i_objtxt,
    i_objbin,
    i_objpack.
    clear w_objhead.
    * Object with PDF.
    i_objbin[] = i_record[].
    DESCRIBE TABLE i_objbin LINES v_lines_bin.
    * Object with main text of the mail.
    i_objtxt = 'Find attached the Daily Dashboard Sheet.'.
    APPEND i_objtxt.
    i_objtxt = 'Regards,'.
    APPEND i_objtxt.
    i_objtxt = 'Dummy.
    APPEND i_objtxt.
    DESCRIBE TABLE i_objtxt LINES v_lines_txt.
    * Document information.
    w_doc_chng-obj_name = 'Smartform'.
    w_doc_chng-expiry_dat = sy-datum + 10.
    w_doc_chng-obj_descr = 'Smart form output'.
    w_doc_chng-sensitivty = 'F'. "Functional object
    w_doc_chng-doc_size = v_lines_txt * 255.
    * Pack to main body as RAW.
    * Obj. to be transported not in binary form
    CLEAR i_objpack-transf_bin.
    * Start line of object header in transport packet
    i_objpack-head_start = 1.
    * Number of lines of an object header in object packet
    i_objpack-head_num = 0.
    * Start line of object contents in an object packet
    i_objpack-body_start = 1.
    * Number of lines of the object contents in an object packet
    i_objpack-body_num = v_lines_txt.
    * Code for document class
    i_objpack-doc_type = 'RAW'.
    APPEND i_objpack.
    * Packing as PDF.
    i_objpack-transf_bin = 'X'.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    i_objpack-body_num = v_lines_bin.
    i_objpack-doc_type = 'PDF'.
    i_objpack-obj_name = 'Smartform'.
    i_objpack-obj_descr = 'Dashboard Sheet'.
    i_objpack-doc_size = v_lines_bin * 255.
    APPEND i_objpack.
    * Document information.
    CLEAR i_reclist.
    * e-mail receivers.
    i_reclist-receiver = p_mail.
    i_reclist-express = 'X'.
    i_reclist-rec_type = 'U'. "Internet address
    APPEND i_reclist.
    * Sending mail.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = w_doc_chng
    put_in_outbox = 'X'
    TABLES
    packing_list = i_objpack
    object_header = w_objhead
    contents_bin = i_objbin
    contents_txt = i_objtxt
    receivers = i_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.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Edited by: Arbaab Rahim on Sep 15, 2008 2:41 PM

    Rahim,
    in the FM, SO_NEW_DOCUMENT_ATT_SEND_API1 give COMMIT_WORK = 'X'.
    The following code works for me. Try this.
    *                      START-OF-SELECTION EVENT                       *
    START-OF-SELECTION.
    *" Read the HFA records into internal table............................
      SELECT *
        FROM zhfa
        INTO TABLE t_zhfa
       WHERE zz_vin6 IN s_vin6.
      IF sy-subrc NE 0.
        MESSAGE text-002 TYPE 'W'.
      ENDIF.                               " IF SY-SUBRC NE 0
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = 'YH1145_HFA1'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
       IMPORTING
         fm_name                  = w_name
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2.
        w_control-getotf = 'X'.
        w_control-no_dialog = 'X'.
        w_output-tdnoprev = 'X'.
        LOOP AT t_zhfa INTO fs_zhfa.
          CALL FUNCTION '/1BCDWB/SF00000457'
            EXPORTING
    *   ARCHIVE_INDEX              = ARCHIVE_INDEX
    *   ARCHIVE_INDEX_TAB          = ARCHIVE_INDEX_TAB
    *   ARCHIVE_PARAMETERS         = ARCHIVE_PARAMETERS
             control_parameters         = w_control
    *   MAIL_APPL_OBJ              = MAIL_APPL_OBJ
    *   MAIL_RECIPIENT             = MAIL_RECIPIENT
    *   MAIL_SENDER                = MAIL_SENDER
             output_options             = w_output
             user_settings              = 'X'
              fs_zhfa                    = fs_zhfa
           IMPORTING
    *   DOCUMENT_OUTPUT_INFO       = DOCUMENT_OUTPUT_INFO
             job_output_info            = w_return
    *   JOB_OUTPUT_OPTIONS         = JOB_OUTPUT_OPTIONS
           EXCEPTIONS
             formatting_error           = 1
             internal_error             = 2
             send_error                 = 3
             user_canceled              = 4.
    *" w_return-otfdata holds the smartform OTF data.................
        append lines of w_return-otfdata to t_otf.
        ENDLOOP.
    *" t_otf is the OTF data.........................................
    *" t_line is the PDF data.......................................
        CALL FUNCTION 'CONVERT_OTF'
         EXPORTING
           format                      = 'PDF'
           max_linewidth               = 132
    *   ARCHIVE_INDEX               = ' '
    *   COPYNUMBER                  = 0
    *   ASCII_BIDI_VIS2LOG          = ' '
    *   PDF_DELETE_OTFTAB           = ' '
         IMPORTING
           bin_filesize                = w_filesize
    *   BIN_FILE                    = BIN_FILE
          TABLES
            otf                         = t_otf
            lines                       = t_line
         EXCEPTIONS
           err_max_linewidth           = 1
           err_format                  = 2
           err_conv_not_possible       = 3
           err_bad_otf                 = 4.
        LOOP AT t_line.
          CONCATENATE w_string t_line INTO w_string.
        ENDLOOP.
    *" convert the 132 line character to 255 character ..................
        DO.
          t_attach = w_string.
          APPEND t_attach.
          SHIFT w_string LEFT BY 255 PLACES.
          IF w_string IS INITIAL.
            EXIT.
          ENDIF.
        ENDDO.
        t_objbin[] = t_attach[].
    *" body of the mail..................................................
        CLEAR t_message. REFRESH t_message.
        t_message = 'This is a mail from SAP ECC6'.
        APPEND t_message.
        t_message = 'Thanks and Regards'.
        APPEND t_message.
        t_message = 'Indu'.
        APPEND t_message.
        DESCRIBE TABLE t_message LINES w_msg.
        w_docdata-obj_name = 'SAPRPT'.
        w_docdata-expiry_dat = sy-datum + 10.
        w_docdata-obj_descr = 'Smartform mail from Indu'.
        w_docdata-sensitivty = 'F'.
        w_docdata-doc_size = w_msg * 255.
        w_docdata-obj_langu = sy-langu .
    *" type of the mail send: packing_list.........................
        CLEAR t_packing_list. REFRESH t_packing_list.
        t_packing_list-transf_bin = space.
        t_packing_list-head_start = 1.
        t_packing_list-head_num = 0.
        t_packing_list-body_start = 1.
        t_packing_list-body_num = w_msg.
        t_packing_list-doc_type = 'RAW'.
        APPEND t_packing_list.
        t_packing_list-transf_bin = 'X'.
        DESCRIBE TABLE t_objbin LINES w_objbin.
    *" doc_size = (lines in pdf table) * 255......................
        t_packing_list-doc_size = w_objbin * 255.
        t_packing_list-body_num = w_objbin.
        t_packing_list-doc_type = 'PDF'.
        t_packing_list-obj_name = 'smart'.
        t_packing_list-obj_descr = 'test'.
        APPEND t_packing_list.
        CLEAR t_receivers.
        t_receivers-receiver = '<email id>'.
        t_receivers-rec_type = 'U'.
        APPEND t_receivers.
        CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
          EXPORTING
            document_data                    = w_docdata
           put_in_outbox                    = 'X'
           sender_address                   = sender
    *   SENDER_ADDRESS_TYPE              = 'B'
           commit_work                      = 'X'
    * IMPORTING
    *   SENT_TO_ALL                      = SENT_TO_ALL
    *   NEW_OBJECT_ID                    = NEW_OBJECT_ID
    *   SENDER_ID                        = SENDER_ID
          TABLES
            packing_list                     = t_packing_list
    *   OBJECT_HEADER                    = OBJECT_HEADER
           contents_bin                     = t_objbin
           contents_txt                     = t_message
    *   CONTENTS_HEX                     = CONTENTS_HEX
    *   OBJECT_PARA                      = OBJECT_PARA
    *   OBJECT_PARB                      = OBJECT_PARB
            receivers                        = t_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.
        IF sy-subrc NE 0.
          WRITE:/ 'Error When Sending the File', sy-subrc.
        ELSE.
          WRITE:/ 'Mail sent'.
        ENDIF.
        SUBMIT rsconn01 USING SELECTION-SET 'INT' AND RETURN.
        CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.
      ELSEIF p_fax EQ 'X'.

  • Printing document with Notes/Comments and underlined/highlighted text

    Dear all,
    I have been reading a document and highlighted & underlined parts of it.
    In addition I also inserted notes.
    Now when trying to print the document with the "summarize comments function" (I translate this from the
    german version so there it might be called somewhat differently in english) in the print menue, I receive a the
    original document plus attached several pages including my notes (now numbered) PLUS entries for every line I highlighted, underlined etc.
    Evidently I only want the text of my comments, not empty entries for each line I have highlighted.
    To be clear, I would like to keep the text highlighted / underlined - but I don't need the
    entries for that in the appended section. A document of 18 pages otherwise suddently gets 48 pages...(with only
    a few added notes).
    I have to say I am somewhat puzzled how difficult it is to sort this out. Thought that must be
    something rather trival (or am I blind and make a silly mistake)?
    To make it more clear here screenshot from what I refer to
    Many thanks for any help.
    r

    Dear Lori,
    many thanks for your swift response. Did I understand you correctly - there is no way to keep all the comments (underlined/highlighted/stick notes) in the text and only inlcude the content of the sticky notes at the end of the document? If I filter, as suggested by you, then the underlined/highlighted parts will not show up in the appended pages (that's good) - but they are also not longer visible in the main text (that's bad...).
    I would have thought what I am trying is rather ordinary - Highlighting/underlining text and adding comments. And when I print the document, i would like to get the edited text plus the content of the comments (sticky notes). (And not an empty entry for all highlighted/underlined words). I am somewhat puzzled.
    Many thanks again.
    r

  • How to use FM named 'TABLE_COMPRESS'

    i am using FM named 'TABLE_COMPRESS'
    it is sending compressed values via function module  'SO_NEW_DOCUMENT_ATT_SEND_API1' (in attachment)
    but i am not able to see content after mail is sent.

    Hi Manish,
    Check the following link:
    http://www.sap-img.com/abap/sending-email-with-attachment.htm
    Thanks,
    Reward If Helpful.

  • Windows 8 Explorer cannot see NAS drive on WiFi connected laptop

    I have several devices on my home network. Windows XP PC's, Windows 7 PC's, Android tablets, and 2 Windows 8 laptops.  All the devices can see the harddrive attached to my WiFi router except for one of the Windows 8 laptops and I can't seem to figure
    out a solution.
    That laptop, compared to all the other devices, connects by a Wireless G adapter vs. Wirless N for everything else, but I don't think that's the problem.
    It CAN access the NAS drive through Windows Media Player, however, only media in that case and not documents.
    Why can it see the drive through WMP but not Explorer???  ...and what's the fix?
    Any ideas would be greatly appreciated!
    The laptop has a Windows 8 32-bit upgrade installed. 
    Windows Explorer shows the Media access for the drive, but not the drive itself.

    For a regedit newbie, can you please provide step-by-step details how to: "create a new DWORD entry with the name EnableLinkedConnections and value 1". Is this a new line to be
    inserted? Thanks.
    Below is my situation. I posted an earlier version of this query on Microsoft Community and was advised to move to here on Technet.
    I am having trouble mapping
     and connecting shared drives on my NAS using WiFi. I have three new Acer i5-4th Gen laptops running Windows 8 with Intel 7260-N WiFi cards and Kaspersky Internet Security 2013 loaded. My NAS is also new. It is a Zyxel NSA325, replacing a
    WD My Book World Edition. The hard drives from two such WD boxes went into the Zyxel. So I do not have another NAS on hand to test. My router is unchanged. It is a Netgear WNDR3700v1 pre-MIMO dual-band N-router.
    One of the new Acers is a V7-482PG-6662. The other two laptops are M5-583P-6428 machines. The Acer V7 never had a problem with connections – neither via Ethernet nor via WiFi. Both
    M5’s had troubles at first via WiFi. Then I got one to work. But the second Acer M5 stubbornly only connects reliably via Ethernet; the NAS only shows reliably under Network on File Manager when using Ethernet. Maybe one in five times that I reboot with WiFi,
    can I see the NAS under Network on File Manager.
    I also have an old Dell Win-7 Ultimate desktop. It has no problems connecting via shared drives to the NAS via WiFi. I also have an old WD TV-Live Plus attached via Ethernet that accesses
    the NAS via Media Server, not via Network Shares. All PCs plus a Samsung Android Tablet can see / access the NAS reliably as a media server over WiFi.
    I went through many, many recommendations from the internet, trying to fix the WiFi problem for the Acer M5s. For example:
    Turn on various or all Advanced Network Sharing options, e.g., Discovery and File Sharing
    Make sure that Client for Microsoft Networks is on
    Set up and reset Windows Credentials for users
    Enter net config server /autodisconnect:-1 as admin
    Make sure that Network List Service is started on automatic (as well as not on)
    Tried using Net Use commands to map the drive, but got error message 53s
    Updated WiFi card drivers
    Multiple cycles of closing down all network advanced sharing settings, then uninstalling and reinstalling network adapters via device manager, then opening up all network advanced sharing settings (as described
    in the technet item: fix-for-cannot-access-nas-drives-sharefolder-is-not-accessible-or-error-code-0x80070035 ).
    Various cycles and sequences of rebooting and leaving machines on with the hope that they would connect.
    I have not tried any of the advice about reg editing or setting different MTU values. Most of such advice online dates from 2009. And it was not needed to get the one Acer M5 machine
    working.
    After cycling through the items above, the one Acer M5 started listing the NAS occasionally under Network in File Manager. At first this only happened in like 1 in 20 reboots. But
    I started getting luckier. And after one round of closing down shares and reinstalling adapters, it started to work reliably. And has kept working ever since.
    I now have the second Acer M5 connecting via WiFi in about one in five reboots. But this is not satisfactory. Normally, the NAS only shows under Network on File Manger, and only allows
    drives to be mapped, when the laptop is connected via Ethernet. I tried comparing adapter settings between when using Ethernet and using WiFi (for example, that the same Microsoft LLDP protocols are ticked). I also put both Acer M5s side by side to compare
    settings. I also tried repairing Windows 8 and reloading all Windows updates. But I have not thus far gone all the way back to a complete Windows 8 restore to factory conditions.
    Advice, help please, thanks.
    Wait for Win-8.1?

  • Why does DW change my image's proportions?

    EVERY image I bring onto my Dreamweaver CS4 pages comes in out of proportion unless I use it as a background image inside a div.
    When I try to resize it, it springs back to the same wrong proportions. When I go into the html and enter the actual pixel dimensions into the code, it STILL remains out-of-proportion.
    I'm not sure if this is a bug, or what could be causing this, but I need to solve this, so any help will be greatly appreciated!

    Thanks for your response. The code to the div is below, plus attached is an image of the out-of-proportion image of the map inside it.
    CSS:
    #map{position:absolute; top: 394px; left: 494px; width: 336px; height: 180px}
    HTML:
    <div id="map"><img src="images/map.jpg" width="336" height="180" /></div>

Maybe you are looking for

  • Windows 8.1 with Bing - Images partition

    Hello, I have a HP Stream 11 installed with Windows 8.1 with BING. Trying to free up disk space I have deleted the Recovery-partition, or what I thought was just a recovery partition. It actually has the name "images" and deleting it immediately brok

  • What's up app for n900?????

    is what's up application availabl for nokian900? if yes then from where can i download???

  • AirPort HDD very slow

    Hi I was wondering if you guys could help me out with the Apple AirPort Extreme wireless router/networked HDD. I am connected to the AirPort via gigabit ethernet and I get VERY slow write speeds. For example, I tried moving about 20gigs worth of vide

  • How can I revert to Dreamweaver CS6?

    Hi, I have tried to follow the guides on the Adobe blog, but I can't seem to find a way to revert from Dreaweaver CC 2014 back to Dreamweaver CS6. I prefer the colour palette in CS6, plus in CC it doesn't allow me to show html special characters in C

  • Power Query - OData Connection to CRM - On Premise

    Hi All. I'm trying to connect Power Query to CRM via an Odata connection and I cannot seem to get it to work. I have an on premise CRM organization so I figured that the online issue wouldn't apply, but I might be wrong. I post the OData URL when pro