Adobe form to be sent as an attachment

Hi All,
I have requirement to send an adobe form through an email.
Firstly I am allowing a user to choose a path to download an adobe form (here in program I am taking form name as a default form).
Then I am calling FP_FUNCTION_MODULE_NAME and providing my default form as importing parameter. Then calling fp_job_open and generated func. module  and fp_job_close sequentially. Now after calling gui_dowload which func module do I need to use in order to send the above generated adobe form to user via an email.
An early response is appreciated.

Hi neelima,
even more is discussed and shown in the fantastic e-learning session
[create, send, receive, process pdf|https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/5087262b-59ef-2910-abb1-957000b7c3d4&overridelayout=true]
and some code in the ppt:
[powerpoint presentation for this|https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/e0bba346-cb84-2910-2aa9-ba1f8a1c8617&overridelayout=true]
Sandra is right, search before posting.
Regards,
Clemens

Similar Messages

  • 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 pdf (Adobe Form) as email attachment using BCS

    Hello everybody!
    I want to send a pdf, generated by Adobe Forms function module, as an email attachment to a certain external mail receiver. I have read that the methods of the Business Communication Services can render this, but I couldn't create a working solution. Can somebody give me a coding example for this scenario?
    I would be very happy if somebody could help me!
    Best regards,
    Markus

    Hello Alex!
    your link to this document was very helpful. The scenario described in the pdf is almost what I was looking for. The only problem is, that the mail is sent to the Business Workplace Inbox. I want to send it to an external e-mail address. When I change the programm part where the recipient is defined like this:
    Create recipient
      DATA lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
      DATA l_reci    TYPE adr6-smtp_addr VALUE 'somemailaddress'.
      lo_recipient = cl_cam_address_bcs=>create_internet_address( l_reci ).
    Set sender
      lo_send_request->add_recipient(
        EXPORTING
          i_recipient = lo_recipient ).
    then no mail is sent to the recipients mailbox. I tried several variants but no mail is sent. Does somebody know how to set an external e-mail as recipient in this case?
    Best regards!
    Markus

  • Adobe form as a attachment in workflow

    Hi,
       i have attached adobe form in my workflow  as a attachment in decision step  .the requirement is he will open the adobeform  and he will edit some values  and that form i have to save that values and update the database..  my problem is he will open the attachment and make changes to that how can i able to get the edited form into workflow this is a 3 level approval process at every stage approvers will edit the adobe form   so any one please suggest me..

    Hi,
    Your adobe forms opening in the T.code IQS2 right.
    Create a method, call this T.code & pass the notification number using the call transaction Method.
    Assign this method in the workflow via task and send it to the approver.
    Regards,
    Surjith

  • 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

  • Prefill ZCl Adobe Form

    Hi All
    I have a requirment to attach a pdf form to a business transaction in crm.
    I have created an interactive ZCI adobe form in sfp as part of a web dynpro project.
    My question is can I use the abap pdp object, in a piece of abap code,  to create and pre-fill data into this adobe form so that I can then attach it to the crm business transaction.
    Thanks
    Darren

    Used the order_save badi and abap pdp object to do this then attached the pdp object ot the transaction

  • PDF Attachment problem in Adobe form and send mail is not working

    Dear Experts,
                         Recently i'm 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 i'm sending my code which i was declared in my program.Can anybody please help me to overcome this problem?
    Warm Regards,
    sameek.
    CLASS cl_bcs DEFINITION LOAD.
      DATA:
      lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
      data: t_att_content_hex type SOLIX_TAB.
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
      DATA: lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
            l_send type ADR6-SMTP_ADDR value 'Already provided an e-mail address here'.
      DATA: lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
    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 = 'Customer Information Form').
      TRY.
          lo_document->add_attachment(
          EXPORTING
          i_attachment_type = 'PDF'
          i_attachment_subject = 'Customer 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*
      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*
      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*
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.
      message 'The Customer Information form has been emailed to the Employee' type 'I'.

    I am also facing issue with email send .
    apex 4.1.1 oracle 11g
    create or replace procedure email ( p_email  in    varchar2)
    is
        l_workspace_id      number;
        l_subject           varchar2(2000);
        l_body              clob;
        l_body_html         clob;
         l_email varchar2(40);
    begin
        l_workspace_id := apex_util.find_security_group_id (p_workspace => 'xyz');
        apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
    l_email:= p_email;
        l_body := ' ';
        l_subject := 'You have new tasks';
        --if l_email=:P3_CONFIRM_EMAIL_ADDRESS is not null then
       -- email( l_email =>:P3_CONFIRM_EMAIL );
    -- end if;
            l_body_html := '<p />The following tasks have been added.';
         apex_mail.send (
                p_to        => l_email ,
                p_from      => '[email protected]',
                p_body      => l_body,
                p_body_html => l_body_html,
                p_subj      => l_subject );
      APEX_MAIL.PUSH_QUEUE;
    end; I also check the log and queue but both are empty,
    select * from
    apex_mail_queue
    select * from
    apex_mail_log Kindly suggest what to do ?
    I also created a process in apex , which call this procedure and pass the email address entered by user.

  • Script to open an pdf attachment in the adobe form is not working.

    Hello Experts,
    I have a requirement where i should open pdf attachment from the attachment tab of adobe form.
    For this i have written below  java script in the click event of a button ->
    I have an attachment pdf with name attach.pdf in the attachment tab of adobe form.
    var oObj = event.target;
    oObj.openDataObject();
    ->When i click on the button it is giving the error -> TypeError: Invalid Argument type.
                                                                                    Parameter cName.
    Can any one help me how can i use openDataObject method to open an attachment from the attachment tab of adobe form.
    Regards,
    Menaka.H.B
    Moderator message: wrong forum, please post again in Adobe Interactive Forms.
    Edited by: Thomas Zloch on Oct 18, 2010 12:52 PM

    Hi,
    Please refer to the thread below where this issue has been discussed:
    Creative cloud wants to make changes
    Regards,
    Sheena

  • How to attach a WebDynpro Adobe form to backend Business Object?

    Hello,
    I would like to know if anyone has created an Interactive Adobe Form, and then after the user has filled it out (online, via WebDynpro view), attach the pdf form to an SAP Document, for example, Order, Purchase Order or Contract?
    I know how to create the WebDynpro Interactive Form, and I then have the pdf object in context attribute of WebDynpro.  But am not sure how to do the next step of taking that pdf and attaching it to the SAP Document.
    Any suggestions or code samples would be greatly appreciated.
    Thanks,
    Colleen

    The interactiveForm UI element has one action called onSubmit.  This action is triggered when any server event occurs within the Adobe Form itself.  So if you place a submitButton from the Web Dynpro Native (assuming you are using ZCI forms) within the form, it will automatically trigger the onSubmit action and WD event handler.
    Here is a video that shows the process -  although it is a little bit older and uses ACFx forms.  You would want to use the new ZCI form approach. The general process for linking the events is the same however.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/c766e918-0b01-0010-99b1-c2b78cd059b3

  • How to send an attachment with adobe form

    Hi
    in my application i have two process intiator and approval process both are adobe interactive forms,according to my scenarion i need to send an attachment(pdf or word document....)in intiatior to approval process,can pleasse tell me how to send the attachment.
    Thanks
    Raju
    Edited by: raju on Oct 7, 2008 6:39 AM

    hi!
    chk these links .
    Re: Sending Adobe Interactive Forms via Email
    Re: Saving and sending Adobe Form pdf from WebDynpro
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/176882c3-0401-0010-9fbc-d9fa1f713a73
    thanks
    vishal

  • 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

  • Drag and Drop or file attachment in Adobe Forms Central

    Is there a particular form or field type in Adobe Forms Central that would allow a user to "attach" or drag and drop a file to a form...say a blueprint?

    Hi,
    Yes. FormsCentral HTML forms support a File Attachment field. The following page provides an overview:
    https://www.acrobat.com/formscentral/en/library/attachments.html
    Regards,
    Brian

  • 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

  • Print the attachements added in the adobe form

    Hi,
    I added the attachments in the adobe form.But when ever i print this adobe form , i want to make sure that the attachments are also printed in addition to the original adobe form.
    Is there any automatic way of doign it or any alternatives to avoid adding it as an attachment ,
    i have  a word document stored in the database.
    so when ever i print my form need to print the document sthat are stored in the database also.
    Please help me.
    Regards,
    Sasi

    "Discrepancies"?

  • Adobe Form print/email - Attach IXOS .tif images via string table param?

    I am attempting to create an Adobe Form print/e-mail output for Invoices, with zero, one or many attached pages from the IXOS archive.  (TIFF files.)  So far I have managed to attach exactly one IXOS image.  Now I need to make the number of attached images dynamic.
    This is in Netweaver 7.0 / ECC 6.0 ehp 3 / LiveCycle Designer 8.1.
    My ABAP driver program is a copy of SD_INVOICE_PRINT01.  In pseudocode, I've added:
    Logic to identify correct IXOS image.
    Logic to extract IXOS image to application server's file system.
    OPEN DATASET image.tif FOR INPUT IN BINARY MODE.
    READ DATASET image.tif INTO xstring.
    CALL FUNCTION 'SSFC_BASE64_ENCODE' EXPORTING xstring IMPORTING string.
    APPEND string TO string_table.
    CALL FUNCTION form_name EXPORTING attachments = string_table.
    The form interface is a copy of INVOICE_INTERFACE (ABAP dictionary-based.)  I've added import param. ATTACHMENTS type STRING_TABLE.
    In the form's context tab, interface import param. ATTACHMENTS was dragged & dropped onto the context pane, yielding:
    - Table ATTACHMENTS
    -- Structure DATA
    --- Field ITEM.
    In Adobe LiveCycle Designer 8.1, I *can* create an image field with binding ATTACHMENTS.DATA[1].ITEM - that prints the TIFF from IXOS just fine.
    What *does not* work is placing ATTACHMENTS on the form as a table of image fields.  I've tried several combinations - most look like this:
    - Table or Subform ATTACHMENTS, binding ATTACHMENTS, repeat for each data item max = 1.
    -- Row or Subform DATA, binding DATA[*], repeat for each data item min = 1.
    --- Image field ITEM, binding ITEM.
    The result is consistently one blank page.  No more, no less.
    Can anyone help?
    Edited by: Eric Hopp on May 12, 2010 12:09 AM

    Hello,
    I have no experience regarding the table of pictures, but you could try a workaround if you don´t insist of displaying the images. You could attach the pictures as attachments (you know, the little attachments icon on the left in your Reader). The ABAP coding for this can be found in SE38 FP_* and when you check the descriptions you should be able to find the one working with the attachments.
    Would be better than nothing I guess,
    Otto

Maybe you are looking for

  • I moved to a new pc but have the FF profile from the old one and how do I find out which FF version the old FF was?

    I want to use the old version of FF from my previous pc. I saved the profile folder etc on the old pc. The old HD is attached to the new pc via USB. How do I tell what version the old one was? After installing the old version on the new pc I want to

  • How to save BI report into normal excel sheet in Bex Analyzer

    Hi Experts, version of  Bex Analyzer: Bi addon 7.x support package 7,patch 1 version 7004.4.0.5 excel-2003 when i am trying to save the report into excel in Bex Analyzer as below: file-save as->Microsoft excel work. when I open excel I am getting pop

  • Help me choose a 865PE board

    Hi, I need some help in choosing the best(most feature packed, fast etc.) MSI 865PE motherboard. There are two boards that are pretty identical and trying to find the difference between them has been difficult. They are the Neo2-FIS2R and Neo2-PFISR.

  • Using AP Express for Printing ONLY

    Hey Discussions, I want to purchase an Airport Express for the sole purpose (right now) of printing. Is it possible to use the Express without an Internet connection? Thanks, Mateo

  • EM wont start

    Hi I have installed OBIEE 11g on linux 64 VM .I have succesfully isntalled the OBIEE 11.1.1.6 simple installation, after the restart the weblogic and opmn services all the links open except the em.below is the error message I get Error 404--Not Found