Unable send ADOBE form through email as attachment

Hello experts,
I was trying the [tutorial |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ee8a84ea-0c01-0010-5691-accfb0a172ed] on ADOBE interactive form through GP.
I am not able to send a form as an attachment as specifies in the document.
I have checked for all the required settings mentioned in the document and all seems to be ok.
Can anyone please provide a ray of help on how do I enable a ADOBE form to be passed as an attachment through email.
Thank you.
Ashutosh

Hi,
just use a "Standard button", select it and go to the "Object" -> "Field" tab. Set the control type to "Submit". Go to the "Submit" tab. Set the submit format (e.g. PDF) and set the URL to "mailto:<receiver's email address>".
This will work fine without any JavaScript.
Take care,
Thomas

Similar Messages

  • Sending Adobe forms through Email and Fax

    Hi ,
    I have created an Adobe Form i.e. PO Form,
    whose print/driver  program is customised / based on SAPFM06P and routine used is ADOBE_ENTRY_NEU.
    So , now I use the transaction ME22N and use the External Send option i.e sending Email , but the Email is getting sent to Spool instead of SOST.
    So what changes do I need to make .
    Can anyone tell me how do we send an Adobe Form through email * in which routine is based on Adobe_entry_neu .
    Thanks  in advance,
    Rohit

    Hi,
    Thanks for reply
    The link u mentioned utilises Objects.. but can we send internet mail using this?
    As we cannot change RECIPIENT TYPE in this case in the object.
    I used this format in the program but the attachment is going to EXpress inbox. and goes to my SAP Inbox instead of Email .
    So what changes we need to do for this.
    Alternatively,  can we use FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' for this purpose?
    Edited by: Rohit Pareek on Feb 3, 2009 3:36 PM

  • Adobe form Through Email

    Hello Gurus,
    My requirement is to send the Adobe form via Email as attachment.
    Am using FM "FP_JOB_OPEN", Generated Adobe Form FM and FP_JOB_CLOSE.
    Here, am getting PDF format in "FPFORMOUTPUT-PDF".
    As "FPFORMOUTPUT-PDF"  is in format of xstring, We need to convert it to Binary and for this am using FM "SCMS_XSTRING_TO_BINARY". 
    Code:
    data: li_att_content_hex type standard table of x.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        BUFFER     = FPFORMOUTPUT-pdf
      TABLES
        BINARY_TAB = li_att_content_hex.
    Later, am using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1" to send a mail.
    As a result am getting the mail with attachment as PDF but when I try to open the attachment it gives me an error as "It wasn't correctly decoded".
    Please, Let me know about this issue.
    Thanks in advance.
    Regards,
    Usha

    hi,
    Refer to this link..
    Re: Attachment in ADOBE form

  • Sending sapscript form through Email

    Hi,
         I modifyed a std sapscript form for customer statement and that output i want to send to the customer through Email.So now i need a help for further what are the steps need to be do for sending that form by email.Pls be in details so that for me easy to solve this.
    Thanks,
    Rajendra.

    Hi ,
        I  am using the below code to send the form output by mail but it is not working for me.pls correct my code where i want to change so that i can solve my issues.
    DATA: itcpo LIKE itcpo,
    tab_lines LIKE sy-tabix.
    Variables for EMAIL functionality
    DATA: maildata LIKE sodocchgi1.
    DATA: mailpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: mailbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: mailtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: mailrec LIKE somlrec90 OCCURS 0 WITH HEADER LINE.
    DATA: solisti1 LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    parameter: p_email1 like somlreci1-receiver .
    PERFORM send_form_via_email.
    FORM SEND_FORM_VIA_EMAIL *
    FORM send_form_via_email.
    CLEAR: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
    REFRESH: mailtxt, mailbin, mailpack, mailhead, mailrec.
    Creation of the document to be sent File Name
    maildata-obj_name = 'TEST'.
    Mail Subject
    maildata-obj_descr = 'Subject'.
    Mail Contents
    mailtxt-line = 'Here is your file'.
    APPEND mailtxt.
    Prepare Packing List
    PERFORM prepare_packing_list.
    Set recipient - email address here!!!
    mailrec-receiver =  p_email1.
    mailrec-rec_type = 'U'.
    APPEND mailrec.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = maildata
    put_in_outbox = ' '
    TABLES
    packing_list = mailpack
    object_header = mailhead
    contents_bin = mailbin
    contents_txt = mailtxt
    receivers = mailrec
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    ENDFORM.
    Form PREPARE_PACKING_LIST
    FORM prepare_packing_list.
    CLEAR: mailpack, mailbin, mailhead.
    REFRESH: mailpack, mailbin, mailhead.
    DESCRIBE TABLE mailtxt LINES tab_lines.
    READ TABLE mailtxt INDEX tab_lines.
    maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ).
    Creation of the entry for the compressed document
    CLEAR mailpack-transf_bin.
    mailpack-head_start = 1.
    mailpack-head_num = 0.
    mailpack-body_start = 1.
    mailpack-body_num = tab_lines.
    mailpack-doc_type = 'RAW'.
    APPEND mailpack.
    Creation of the document attachment
    This form gets the OTF code from the SAPscript form.
    If you already have your OTF code, I believe that you may
    be able to skip this form. just do the following code, looping thru
    your SOLISTI1 and updating MAILBIN.
    PERFORM get_otf_code.
    LOOP AT solisti1.
    MOVE-CORRESPONDING solisti1 TO mailbin.
    APPEND mailbin.
    ENDLOOP.
    DESCRIBE TABLE mailbin LINES tab_lines.
    mailhead = 'TEST.OTF'.
    APPEND mailhead.
    Creation of the entry for the compressed attachment
    mailpack-transf_bin = 'X'.
    mailpack-head_start = 1.
    mailpack-head_num = 1.
    mailpack-body_start = 1.
    mailpack-body_num = tab_lines.
    mailpack-doc_type = 'OTF'.
    mailpack-obj_name = 'TEST'.
    mailpack-obj_descr = 'Subject'.
    mailpack-doc_size = tab_lines * 255.
    APPEND mailpack.
    ENDFORM.
    Form GET_OTF_CODE
    FORM get_otf_code.
    DATA: BEGIN OF otf OCCURS 0.
    INCLUDE STRUCTURE itcoo .
    DATA: END OF otf.
    DATA: itcpo LIKE itcpo.
    DATA: itcpp LIKE itcpp.
    CLEAR itcpo.
    itcpo-tdgetotf = 'X'.
    Start writing OTF code
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = 'Z2006FICSE'
    language = sy-langu
    options = itcpo
    dialog = ' '
    EXCEPTIONS
    OTHERS = 1.
    CALL FUNCTION 'START_FORM'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    window = 'MAIN'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    Close up Form and get OTF code
    CALL FUNCTION 'END_FORM'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    MOVE-CORRESPONDING itcpo TO itcpp.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    result = itcpp
    TABLES
    otfdata = otf
    EXCEPTIONS
    OTHERS = 1.
    Move OTF code to structure SOLI form email
    CLEAR solisti1. REFRESH solisti1.
    LOOP AT otf.
    solisti1-line = otf.
    APPEND solisti1.
    ENDLOOP.
    ENDFORM.
       Hope i can expect the feedback soon from you guys.
    Thanks,
    Rajendra.

  • Send Adobe form as email attachment

    Hello Experts,
    Recently iu2019m facing a problem regarding Adobe form PDF attachment and sending an e-mail along with the PDF attachment to customer mail id.But when i execute the RFC Function module, in customer side no mail is comming. And when i check the transaction SBWP then i found that the PDF attachment hold only 1KB of data which is not right.For that iu2019m sending my code which i was declared in my program.Can anybody Please help me to overcome this problem?
    FORM print_form USING p_disp       TYPE char1
                          drb_mail     TYPE char1
                         p_email LIKE itcpo-tdcovtitle
                         p_email1 LIKE itcpo-tdcovtitle.
      DATA ds_recipient  TYPE   swotobjid.
      CLEAR: dg_funcnam, dg_outputparams.
    *--Call generated function module
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = c_form
        IMPORTING
          e_funcname = dg_funcnam.
    dg_outputparams-nodialog = 'X'.
    dg_outputparams-getpdf   = 'X'.
    Job Open for PDF
    CALL FUNCTION 'FPCOMP_JOB_OPEN'
      CHANGING
        ie_outpar      = dg_outputparams
      EXCEPTIONS
        cancel         = 1
        usage_error    = 2
        system_error   = 3
        internal_error = 4
        OTHERS         = 5.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      EXIT.
    ENDIF.
    dg_docparams-langu = 'X'.
    dg_docparams-country = 'US'.
    dg_docparams-fillable = 'X'.
    form CONVERT_PDF_BINARY .
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER                = FP_FORMOUTPUT-PDF
      APPEND_TO_TABLE         =  ' '
    IMPORTING
      OUTPUT_LENGTH         =
        TABLES
          BINARY_TAB            = t_att_content_hex .
    endform.                    " CONVERT_PDF_BINARY
    *&      Form  MAIL_ATTACHMENT
          text
    -->  p1        text
    <--  p2        text
    form MAIL_ATTACHMENT USING  p_email LIKE itcpo-tdcovtitle
                        p_email1 LIKE itcpo-tdcovtitle.
    CLASS cl_bcs DEFINITION LOAD.
      DATA:
      lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
    Message body and subject
      DATA:
      lt_message_body TYPE bcsy_text VALUE IS INITIAL,
      lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
      APPEND 'Dear,' TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Please fill the attached form and send it back to us.'
      TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Thank You,' TO lt_message_body.  lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Personnel Information Form' ).
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.  TRY.
          lo_document->add_attachment(
          EXPORTING
          i_attachment_type = 'PDF'
          i_attachment_subject = 'Personnel Information Form'
    I_ATTACHMENT_SIZE =
    I_ATTACHMENT_LANGUAGE = SPACE
    I_ATT_CONTENT_TEXT =
    I_ATTACHMENT_HEADER =
          i_att_content_hex = t_att_content_hex ).
        CATCH cx_document_bcs INTO lx_document_bcs.
      ENDTRY.
    Add attachment
    Pass the document to send request
      lo_send_request->set_document( lo_document )."* Create sender
      DATA:
      lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
      l_send type ADR6-SMTP_ADDR value ' here mail id '.
    l_send = P_email.
    l_send = P_email1.
    lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
      lo_sender = cl_sapuser_bcs=>create( sy-uname ).
    Set sender
      lo_send_request->set_sender(
      EXPORTING
      i_sender = lo_sender )." Create recipient
      DATA:
      lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
    lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
      lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
    lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
    Set recipient
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
    lo_send_request->add_recipient(
    EXPORTING
    i_recipient = lo_recipient
    i_express = 'X' ).* Send email
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.
      message 'The Personnel Information form has been emailed to the Employee' type 'I'.
    endform.                    " MAIL_ATTACHMENT
    *--Call Function module
    CALL FUNCTION dg_funcnam
      EXPORTING
        /1bcdwb/docparams  = dg_docparams
        im_logo         = dg_logo
        im_user_address = dt_user_address
        im_ship_to_addr = dt_imp_data
        im_text         = ds_text
        im_sales_text   = dt_sales_text
        im_item_data    = dt_item_data
      IMPORTING
        /1BCDWB/FORMOUTPUT = FP_FORMOUTPUT
      EXCEPTIONS
        usage_error     = 1
        system_error    = 2
        internal_error  = 3
        OTHERS          = 4.
    IF sy-subrc <> 0.
    ENDIF.
    CALL FUNCTION 'FPCOMP_JOB_CLOSE'
      IMPORTING
        e_jobresult    = l_result
      EXCEPTIONS
        usage_error    = 1
        system_error   = 2
        internal_error = 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.
    DATA : dl_msg TYPE string.
    CONCATENATE 'Successfully mailed to' p_email p_email1 INTO dl_msg SEPARATED BY space.
    IF drb_mail = 'X'.
       COMMIT WORK.
       MESSAGE dl_msg TYPE 'I' .
       MESSAGE i000 WITH 'Successfully mailed to' p_email1.
    ENDIF.
    ENDFORM.                    "print_form
    Could you please any body help me, it's very uregent issue.
    Regards
    Sandeep

    *& Report  ZGB_ATTACHMENT
    REPORT  zgb_attachment.
    DATA:
    l_formname        TYPE fpname VALUE 'ZGB_ATTACHMENT',
    l_fm_name         TYPE rs38l_fnam,
    fp_outputparams   TYPE sfpoutputparams,
    fp_docparams      TYPE sfpdocparams,
    fp_formoutput     TYPE fpformoutput.
    DATA:
      t_att_content_hex TYPE solix_tab.
    PARAMETERS: p_pernr TYPE persno.
    START-OF-SELECTION.
      PERFORM get_function_module.
      PERFORM create_document.
      PERFORM convert_pdf_to_binary.
      PERFORM mail_attachment.
    *&      Form  GET_FUNCTION_MODULE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_function_module .
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name              = l_formname
        IMPORTING
          e_funcname          = l_fm_name
    *     E_INTERFACE_TYPE    =
    *     EV_FUNCNAME_INBOUND =
    ENDFORM.                    " GET_FUNCTION_MODULE
    *&      Form  CREATE_DOCUMENT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_document .
    *JOB OPEN
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = fp_outputparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc <> 0.
    * Implement suitable error handling here
      ENDIF.
      fp_docparams-langu = 'X'.
      fp_docparams-country = 'US'.
      fp_docparams-fillable = 'X'.
      CALL FUNCTION l_fm_name
        EXPORTING
         /1bcdwb/docparams        = fp_docparams
          pernr                    = p_pernr
       IMPORTING
         /1bcdwb/formoutput       = fp_formoutput
    * EXCEPTIONS
    *   USAGE_ERROR              = 1
    *   SYSTEM_ERROR             = 2
    *   INTERNAL_ERROR           = 3
    *   OTHERS                   = 4
      IF sy-subrc <> 0.
    * Implement suitable error handling here
      ENDIF.
    *JOB CLOSE
      CALL FUNCTION 'FP_JOB_CLOSE'
    *    IMPORTING
    *      e_result       =
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
    * Implement suitable error handling here
      ENDIF.
    ENDFORM.                    " CREATE_DOCUMENT
    *&      Form  CONVERT_PDF_TO_BINARY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM convert_pdf_to_binary .
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer                = fp_formoutput-pdf
    *   APPEND_TO_TABLE       = ' '
    * IMPORTING
    *   OUTPUT_LENGTH         =
        TABLES
          binary_tab            = t_att_content_hex
    ENDFORM.                    " CONVERT_PDF_TO_BINARY
    *&      Form  MAIL_ATTACHMENT
    FORM mail_attachment .
      CLASS cl_bcs DEFINITION LOAD.
      DATA:
      lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
    * Message body and subject
      DATA:
      lt_message_body TYPE bcsy_text VALUE IS INITIAL,
      lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
      APPEND 'Dear,' TO lt_message_body.
      APPEND ' ' TO lt_message_body.
      APPEND 'Please fill the attached form and send it back to us.'
      TO lt_message_body.
      APPEND ' ' TO lt_message_body.
      APPEND 'Thank You,' TO lt_message_body.
      lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Personnel Information Form' ).
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
      TRY.
          lo_document->add_attachment(
          EXPORTING
          i_attachment_type = 'PDF'
          i_attachment_subject = 'Personnel Information Form'
    * I_ATTACHMENT_SIZE =
    * I_ATTACHMENT_LANGUAGE = SPACE
    * I_ATT_CONTENT_TEXT =
    * I_ATTACHMENT_HEADER =
          i_att_content_hex = t_att_content_hex ).
        CATCH cx_document_bcs INTO lx_document_bcs.
      ENDTRY.
    * Add attachment
    * Pass the document to send request
      lo_send_request->set_document( lo_document ).
    * Create sender
      DATA:
      lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
      l_send TYPE adr6-smtp_addr VALUE '[email protected]'.
    *  lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
      lo_sender = cl_sapuser_bcs=>create( sy-uname ).
    * Set sender
      lo_send_request->set_sender(
      EXPORTING
      i_sender = lo_sender ).
    * Create recipient
      DATA:
      lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
    *  lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
      lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
    ** Set recipient
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
    *  lo_send_request->add_recipient(
    *  EXPORTING
    *  i_recipient = lo_recipient
    *  i_express = 'X' ).
    * Send email
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.
      MESSAGE 'The Personnel Information form has been emailed to the Employee' TYPE 'I'.
    ENDFORM.                    " MAIL_ATTACHMENT

  • Send Adobe form by email on save of PO

    Hi All
    I want to send PO output as abode form to vendors as soon as the PO is created and saved. I have created new output message type, new adode form for PO output. Do I have to create new program as well? So that I can put in new output type along with new form (NACE). Can any one take me through the procedure?
    Thanks in advance
    Sunny

    Hi
    Thanks for your reply it was helpful.
    I am now able to call Adobe form in PO print preview.
    But unable to send email on SAVE action of PO in ME22N. In the same output message type NEU I have added Transaciton medium as External Send. On save it is showing status as successful in Message buttion but email is not send. Can you tell me where I am wrong?
    Regards
    Sunny

  • Send ADOBE FORM as email

    hi all,
    Does anybody knows what all parameters to be passed to FM 'FP_JOB_OPEN' to send the adobe form as an email .

    Jay,
    Have a look at this [thread|Re: Sending PDF forms (created using SFP) as Email Attachment;
    Chintan

  • Sending email by attaching adobe form through BSP

    Hi All,
    I'm working on the e-recruitement project.
    I have requirement that on the publication page there is table view where all the publication and there posting channels are displayed.
    Now i have to create a button " Send Email". by selecting the the required posting channel when i click on the button send email.
    It should pick the data overview form and this form should be attached to email and should be send to the respective posting channel.
    Can you please guide me to solve this issue.
    Your commnets will highly appreciated.
    Regards,
    Nikita.

    Look at this [document|https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/e0bba346-cb84-2910-2aa9-ba1f8a1c8617&overridelayout=true] to create & send adobe form via email.
    You can use the same code for BSP too.
    Raja

  • Sending the adobe interactive form as non-interactive form through email

    Hi ,
              I am trying to send the interactive adobe form as non-interactive form  through email.The interactive form size is very large because of the interactivity.
    Can anybody suggest how to do this.
    Regards,
    Debasis

    Dear Antony,
    Thanks for the reply.
           I got you but can you pls guide me how to go about it.
    I need to send the email while submiting the form.So when and how i will be mapping each data node /attibutes of the main form with the intermediate form.My interactive form is of 30 pages and it may grow upto 40 pages.My response is with the to the main form where i am showing the success message.
    Regards,
    Debasis Nayak

  • How to send adobe form output in mail as a attachment

    i am get the adobe form output
    how to attach in a mail ....
    Regards
    Anbu B

    my program is like this.............
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name                     = 'YHRIN_WELCOME'
       IMPORTING
         e_funcname                 =  lv_funcname
      gs_output-nodialog = 'X'.
      gs_output-preview = 'X'.
    gs_output-getpdl = 'X'.
       gs_output-getpdf = 'X'.
       gs_output-dest = 'LP01'.
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams       = gs_output
      EXCEPTIONS
        CANCEL                = 1
        USAGE_ERROR           = 2
        SYSTEM_ERROR          = 3
        INTERNAL_ERROR        = 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.
    DATA : gs_outputpara TYPE sfpdocparams.
    DATA : ls_return TYPE fpformoutput .
    gs_outputpara-langu = 'E'.
    gs_outputpara-country = 'IN'.
      CALL FUNCTION lv_funcname
      EXPORTING
        /1bcdwb/docparams = gs_outputpara
        wa_data = wa_mail
        IMPORTING
          /1bcdwb/formoutput = ls_return
        EXCEPTIONS
          OTHERS = 1.
    DATA lv_output TYPE sdokcntbins WITH HEADER LINE.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = ls_return-pdf            "PDF file from function module
    TABLES
    binary_tab = lv_output  .
    *DATA : result TYPE sfpjoboutput WITH HEADER LINE .
      CALL FUNCTION 'FP_JOB_CLOSE'
      IMPORTING
        e_result = result
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    DATA : iv_len_in LIKE sood-objlen,
           it_tline TYPE TABLE OF tline WITH HEADER LINE.
    PERFORM pdf_file.
    DATA:   lt_imessage TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
            lt_iattach TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
            lt_ipacking_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            lt_ireceivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            lt_iattachment LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA  : lt_record LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA : it_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
    DATA: lv_email   TYPE somlreci1-receiver
                          VALUE 'anbu.'.
    PERFORM build_xls_data .
    APPEND lt_iattach.
    Populate message body text
      CLEAR lt_imessage.   REFRESH lt_imessage.
      lt_imessage = 'Please find attached PDF file'.
      APPEND lt_imessage.
    Send file by email as .xls speadsheet
      PERFORM send_email_with_xls TABLES lt_imessage
                                          lt_iattach
                                    USING lv_email
                                          'PDF Attachment of an Employee'
                                          'PDF'
                                          'TestFileName'
                                          'Employee Detail'.
         Form  BUILD_XLS_DATA
    FORM build_xls_data .
    DATA :lv_buffer TYPE string.
    Convert PDF from 132 to 255.
      LOOP AT it_tline.
    Replacing space by ~
        TRANSLATE it_tline USING ' ~'.
        CONCATENATE lv_buffer it_tline INTO lv_buffer.
      ENDLOOP.
       replacing ~ by space
      TRANSLATE lv_buffer USING '~'.
      DO.
        lt_record = lv_buffer.
    Appending 255 characters as a record
        APPEND lt_record.
        SHIFT lv_buffer LEFT BY 255 PLACES.
        IF lv_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      lt_iattach[] = lt_record[].
    ENDFORM.
         Form  SEND_EMAIL_WITH_XLS
    FORM send_email_with_xls TABLES pit_message
                                              pit_attach
                                        USING p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription.
      DATA: es_xdocdata LIKE sodocchgi1,
            lv_xcnt TYPE i.
    Fill the document data.
      es_xdocdata-doc_size = 1.
    Populate the subject/generic message attributes
      es_xdocdata-obj_langu = sy-langu .
      es_xdocdata-obj_name  = 'SAPRPT' .
      es_xdocdata-obj_descr = p_mtitle .
    Fill the document data and get size of attachment
      CLEAR es_xdocdata.
      READ TABLE lt_iattach INDEX lv_xcnt.
      es_xdocdata-doc_size =
         ( lv_xcnt - 1 ) * 255 + STRLEN( lt_iattach ).
      es_xdocdata-obj_langu  = sy-langu.
      es_xdocdata-obj_name   = 'SAPRPT'.
      es_xdocdata-obj_descr  = p_mtitle.
      CLEAR lt_iattachment.  REFRESH lt_iattachment.
      lt_iattachment[] = pit_attach[].
    Describe the body of the message
      CLEAR lt_ipacking_list.  REFRESH lt_ipacking_list.
      lt_ipacking_list-transf_bin = space.
      lt_ipacking_list-head_start = 1.
      lt_ipacking_list-head_num = 0.
      lt_ipacking_list-body_start = 1.
      DESCRIBE TABLE lt_imessage LINES lt_ipacking_list-body_num.
      lt_ipacking_list-doc_type = 'RAW'.
      APPEND lt_ipacking_list.
    Create attachment notification
      lt_ipacking_list-transf_bin = 'X'.
      lt_ipacking_list-head_start = 1.
      lt_ipacking_list-head_num   = 1.
      lt_ipacking_list-body_start = 1.
      DESCRIBE TABLE lt_iattachment LINES lt_ipacking_list-body_num.
      lt_ipacking_list-doc_type   =  p_format.
      lt_ipacking_list-obj_descr  =  p_attdescription.
      lt_ipacking_list-obj_name   =  p_filename.
      lt_ipacking_list-doc_size   =  lt_ipacking_list-body_num * 255.
      APPEND lt_ipacking_list.
    Add the recipients email address
      CLEAR lt_ireceivers.  REFRESH lt_ireceivers.
      lt_ireceivers-receiver = p_email.
      lt_ireceivers-rec_type = 'U'.
      lt_ireceivers-com_type = 'INT'.
      lt_ireceivers-notif_del = 'X'.
      lt_ireceivers-notif_ndel = 'X'.
       APPEND lt_ireceivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = es_xdocdata
                put_in_outbox              = 'X'
                commit_work                = 'X'
           TABLES
                packing_list               = lt_ipacking_list
               contents_bin               = lt_iattachment
                 CONTENTS_HEX              = lv_output
                contents_txt               = lt_imessage
                receivers                  = lt_ireceivers
           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.
          SUBMIT rsconn01 WITH mode = 'INT'
                  WITH output = '' AND RETURN.
    ENDFORM.

  • Send Adobe Form As Attachment

    hi Experts
    I need send Adobe Form as attachment
    this is part of my prog. ******************
    TRY.
          lr_send_request->send(
          EXPORTING
          i_with_error_screen = 'X'
          RECEIVING
          result = lv_sent_to_all ).
        CATCH cx_send_req_bcs INTO lr_send_req_bcs.
      ENDTRY.
      COMMIT WORK.
    but after execute  I get Error(Dump):
    *Calling a COMMIT WORK in an update process is not allowed*
    *because the function modules triggered in a Logical Unit*
    *of Work cannot then be processed correctly.*
    I tried to use UpdateFunction(call function in update task), but in this case I get Empty PDF File .
    How can I solve this problem?
    Thanks,
    Larissa

    You want to commit to send the email. But the commit is not allowed in the update task. That is not Adobe-related problem in my opinion. Maybe you should ask the question in ABAP general? And about that "blank" pdf... is that a problem with PDF printing? That means GETPDF = 'X' not working? Or what is your adobe related problem?
    Regards Otto

  • Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email.  t worked, but only for those with PC.  I could not get it to work with Apple Yosemite even with reader installed .  is there a way i can make it work for apple /

    Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email. It worked, but only for those with PC. However,  I could not get it to work with Apple loaded with Yosemite even with reader installed .  Is there a way i can make it work for apple / Mac? It worked fine on a mac using Mountain Lion and reader
    Thanks

    LiveCycle = XFA forms.
    afaik - These cannot be used in Apple OSs.
    Be well...

  • Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email.  the button did not work and i looked online and saw where you could change it to a regular button and enter the email for it to go.  it worked, but only for thos

    Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email.  the button did not work and i looked online and saw where you could change it to a regular button and enter the email for it to go.  it worked, but only for those with adobe pro.  i could not get it to work with reader.  is there a way i can make it work for reader?

    Noted.
    The LiveCycle user to user forum is across town at:
    Adobe LiveCycle 
    Be well...

  • Need to send Smart form via email through Driver program

    Hi All,
    We need to send smart form via email through a new driver program (z program). Can you please guide me on this.
    I have used the following code to achieve this. We are getting message saying 'Mail request has created' when executed, but the mail is not sent.
    lvs_comm_type = 'INT'.
    lvs_comm_values-adsmtp-SMTP_ADDR = e_mail.
    lvs_comm_values-adsmtp-R3_USER = 'X'.
    lvs_comm_values-adsmtp-ENCODE = '0'.
    call function 'CONVERT_COMM_TYPE_DATA'
    exporting
    pi_comm_type = lvs_comm_type
    pi_comm_values = lvs_comm_values
    pi_screen = ' '
    pi_newid = 'X'
    importing
    pe_itcpo = lvs_itcpo
    pe_device = lvf_device
    pe_mail_recipient = p_mail_recipient
    pe_mail_sender = p_mail_sender
    exceptions
    comm_type_not_supported = 1
    recipient_creation_failed = 2
    sender_creation_failed = 3
    others = 4.
    if sy-subrc ne 0.
    raise COMMUNICATION_ERROR.
    endif.
    control_parameters-device = 'MAIL'.
    output_options-TDIMMED = 'X'.
    output_options-TDDELETE = 'X'.
    CALL FUNCTION fm_name
    exporting
    CONTROL_PARAMETERS = control_parameters
    MAIL_RECIPIENT = mail_recipient
    MAIL_SENDER = mail_sender
    OUTPUT_OPTIONS = output_options
    USER_SETTINGS = space
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    Thank you

    Hi,
    For sending smartform output into mail you first have to generate spool request and convert it into PDF and then
    only it can be sended into mail, please find the sample code in the mail below:
    http://wiki.sdn.sap.com/wiki/display/sandbox/ConversionofSpoolRequestDataintoPDFandExcelFormatandSenditintoMail
    Mansi
    Edited by: Matt on Jan 29, 2010 8:25 AM - removed code, instead point to wiki that Mansi authored.

  • How to send offline forms as email in Portal level.

    hello friends,
    i am struck with a task.I need to send adobe forms as attachment to email to non sap users(i,e offline mode).this task has to be configured for managers using mss service(i.e through portal)...
    how this can be done?
    any material will be highly appreciated.

    Hi,
    Try to use this one
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    Hope it can solve your problem!
    Good luck!
    Tao

Maybe you are looking for