Submit by Email as PDF attachment instead of XML

We created a form in Adobe LiveCycle Designer and added a "Submit by Email" button. When the user selects the button, an email message starts but the attachment is an XML extension. How can we change that so when the button is selected, the attachment comes as the completed form in PDF?
Thanks,
Tim

If you want people to be able to submit the entire PDF instead of just the data then you will need to "Reader Extend" the form using Adobe LiveCycle Reader Extensions ES. If the volume and number of users is low (please read the EULA for complete details) then you may also extend the form using Acrobat.

Similar Messages

  • Sending form as pdf attachment instead of xml

    I have created a form for the web where clients may fill it out and submit it to an email address. I had hoped this would be a pdf file, but it is coming as an xml file. How do i change it to pdf? Thanks in advance.
    Bob

    Change the button to a regular button. Choose the submit option on the Object Palette. This will turn it into a submit button. A new submit tab will appear. Click on th esubmit tab and choose the submit type of PDF. Now you need to enter a URL for the form to do its submission. Use the mailto: protocol to set the recievers information. If you do a google search for mailto you will see a complete listing of how you can control all aspects of the email message.

  • How do I add text message to this email with PDF attachment?

    Good day, everyone!
    Okay, we have a "z"-version of program RFFOUS_T and some of its include codes.  One include code, RFFORIO6, has a form called MAIL_PDF_ADVICE.  It is in this form that we are emailing a remittance advice form.  The actual form is attached as a PDF file.
    Unfortunately, there's no text in the body of the email -- it's just the attachment -- so the users would like us to add a couple basic lines in the body of the email that explain the attachment.  I'm pretty new to using this particular FM and emailing the PDF attachment, and I've gotten stuck in my research trying to find out exactly how to do this.  I'm guessing this shouldn't be all that difficult, but I'm not finding the right solution.  Here's the form:
    *&      Form  mail_pdf_advice
          E-mail PDF advice
         -->IT_ADVICE     PDF form (output from Adobe server)
         -->I_PDF_LEN     length of PDF advice in bytes
    FORM mail_pdf_advice USING it_advice   TYPE solix_tab
                               i_pdf_len   TYPE i.
      DATA:
        lt_receivers       TYPE TABLE OF somlreci1 WITH HEADER LINE,
        l_user             LIKE soextreci1-receiver,
        ls_send_doc        LIKE sodocchgi1,
        lt_pdf_attach      TYPE TABLE OF sopcklsti1 WITH HEADER LINE.
      CHECK NOT finaa-intad IS INITIAL.
      CHECK finaa-nacha EQ 'I'.
    *--- determine E-Mail sender and recipient
      IF fsabe-usrnam EQ space.
        l_user = sy-uname.
      ELSE.
        l_user = fsabe-usrnam.         "Office-User des Sachbearb.
      ENDIF.
      lt_receivers-receiver = finaa-intad.
      lt_receivers-rec_type = 'U'.      "E-mail address
      APPEND lt_receivers.
      ls_send_doc-obj_descr =  itcpo-tdtitle.
      lt_pdf_attach-transf_bin = 'X'.
      lt_pdf_attach-doc_type   = 'PDF'.
      lt_pdf_attach-obj_langu  = reguh-zspra.
      lt_pdf_attach-body_start = 1.
      lt_pdf_attach-doc_size   = i_pdf_len.
      DESCRIBE TABLE it_advice LINES lt_pdf_attach-body_num.
      APPEND lt_pdf_attach.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = ls_send_doc
          sender_address             = l_user
        TABLES
          packing_list               = lt_pdf_attach
          contents_hex               = it_advice
          receivers                  = lt_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.
    <error checking code snipped>
    Does someone know how to do this?  <b><REMOVED BY MODERATOR></b>  Thanks so much in advance!
    Dave
    Message was edited by:
            Alvaro Tejada Galindo

    Hi Dave,
    Table <b>contents_bin</b> is used to pass attachment file and <b>contents_txt</b> is used to pass mail body contents. You need to declare one more int table to give contents for mail body.
    For reference check the code below
    ut_message is for message body
    and ut_attach is having attachement file.
      FORM send_file_as_email_attachment TABLES ut_message
                                              ut_attach
                                        USING uv_email
                                              uv_mtitle
                                              uv_format
                                              uv_filename
                                              uv_attdescription
                                              uv_sender_address
                                              uv_sender_addres_type
                                     CHANGING uc_error
                                              uc_reciever.
      DATA:  l_error                TYPE  sy-subrc,
             l_reciever             TYPE  sy-subrc,
             l_mtitle               LIKE  sodocchgi1-obj_descr,
             l_email                LIKE  somlreci1-receiver,
             l_format               TYPE  so_obj_tp ,
             l_attdescription       TYPE  so_obj_nam ,
             l_attfilename          TYPE  so_obj_des ,
             l_sender_address       LIKE  soextreci1-receiver,
             l_sender_address_type  LIKE  soextreci1-adr_typ,
             l_receiver             LIKE  sy-subrc.
      DATA:   lt_packing_list    LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
              lt_contents        LIKE solisti1   OCCURS 0 WITH HEADER LINE,
              lt_receivers       LIKE somlreci1  OCCURS 0 WITH HEADER LINE,
              lt_attachment      LIKE solisti1   OCCURS 0 WITH HEADER LINE,
              lt_object_header   LIKE solisti1   OCCURS 0 WITH HEADER LINE,
              l_cnt TYPE i,
              l_sent_all(1) TYPE c,
              lw_doc_data LIKE sodocchgi1.
      l_email               = uv_email.
      l_mtitle              = uv_mtitle.
      l_format              = uv_format.
      l_attdescription      = uv_attdescription.
      l_attfilename         = uv_filename.
      l_sender_address      = uv_sender_address.
      l_sender_address_type = uv_sender_addres_type.
    Fill the document data.
      lw_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      lw_doc_data-obj_langu = sy-langu.
      lw_doc_data-obj_name  = 'SAPRPT'.
      lw_doc_data-obj_descr = l_mtitle.
      lw_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR lw_doc_data.
      READ TABLE ut_attach INDEX l_cnt.
      lw_doc_data-doc_size =
         ( l_cnt - 1 ) * 255 + STRLEN( ut_attach ).
      lw_doc_data-obj_langu  = sy-langu.
      lw_doc_data-obj_name   = 'SAPRPT'.
      lw_doc_data-obj_descr  = l_mtitle.
      lw_doc_data-sensitivty = 'F'.
      CLEAR lt_attachment.
      REFRESH lt_attachment.
      lt_attachment[] = ut_attach[].
    Describe the body of the message
      CLEAR lt_packing_list.
      REFRESH lt_packing_list.
      lt_packing_list-transf_bin = space.
      lt_packing_list-head_start = 1.
      lt_packing_list-head_num = 0.
      lt_packing_list-body_start = 1.
      DESCRIBE TABLE ut_message LINES lt_packing_list-body_num.
      lt_packing_list-doc_type = 'RAW'.
      APPEND lt_packing_list.
    Create attachment notification
      lt_packing_list-transf_bin = 'X'.
      lt_packing_list-head_start = 1.
      lt_packing_list-head_num   = 1.
      lt_packing_list-body_start = 1.
      DESCRIBE TABLE lt_attachment LINES lt_packing_list-body_num.
      lt_packing_list-doc_type   =  l_format.
      lt_packing_list-obj_descr  =  l_attdescription.
      lt_packing_list-obj_name   =  l_attfilename.
      lt_packing_list-doc_size   =  lt_packing_list-body_num * 255.
      APPEND lt_packing_list.
    Add the recipients email address
      CLEAR lt_receivers.
      REFRESH lt_receivers.
      lt_receivers-receiver = l_email.
      lt_receivers-rec_type = 'U'.
      lt_receivers-com_type = 'INT'.
      lt_receivers-notif_del = 'X'.
      lt_receivers-notif_ndel = 'X'.
      APPEND lt_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = lw_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = l_sent_all
        TABLES
          packing_list               = lt_packing_list
          contents_bin               = lt_attachment
          contents_txt               = ut_message
          receivers                  = lt_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.
    Message was edited by:
            Amit Kumar

  • Send Invoice email with pdf attachement through DI?

    Hi all,
    is it possible to send an Invoice email with pdf attachement through DI as it can be done through UI?
    Best Regards,
    Vangelis

    Hi Vangelis,
    I Don't think that the DI API has that functionality (but I am not sure).
    However with .Net's System.Net.Mail it should be quite easy to build.
    Good luck,
    Johan

  • Sending smartform through email as PDF attachment

    Hi,
    I want to send a smartform through email as pdf attachment.In the code I have hardcoded the receiver mail id.But I don't want this to be sent only to a particular receiver.I want this to be sent as many people as I can without hardcoding their mail id's in the program.How can I do that?
    Regards,
    Hema

    **Data Declarations
    **Internal Table
    DATA : BEGIN OF it_spfli OCCURS 0,
              carrid LIKE spfli-carrid,
              connid LIKE spfli-connid,
           END OF it_spfli.
    DATA:   it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            it_contents     LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    storing receivers      
            it_receivers    LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    **storing file attachment data
            it_attachment   LIKE solisti1 OCCURS 0 WITH HEADER LINE,                    gd_doc_data     LIKE sodocchgi1,
            gd_error        TYPE sy-subrc,
            l_gntxt         LIKE t357g_t-gntxt,
            lv_message(100) TYPE c.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE. "storing mail body
    DATA : psubject(30) TYPE c VALUE 'Sample Mail'. "subject of the mail
    DATA : ld_format TYPE so_obj_tp , "file format
           ld_attfilename TYPE so_obj_des, "file name
           w_cnt TYPE i.
    **Selecting the data
    SELECT carrid connid INTO TABLE it_spfli FROM spfli WHERE carrid EQ 'AA'.
    **Perform for populating mail body
    PERFORM populate_message.
    **Perform for populating file attachment
    PERFORM populate_attachment.
    **Perform for populating mail characteristic info
    PERFORM populate_pack.
    **Perform for populating receivers
    PERFORM populate_receivers.
    **Perform to send mail
    PERFORM send_mail.
    *&      Form  populate_message
          text
    -->  p1        text
    <--  p2        text
    FORM populate_message .
    **Populating the body
      lv_message = 'Sample mail for testing purpose.'.
      APPEND lv_message TO it_message.
    ENDFORM.                    " populate_message
    *&      Form  populate_attachment
          text
    -->  p1        text
    <--  p2        text
    FORM populate_attachment .
    **Populating the attachment file with the data from final intenal table
      CONCATENATE 'CARRIER ID'
                  'CONNECTION ID'
                  INTO it_attachment SEPARATED BY
                  cl_abap_char_utilities=>horizontal_tab.
      CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
      it_attachment.
      APPEND it_attachment.
      LOOP AT it_spfli.
        CONCATENATE it_spfli-carrid it_spfli-connid INTO it_attachment SEPARATED BY
                 cl_abap_char_utilities=>horizontal_tab.
        CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
        it_attachment.
        APPEND it_attachment.
      ENDLOOP.
    ENDFORM.                    " populate_attachment
    *&      Form  populate_receivers
          text
    -->  p1        text
    <--  p2        text
    FORM populate_receivers .
    **Populating Mail Recepients
    **If there are more than one mail recepient then loop and append them to it_receivers
      it_receivers-receiver = '[email protected]'.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      it_receivers-express = 'X'.
      APPEND it_receivers.
    ENDFORM.                    " populate_receivers
    *&      Form  populate_pack
          text
    -->  p1        text
    <--  p2        text
    FORM populate_pack .
    **File Type
      ld_format = 'XLS'.
    **File Name
      ld_attfilename = 'File1'.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject .
      gd_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR gd_doc_data.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      READ TABLE it_attachment INDEX w_cnt.
      gd_doc_data-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_attachment ).
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      CLEAR it_packing_list.
      REFRESH it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      APPEND it_packing_list.
    **Describe the attachment info
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_attachment LINES  it_packing_list-body_num.
      it_packing_list-doc_type = ld_format.
      it_packing_list-obj_name = ld_attfilename.
      it_packing_list-obj_descr = ld_attfilename.
      it_packing_list-doc_size = it_packing_list-body_num * 255.
      APPEND it_packing_list.
    ENDFORM.                    " populate_pack
    *&      Form  send_mail
          text
    -->  p1        text
    <--  p2        text
    FORM send_mail .
    **Function Module to send mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = gd_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_packing_list
          contents_bin               = it_attachment
          contents_txt               = it_message
          receivers                  = it_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.
    ENDFORM.                    " send_mail

  • Custome FM to create Email with PDF attachment

    Hi Experts,
    I am working in Smart form.  my requriment is to create a Custom Function module , for sending  email  with PDF attachment  to the customer. PDF is nothing but which ever I create smart form.
    How can I approach , please give me a suggestion or send me a sample code, if any one create.
    1. This FM should work like : convert form to PDF and send Email to particular customer.

    Hi,
    Steps to convert Smartform to PDF,
    1 Call smartform through FM SSF_FUNCTION_MODULE_NAME.
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    2  Converting Smartform to OTF and in turn to PDF
       Set Following parameter in order to convert Smartform into OTF.
      gs_cparam-no_dialog = 'X'.   " Suppressing the dialog box
      gs_cparam-preview = 'X'.     " for print preview
      gs_cparam-getotf = 'X'.     " To get Output in OTF
        CALL FUNCTION g_fmodule
          EXPORTING
            control_parameters = gs_cparam
            output_options     = gs_outoptions
          IMPORTING
            job_output_info    = gt_otf_from_fm
          TABLES
            gt_final           = gt_final
         gt_otf[] = gt_otf_from_fm-otfdata [].
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
          IMPORTING
            bin_filesize          = g_bin_filesize
          TABLES
            otf                   = gt_otf
            lines                 = gt_pdf_tab
        CHECK sy-subrc = 0.
        g_bin_filesize = g_bin_filesize + 1.
    Transfer the 132-long strings to 255-long strings
        LOOP AT gt_pdf_tab into gs_pdf_tab.
          TRANSLATE gs_pdf_tab USING ' ~'.
          CONCATENATE g_buffer gs_pdf_tab INTO g_buffer.
        ENDLOOP.
        TRANSLATE g_buffer USING '~ '.
        DO.
          gs_mess_att = g_buffer.
          APPEND gs_mess_att to gt_mess_att.
          SHIFT g_buffer LEFT BY 255 PLACES.
          IF g_buffer IS INITIAL.
            EXIT.
          ENDIF.
        ENDDO.
    3 For Sending Mail use following mail,
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = ls_doc_data
          put_in_outbox              = 'X'
          sender_address             = l_sender_address
          sender_address_type        = l_sender_address_type
          commit_work                = 'X'
        TABLES
          packing_list               = lt_packing_list
          contents_bin               = lt_attachment
          contents_txt               = lt_message
          receivers                  = lt_receivers
    I hope this could help you,
    Please let me know if any issue.
    Thanks & regards,
    ShreeMohan
    Edited by: ShreeMohan Pugalia on Jul 18, 2009 8:02 AM
    Edited by: ShreeMohan Pugalia on Jul 18, 2009 8:03 AM
    Edited by: ShreeMohan Pugalia on Jul 18, 2009 8:05 AM

  • Sending email with pdf attachment

    I have a need to save several screens from within my flash
    projector into a
    multi page pdf document and then email the pdf to an address
    that the user
    types in.
    Is this at all possible?
    Many thanks
    dave

    hi
    can u provide any sample code to send attachment from oracle mail
    any attachment html/text/pdf..
    is java mailnecessary for that or object should me stored in database

  • Emails with PDF attachment rejected?

    I'm having an issue sending emails to one organization with a PDF attachement. I can email them with any other attachments - I zipped the PDFs and they went through fine - and I can send the PDFs to other people. The emails are rejected with "The e-mail system had a problem processing this message. Microsoft Exchange will not try to redeliver this message for you." It's a government agency so talking to their IT dept hasn't been an option so far. Has anyone encountered this and/or have a fix?
    I'm using Acrobat Pro 9.2.0, Mac Snow Leopard 10.6.2.
    Thanks
    Mark

    If they are having a problem when the file is zipped, it's doubful that it's an Acrobat problem if you can open it without issue before zipping it.
    alaskagrown wrote:
    New developments...
    Now I'm having issues where people can receive my emails, but when they try to open the PDF attachment it says it's a corrupt file and won't open. I tried zipping it first and sending and that seemed to work a couple times, but now they're still saying corrupt. This is with several different files sent to several different people. I doubted that it was an Acrobat problem, but these new developments make me wonder.

  • Sending an email with pdf attachment in Ecc6

    we were in 4.6 c and recentely upgraded to ECC6. we have a program which we are sending email with pdf attachments. now it is breaking, we are able to display the pdf in the screen, but once it became the attachment , it is not going.
    we are running the program in forground and not reading the spool and sending it. any idea

    http://www.sap-img.com/abap/sending-email-with-attachment.htm
    Sending mail to an external maild with PDF attachment.
    Creating a PDF attachment and send it via Email
    Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
    How to send a ttachment with email.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-Sendthespooldatatoanemail+address.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSpoolrequesttoPDFandsendase-mail
    Friend just have a look in the forum itself, there are many posts for ur query, you definetly get exact solution no need to wait for answers/solutions.
    All the best

  • How do I setup an automatic daily email with PDF attachment?

    I would like to setup an automatic daily e-mail (that will send every day around 6 AM), with an PDF attachment retrieved from a web URL.  The web URL is constant (that is the PDF file name never changes).    Any ideas?  I've messed around with automator with poor results at best.  Thanks in advance!
    P.S..... Apologies if this is in the wrong forum!

    Just one specific email addres... myself. 
    There is an online report that is updated every morning at 5:30 AM MST.  The ideal solution would email that document to myself every morning.; thus when I wake up, it's sitting in my inbox (iPhone/Macbook/Gmail, etc.)

  • External Send PO as email with PDF attachment not working

    hi,
    we are using ECC6, and in txn NACT, Processing routine we can use Sapscript External send > SAPFM06P > ENTRY_NEU > MEDRUCK > PDF and in MN04/5 i create Output record, and in SCOT my PO is ready for transmission from either ME21N/2 and ME9F - works well - email sent with pdf PO attached.
    <b>HOWEVER,</b> we have just created a SMARTFORM PO, and with similar settings, i cannot create External send OUTPUT!!! (Output failed in ME9F/ME23N) NACT settings External Send > /SMB40/FM06P > Z_MMPO_A > PDF
    In SCOT > SMTP > Internet X > Sapscript/SmartForm = PDF.
    Does special code need to be entered into Smartform to generate PDF email similar to Sapscript? Any code would be appreciated.
    regards Adam

    Hi,
    You need to build a code to create the Spool OTF output into PDF.
    This can be done in Print program, which converts the spool into PDF & sends a mail with PDF attachment.
    Please refer this sample program:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Best regards,
    Prashant

  • Edit invoice smartform to email with pdf attachment

    Hi,
    I need to send the invoice details by mail that are currently only printed through the edit function.
    When i go to VF02 enter invoice number and then edit, is it possible to send this message through email with the invoice as pdf attachment?
    Also it would be necessary to enter receivers email at that time.
    Maybe there is an exit before the sending that could raise a popup...
    Do you think this can be done this way?
    Thanks,
    Laurent.

    Hi Laurent
    I have done this succesfully in a different way:
    1) Create a Z Table for the email ID per Bill to party  - this table accomodates up to 999 email ids per customer and also has a column for CC
    2) Create a new output type for EMAIL purposes with the Transmission medium as 1 -
    assign the output program and form to this.
    In the program, add new code to refer to the new Z table for getting the email ids of respective Bill to parties
    In the program add code to convert the form to PDF format and attach to the email craeted.
    Your ABAPPER should be able to assist in this code writing - in my case it took some time to get the desired result but the customers are very happy with the end result -
    best wishes
    Nandu

  • Email with pdf attachment

    Hi all,
    Please tell me the steps to send a mail with a pdf attachment.
    Regards,
    Sabu.

    Hi,
    Use the following  function modules to send a PDF as an attachment
    Once you have a spool, you can convert it to PDF by using function module
    "CONVERT_ABAPSPOOLJOB_2_PDF"
    For sending emails with attachments use:
    "SO_NEW_DOCUMENT_ATT_SEND_API1"
    here you need to pass
    1) DOCUMENT_DATA - For Document Attributes. Here you mainly specifies your list title, description
    2) PUT_IN_OUTBOX = SPACE -> If you do not want to save an email.
    3) CONTENTS_TXT -> text to be written in email
    4) CONTENTS_BIN - > for attachment
    5) RECEIVERS -> Recepients of Mail
    Regards,
    Raj.

  • Problem in sending online interactive form in email as PDF attachment

    Hi,
    I am trying to send online intercative forms as PDF attachment once user fills it and click on send button. But this mail i am trying to send from SAP workflow. For this am using one function module which is accepting the pdfsource context attribute of binary type as Xstring. Once i run the webdynpro application i am getting mail in out look but when i open the attachment i am getting error file is damaged.
    Can you pls help me in solving this, Or any other way for doing the same.
    Here is the code i am using for triggering the RFC from WD
    Zsend_Mail_Attachment_Sev_Input mail = new Zsend_Mail_Attachment_Sev_Input();     
              //to capture the outplacement level entered in the form
              mail.setI_Out_Place_Level(wdContext.currentVn_severancedetailsElement().getVa_outplacement_level().getBytes());
         mail.setI_Bin_Data(wdContext.currentContextElement().getPdfSource());
         wdContext.nodeZsend_Mail_Attachment_Sev_Input().bind(mail);
         try
              wdContext.currentZsend_Mail_Attachment_Sev_InputElement().modelObject().execute();
              wdComponentAPI.getMessageManager().reportSuccess("Notification Sent Successfully.");
         catch (WDDynamicRFCExecuteException e)
              // TODO Auto-generated catch block
              wdComponentAPI.getMessageManager().reportSuccess(" This is inside the mail exception!!"+e);
              e.printStackTrace();
    Here is the function module code
    FUNCTION ZSEND_MAIL_ATTACHMENT_SEV.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
    *"     VALUE(I_BIN_DATA) TYPE  XSTRING OPTIONAL
    *"  TABLES
    *"      T_V_BIN_DATA STRUCTURE  SOLISTI1
    *"      IT_MESSAGE STRUCTURE  SOLISTI1
    Data Declaration
      DATA: gd_cnt TYPE i,
            gd_sent_all(1) TYPE c,
            gd_error TYPE sy-subrc,
            tab_lines LIKE sy-tabix,
            v_subject(255) VALUE 'HI'.
    Structure Declaration
      DATA : BEGIN OF it_file OCCURS 0,
              row(255),
             END OF it_file.
      DATA : BEGIN OF i_split OCCURS 0,
      row(50),
      END OF i_split.
    DESCRIBE TABLE it_message LINES tab_lines.
    READ TABLE it_message INDEX tab_lines.
    Internal Table Declaration
      data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
      DATA : objbin LIKE SOLIX OCCURS 0 WITH HEADER LINE.
      DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      data : wa_receiver like table of SOMLRECI1 with header line.
      data : it_receiver like table of SOMLRECI1 with header line.
      DATA :   gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
      REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
      CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
    gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
    gd_doc_data-obj_langu = sy-langu.
    gd_doc_data-obj_name = 'SENDFILE'.
    gd_doc_data-obj_descr = v_subject.
    gd_doc_data-sensitivty = 'O'.
    APPEND GD_DOC_DATA.
    Appending The Internal Table it_packing_list
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'RAW'.
      it_packing_list-body_num = tab_lines.
      APPEND it_packing_list.
      move i_bin_data to t_v_bin_data.
    ********Add By Anuj
      APPEND t_v_bin_data.
    ********End Add By Anuj
      LOOP AT t_v_bin_data.
        MOVE t_v_bin_data TO objbin-line.
        APPEND objbin.
      ENDLOOP.
      CLEAR it_packing_list.
      DESCRIBE TABLE objbin LINES tab_lines.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'PDF'.
      it_packing_list-body_num = tab_lines.
      it_packing_list-doc_size = tab_lines * 255.
      APPEND it_packing_list.
      wa_receiver-receiver = '[email protected]'.
      wa_receiver-rec_type = 'U'.
      wa_receiver-com_type = 'INT'.
      APPEND wa_receiver.
      move wa_receiver[] to it_receiver[].
      append it_receiver.
    *Appending The Internal Table it_receivers
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
    append it_receiver.
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
    append it_receiver.
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
    append it_receiver.
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver to it_receiver.
    append it_receiver.
      Move wa_receiver[] to it_receivers[].
    Clear it_receivers.
      if i_OUT_PLACE_LEVEL NE 0.
    loop at it_receivers into wa_receiver.
       loop at it_receivers into wa_receiver.
    *Function Module To Post The Message To Externa Mail
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = gd_doc_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = it_packing_list
            contents_hex               = objbin
            receivers                  = it_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.
        clear wa_receiver.
       endloop.
      elseif i_OUT_PLACE_LEVEL eq 0.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = gd_doc_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = it_packing_list
            contents_hex               = objbin
            receivers                  = it_receiver
          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.
        clear wa_receiver.
      endif.
    ENDFUNCTION.
    Regards
    Ravindra

    Hi,
    I am trying to send online intercative forms as PDF attachment once user fills it and click on send button. But this mail i am trying to send from SAP workflow. For this am using one function module which is accepting the pdfsource context attribute of binary type as Xstring. Once i run the webdynpro application i am getting mail in out look but when i open the attachment i am getting error file is damaged.
    Can you pls help me in solving this, Or any other way for doing the same.
    Here is the code i am using for triggering the RFC from WD
    Zsend_Mail_Attachment_Sev_Input mail = new Zsend_Mail_Attachment_Sev_Input();     
              //to capture the outplacement level entered in the form
              mail.setI_Out_Place_Level(wdContext.currentVn_severancedetailsElement().getVa_outplacement_level().getBytes());
         mail.setI_Bin_Data(wdContext.currentContextElement().getPdfSource());
         wdContext.nodeZsend_Mail_Attachment_Sev_Input().bind(mail);
         try
              wdContext.currentZsend_Mail_Attachment_Sev_InputElement().modelObject().execute();
              wdComponentAPI.getMessageManager().reportSuccess("Notification Sent Successfully.");
         catch (WDDynamicRFCExecuteException e)
              // TODO Auto-generated catch block
              wdComponentAPI.getMessageManager().reportSuccess(" This is inside the mail exception!!"+e);
              e.printStackTrace();
    Here is the function module code
    FUNCTION ZSEND_MAIL_ATTACHMENT_SEV.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
    *"     VALUE(I_BIN_DATA) TYPE  XSTRING OPTIONAL
    *"  TABLES
    *"      T_V_BIN_DATA STRUCTURE  SOLISTI1
    *"      IT_MESSAGE STRUCTURE  SOLISTI1
    Data Declaration
      DATA: gd_cnt TYPE i,
            gd_sent_all(1) TYPE c,
            gd_error TYPE sy-subrc,
            tab_lines LIKE sy-tabix,
            v_subject(255) VALUE 'HI'.
    Structure Declaration
      DATA : BEGIN OF it_file OCCURS 0,
              row(255),
             END OF it_file.
      DATA : BEGIN OF i_split OCCURS 0,
      row(50),
      END OF i_split.
    DESCRIBE TABLE it_message LINES tab_lines.
    READ TABLE it_message INDEX tab_lines.
    Internal Table Declaration
      data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
      DATA : objbin LIKE SOLIX OCCURS 0 WITH HEADER LINE.
      DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      data : wa_receiver like table of SOMLRECI1 with header line.
      data : it_receiver like table of SOMLRECI1 with header line.
      DATA :   gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
      REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
      CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
    gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
    gd_doc_data-obj_langu = sy-langu.
    gd_doc_data-obj_name = 'SENDFILE'.
    gd_doc_data-obj_descr = v_subject.
    gd_doc_data-sensitivty = 'O'.
    APPEND GD_DOC_DATA.
    Appending The Internal Table it_packing_list
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'RAW'.
      it_packing_list-body_num = tab_lines.
      APPEND it_packing_list.
      move i_bin_data to t_v_bin_data.
    ********Add By Anuj
      APPEND t_v_bin_data.
    ********End Add By Anuj
      LOOP AT t_v_bin_data.
        MOVE t_v_bin_data TO objbin-line.
        APPEND objbin.
      ENDLOOP.
      CLEAR it_packing_list.
      DESCRIBE TABLE objbin LINES tab_lines.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'PDF'.
      it_packing_list-body_num = tab_lines.
      it_packing_list-doc_size = tab_lines * 255.
      APPEND it_packing_list.
      wa_receiver-receiver = '[email protected]'.
      wa_receiver-rec_type = 'U'.
      wa_receiver-com_type = 'INT'.
      APPEND wa_receiver.
      move wa_receiver[] to it_receiver[].
      append it_receiver.
    *Appending The Internal Table it_receivers
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
    append it_receiver.
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
    append it_receiver.
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
    append it_receiver.
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    wa_receiver-receiver = '[email protected]'.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver to it_receiver.
    append it_receiver.
      Move wa_receiver[] to it_receivers[].
    Clear it_receivers.
      if i_OUT_PLACE_LEVEL NE 0.
    loop at it_receivers into wa_receiver.
       loop at it_receivers into wa_receiver.
    *Function Module To Post The Message To Externa Mail
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = gd_doc_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = it_packing_list
            contents_hex               = objbin
            receivers                  = it_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.
        clear wa_receiver.
       endloop.
      elseif i_OUT_PLACE_LEVEL eq 0.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = gd_doc_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = it_packing_list
            contents_hex               = objbin
            receivers                  = it_receiver
          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.
        clear wa_receiver.
      endif.
    ENDFUNCTION.
    Regards
    Ravindra

  • BEx Broadcast - Not able to send email as PDF attachment

    Hi All,
    We have BI 7.0 and EP 7.0 of SP12.
    From BEx broadcasting we couldnt able to send email in PDF format, but other format like HTML, Link, MHTML can able to send
    It gives error like
    <b>Error:java.lang.ArrayIndexOutOfBoundsException
    Error occured during the processing of framework class CL_RSRC_PRODUCER_PRECALC, type, PROD</b>
    Pls give me some input on this regard
    Thanks
    Karthik

    <b>Prerequisites -</b> You selected Broadcast to Printer as the distribution type when you created the broadcast setting.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/13/f76f422f91c153e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/bf/220c40ac368f5ce10000000a155106/content.htm
    <b>Configuration - Broadcasting</b>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/84/30984076b84063e10000000a1550b0/content.htm
    https://forums.sdn.sap.com/click.jspa?searchID=4204837&messageID=2091321
    https://forums.sdn.sap.com/click.jspa?searchID=4204809&messageID=2816847
    Some Insights-
    The PDF printing can be done from a BEx Web Application, BEx Web Analyzer, or BEx Report Designer. There are no current plans to make this available in the BEx Analyzer.
    From the BEx Analyzer, you can use the "launch in web" functionality to then initiate print to PDF.
    Hope it Helps
    Chetan
    @CP..

Maybe you are looking for

  • My Sine Wave File sounds different in Logic than iTunes

    I am working on creating musical compositions with embedded sine wave patterns (which I am generating in a foriegn application). These sine waves are designed to entrain the brain to different frequencies to facilitate in stimulating meditative state

  • Document access via WAN in portal

    Hi, I have the following problem. I have installed portal with KM in place A and some users are in place B. Both places are connected via WAN (1Mbit/s). Users in place B have some documents stored in there LAN so they can access them relatively quick

  • The shopping cart net price is "0" according contract

    HI,my experts: I work in SRM 7.0 ,SP03   ,Extended Classic Scenario. I create one shopping cart according contract (status:released).In the Tab"source od supplier "  the available contract will display  .But the netprice is "0".I checked the contract

  • Solution to error message (0x666D743F) ?

    I keep getting an annoying message since I downloaded the new version 7 of itunes. The message states: The itunes application could not be opened. An unknown error occurred (0x666D743F). I have looked at other discussion topics and the self help page

  • Plugging in my Shuffle shuts down my Mac

    Plugging the shuffle into any mac in the house shuts down that mac. There are no lights on the shuffle. Resetting it from the control does nothing. Can anyone advise me here?