Sending PDF forms (created using SFP) as Email Attachment

Hi,
     I have created bunch of ADOBE forms using SFP. They are not interactive forms. created using ADOBE Live cycle designer.
I have the Function module and by executing I can view the PDF form in print preview mode. But I have to save this in backend and attach to email.
I have a program that have to send one of the forms created in SFP as email attachment to outside SAP.
Please advice how to achieve this.
Thanks,
Sanjeev

Hi ,
Please find below a code sample for your requirement
*& Report  ZENVOI_PDF_MAIL
REPORT  zenvoi_pdf_mail MESSAGE-ID ad.
TYPE-POOLS : abap .
DATA : data_for_update TYPE zdemopdf ,
       hexa            TYPE solix_tab.
DATA : fm_name   TYPE funcname ,
       param     TYPE sfpoutputparams,
       doc_param TYPE sfpdocparams ,
       output    TYPE fpformoutput .
param-nodialog = abap_true. " suppress printer dialog popup
param-getpdf = abap_true.
doc_param-langu = sy-langu.
doc_param-country = 'FR'.
doc_param-fillable = abap_true.
doc_param-dynamic = abap_true.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
  EXPORTING
    i_name     = 'ZDEMO_PDF'
  IMPORTING
    e_funcname = fm_name.
CALL FUNCTION 'FP_JOB_OPEN'
  CHANGING
    ie_outputparams = param
  EXCEPTIONS
    cancel          = 1
    usage_error     = 2
    system_error    = 3
    internal_error  = 4.
CHECK sy-subrc EQ 0.
CALL FUNCTION fm_name
  EXPORTING
    /1bcdwb/docparams  = doc_param
    data_for_update    = data_for_update
  IMPORTING
    /1bcdwb/formoutput = output
  EXCEPTIONS
    usage_error        = 1
    system_error       = 2
    internal_error     = 3.
CALL FUNCTION 'FP_JOB_CLOSE'
  EXCEPTIONS
    usage_error    = 1
    system_error   = 2
    internal_error = 3
    OTHERS         = 4.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
  EXPORTING
    buffer     = output-pdf "PDF file from function module
  TABLES
    binary_tab = hexa.
* Envoi du mail
** CLASS-DEFINITIONS
DATA: send_request       TYPE REF TO cl_bcs.
DATA: document           TYPE REF TO cl_document_bcs.
*DATA: sender             TYPE REF TO cl_sapuser_bcs.
data: sender            TYPE REF TO if_sender_bcs.
DATA: recipient          TYPE REF TO if_recipient_bcs.
** INTERNAL TABLES
DATA: l_mailtext TYPE soli_tab.
DATA: iaddsmtp   TYPE TABLE OF bapiadsmtp.
DATA: ireturn    TYPE TABLE OF bapiret2.
** VARIABLES
DATA: mail_line  LIKE LINE OF l_mailtext.
DATA: bapiadsmtp         TYPE bapiadsmtp.
DATA: subject    TYPE so_obj_des.
DATA : att_subject TYPE so_obj_des.
DATA : w_except TYPE REF TO cx_root .
CONSTANTS : c_defmail TYPE ad_smtpadr VALUE
                 '[email protected]' .
FIELD-SYMBOLS : <smtp> TYPE bapiadsmtp.
*Set subject of the mail
subject = 'Exemple de PDF interactif'.
* Set text of the mail
mail_line = 'Merci de remplir le formulaire et nous le retourner'.
APPEND mail_line TO l_mailtext .
att_subject = 'Template du PDF'.
TRY.
* Create persistent send request
    send_request = cl_bcs=>create_persistent( ).
* Get sender object
    sender = cl_sapuser_bcs=>create( sy-uname ).
*    sender =
*      cl_cam_address_bcs=>create_internet_address( '[email protected]' ) .
* Add sender
    CALL METHOD send_request->set_sender
      EXPORTING
        i_sender = sender.
* Read the E-Mail address for the user
*    CALL FUNCTION 'BAPI_USER_GET_DETAIL'
*      EXPORTING
*        username = sy-uname
*      TABLES
*        return   = ireturn
*        addsmtp  = iaddsmtp.
*    LOOP AT iaddsmtp ASSIGNING <smtp> WHERE std_no = 'X'.
*      CLEAR bapiadsmtp.
*      MOVE <smtp> TO bapiadsmtp.
*    ENDLOOP.
*    CASE bapiadsmtp-e_mail.
*      WHEN space.
        recipient =
     cl_cam_address_bcs=>create_internet_address( c_defmail ).
*      WHEN OTHERS.
*        recipient =
*     cl_cam_address_bcs=>create_internet_address( bapiadsmtp-e_mail ).
*    ENDCASE.
* Add recipient with its respective attributes to send request
    CALL METHOD send_request->add_recipient
      EXPORTING
        i_recipient  = recipient
        i_express    = 'X'
        i_copy       = space
        i_blind_copy = space
        i_no_forward = space.
* Set that you don't need a Return Status E-mail
    CALL METHOD send_request->set_status_attributes
      EXPORTING
        i_requested_status = 'E'
        i_status_mail      = 'E'.
* set send immediately flag
    send_request->set_send_immediately( 'X' ).
*Build Document
    document = cl_document_bcs=>create_document(
                        i_type    = 'RAW'
                        i_text    = l_mailtext
                        i_subject = subject ).
*     add attachment to document
    CALL METHOD document->add_attachment
      EXPORTING
        i_attachment_type    = 'PDF'
        i_attachment_subject = att_subject
        i_att_content_hex    = hexa.
* Add document to send request
    CALL METHOD send_request->set_document( document ).
* Send document
    CALL METHOD send_request->send( ).
    COMMIT WORK.
  CATCH cx_send_req_bcs INTO w_except.
  CATCH cx_address_bcs INTO w_except.
  CATCH cx_document_bcs INTO w_except.
ENDTRY.
Hope this help you .
Best regards

Similar Messages

  • Is it possible to edit text in a pdf form created using an earlier version of LiveCycle?

    I created a form starting with a Microsoft Word document, turned it into a Adobe Acrobat PDF and then turned it into a fillinable form using the LiveCycle Designer that used to be imbedded in the Adobe Acrobat program a couple of years ago.  Now that they have upgraded my Adobe Acrobat to the version that doesn't have LiveCycle Designer included (but given me the now separate LiveCycle Designer program), I can't seem to edit or add text to an existing form.
    If I create (re-create) the form in the new Adobe Acrobat program, then I can go back and edit either the base document or directly in the form.
    But I can't do that on my old forms.  Is that true or am I missing something?
    Please help.

    I don't know if it is the best solution but you could filter the results to just that client's answers on the summary tab and then PDF that.

  • How do I create an app from my Adobe pdf forms to use on any mobile device as well as windows and ios?

    How do I create an app from my Adobe pdf forms to use on any mobile device as well as windows and ios? I have all the apps in Creative Cloud by the way.

    If you already purchased it with the same Apple ID, then you will not be re-charged.

  • Filling up a pdf form which I received as email. I opened it on my adobe reader 11 and filled up the highlighted fields. Yet when I click on the send via mail it says changes will not be included. How do I send the form with changes?

    Filling up a pdf form which I received as email. I opened it on my adobe reader 11 and filled up the highlighted fields. Yet when I click on the send via mail it says changes will not be included. How do I send the form with changes?
    The add annotations field shows as not allowed in the security options. So how do I send this form back with the changes??

    I think you you need to click 'save' first, then it is saved to acrobat, where it will prompt to send.

  • Reusability of Adobe form created in SFP in a WebDynpro Java application

    Hi Experts,
    Can some one advise me how I can use the pdf form created in ABAP side (Transaction SFP) in the WebDynpro Java application?
    What is the procedure to include this pdf object in the WebDynpro application development?
    Regards,
    Shobhit

    Hi,
    You can add customised UI elements by a right click in your library pallette/ ot by dragging the ui elelments into the pallette. Like wise you can put your layout into the library pallette and reuse them. You may refer the Adobe life cycle designer (ALCD) help for it.
    the second option i meant was after designing the layout in the SFP transaction, click on the PDF preview tab in the layout. Save the PDF.
    NOw on developing the Java application, open the ALCD and use tools-> import to import the PDF you have saved.
    Regards,
    Anto.

  • Can't create a multiple file PDF from PDF forms created in Designer

    Hi
    I want to create a single PDF which combines 6 pdf forms created in Adobe Designer (all as separate pages).
    When I try to create a single PDF from these multiple files using the "Create a PDF from Multiple files" command, my A-3D won't let me do this returning a dialog box saying
    "The file "filename.pdf" is protected. It cannot be used for this command".
    I can't find any properties that control this, either in the original file or in A-3D. Can I overcome this and how?
    Many thanks in anticipation.
    Phil

    Designer-created files aren't really PDF files any more and cannot be
    edited or combined in Acrobat (including Acrobat 3D). You CAN make a
    package of them, however, in Combine Files.
    Aandi Inston

  • Adding LifeCycle Reader Extensions to a PDF Form created in Acrobat Pro 6

    HELP!!!!
    I have already created a form in Acrobat PRO 6.0, but I am running into the issue where my clients who don't have Acrobat STD/PRO can not enter their data and then save the PDF form as a copy and email it back to me with the data included. I understand that this LifeCycle Reader Extensions allows for such a result, but I have not clue how to add this funtionality to my already created PDF?!? I have downloaded the trial version Adobe LifeCycle Designer 7.1 (which appears to have full functionality for only 60 days)in hopes to just add this capability, but I am tripping over my own feet trying to figure this out.
    If anyone could provide some guidance...I would totally appreciate it. I am trying to get away from the paper piles (as i'm sure we all are) and it is such a tease to see the demo documents from the Adobe site actually do what I am trying to do!!! :)
    Thanks in advance for any advice/guidance anyone can give.
    Cheers!
    -jon-

    >. I understand that this LifeCycle Reader Extensions allows for such a result
    That's correct.
    >but I have not clue how to add this funtionality to my already created PDF?!?
    LiveCycle Reader Extensions is a product. You buy it. Note that the
    price is "on application" and varies with your company's needs, but is
    typically either tens or hundreds of thousands of dollars. This is to
    offset the "lost sales" of Acrobat which people would otherwise have
    to buy to save forms.
    > I have downloaded the trial version Adobe LifeCycle Designer 7.1 (which appears to have full functionality for only 60 days)in hopes to just add this capability
    There are many products with LiveCycle in the name from Adobe. That's
    a different one.
    Aandi Inston

  • PDF form created in Idesign CS6 won't save data when filled out

    Why can't users save data in fillable PDF form created in IndesignCS6
    Hi
    Please help I've tried every forum and tried everything you are my only hope  ive created a Interative PDF form In indesign cs6 and when my clients fill it out it doesn't save the data, also ive put it online and again the same and the submit button doesnt work, ive tried the advanced save in Acrobat and still the same what am i doing wrong GUTTED

    I designed in InDesign, exported as Interactive PDF, opened in Pro, saved with extended options.
    I have both Pro XI and the most recent version of Reader. (Mac os x)
    I actually used a template to design the form. Would this somehow be causing an issue??
    Here's a link to the form-- (website is still being developed.)
    http://media.wix.com/ugd/258c13_937630036a284d0ebfcccd8aa9169cf2.pdf
    I've uploaded to the new website, and to Box, and the issue remains the same.
    Thanks for your help!

  • HT1277 I have quickbooks software. I am traveling. I tried to send an invoice out, using the mac email (version 5.3) I can't send the mail out. I get a pop up asking for my password, I put the password in and it does not accept it.

    I have quickbooks software. I am traveling. I tried to send an invoice out, using the mac email (version 5.3) I can't send the mail out. I get a pop up asking for my password, I put the password in and it does not accept it. This is the 1st time I've had this problem.
    slpmtns

    Whilst it may not be your fault I am afraid it appears that your post is on a forum which is not the best for your OS. It will save the time of the unpaid volunteers here, and may resolve your issue faster, if you could examine the list below and see if there is a more appropriate forum to which you could direct your question.
    OS X 10.9 Mavericks
    OS X 10.8 Mountain Lion
    OS X 10.7 Lion
    OS X 10.6 Snow Leopard
    OS X 10.5 Leopard
    OS X 10.4 Tiger
    OS X 10.3 and earlier
    OS 9, OS 8 & System 7
    OS X Technologies
    OS X Server
    iPad
    iPhone
    iPod
    Other

  • Why Lifecycle Designer ES4 crashing on a pdf form created in ES2

    On HP Probook 4730s laptop with Windows 7, Designer ES4 keeps crashing on a pdf form created in ES2. Opening it in Adobe Acrobat Pro XI and reader is fine. Installed the ES4 sp1 did not help. Other forms are fine. No special fields on the form except some basic textboxes, signatures, checkboxes, lines.
    Any idea about how to fix this?
    Thanks

    Using PDFStreamDumper, I found this:
    <form checksum="/I/bugqsY9MYw688CDeeueRfqaM=" xmlns="http://www.xfa.org/schema/xfa-form/2.8/"
    ><subform name="form1"
    ><instanceManager name="_"
    /><subform
    ><field name="Button1" presence="hidden"
    /></subform
    ><instanceManager name="_"
    /><subform
    /><instanceManager name="_"
    /><subform
    /><instanceManager name="_"
    /><subform
    /><field name="SignatureField1"
    /><field name="SignatureField1"
    /><field name="SignatureField1"
    /><field name="SignatureField1"
    /><field name="SignatureField1"
    /><field name="SignatureField1"
    /><field name="SignatureField1"
    /><field name="SignatureField1"
    /><field name="SignatureField1" access="readOnly"
    /><pageSet
    ><pageArea
    /><pageArea
    /><pageArea
    /><pageArea
    /></pageSet
    ></subform
    ></form
    >
    Note the same signature field has been defined multiple times. I'm not sure how this happened, but seems like a likely culprit. In the future, try to keep your forms as XDPs until you need to distribute them, then save them as PDFs. The XDP files are just text, and thus easier to fix if something goes wrong.

  • How do I complete an electronic signature field in an Interactive PDF form (created in Indesign)?

    How do I complete an electronic signature field in an Interactive PDF form (created in Indesign)? This form will serve as an employment application on a website. The goal is to have any person (interested in applying for a job via the Internet) access, complete and electronically sign the form upon submission.

    Hi,
    Via createPDF you would not be able to electronic sign the PDF form, you would either require Adobe Reader or purchase Adobe Acrobat to sign the PDF.
    To download Adobe Reader
    http://get.adobe.com/reader/
    You can purchase Adobe Acrobat
    http://www.adobe.com
    ~Pranav

  • How to send a form created with liveCycle in PDF

    Hi,
    I have Acrobat 9. I created a form that I put online in pdf. A client can compile this module with acrobat reader but on send the format used by acrobat reader is .xml. How can I use pdf and not xml?
    Thanks to all than can answer me!

    Sending PDFs without an Email Client Software installed needs to be handled at the server. Using a Microsoft .net web server, and SMTP host, you can send e-mail with PDFEmail.net. PDFEmail.net doesn't require Adobe Acrobat or Reader installed on the server, and works on remote and local web servers with access to a local or remote SMTP user account. PDFEmail.net doesn't require programming knowledge, just upload the scripts and the libraries to your webserver application root, and point the Submit URL action to the script.
    For more information, and online demonstrations, please visit:
    http://www.pdfemail.net/
    Hope this helps!
    Kind Regards,
    Nick K.
    http://www.nk-inc.com/

  • Is it too much to ask that a Mac user can just OPEN and USE a PDF form created by LiveCycle Designer PC software?!?

    My problem is just that- I have created all my forms using LiveCycle Designer because it is easier to make the forms accessible to individuals with disabilities.  Apparently it doesn't make Mac users have access to the forms.  I've received complaints from Mac users that cannot complete or submit the forms that I created.  I'm not asking how to recreate using another software, I know how to do that.  I'm asking is there a work around to allow a Mac user to open a PDF form or even XML (bedded within an HTML page) on a Mac computer WITHOUT having to use bootcamp, parallels, etc. and be able to complete the form and submit, print or email it?????  I've exhausted all my knowledge on this thus far and I'm hoping to find something that will help.  So far all forums talk about how Mac users need to have a PC side to their computer.  Isn't there another way?
    I've attached an example form that we are no longer using (though still created exactly the same as the others)
    Thanks!

    Hi, as far as I can infer, that term means it's not loading any resources until needed, opposite of this...
    -bind_at_load
                     Sets a bit in the mach header of the resulting binary which tells dyld to bind all symbols                when the binary is loaded, rather than lazily.
    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/ld.1.html
    Load resources lazily.
    You should never load a resource file until it is actually needed. Prefetching resource files may seem like a way to save time, but this practice actually slows down your app right away. In addition, if you end up not using the resource, loading it wastes memory for no good purpose.
    http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneos programmingguide/PerformanceTuning/PerformanceTuning.html
    And, higher OS versionsare even worse with Bonjour/mDNSResponder, but might see this...
    http://support.apple.com/kb/ht3789

  • Using a MAC to fill out PC Created PDF forms creating problems

    We have created a number of forms using LiveCycle to be filled out by clients.  They include submit buttons that send the form back as a PDF (rather than a data file).  The forms were then opened in  Acrobat 8 Professional and usage rights enabled to allow the clients to save a copy of the completed form.
    They work great...unless the client is using a MAC.  We have encountered the following problems with MAC filled forms:
    1) client entered data is present but only visible when the field is clicked on
    2) the Print and Submit by E-mail buttons do not work for MAC users
    3) the tabbing order is inconsistent
    Any ideas of ways we can make our forms more compatible for MAC users??
    Many Thanks!

    Hi Rod,
    Sorry I replied a few days ago, but for some reason it didn't seem to get added to the thread.  So, here we go again ...
    The "fix field" script worked great for me.  So, we have been using that solution when needed.  Unfortunately, I am not enough of an expert on these things to provide an intelligent answer as to why it may not be working for you.
    But, it also became evident from dialogue and testing that the issue only occurs when recipients use MAC Preview to complete the forms.  So, on some forms I have just added a note saying - MAC Users: Please complete the form using Adobe Reader.  As this is, of course, free software, which most people already have installed on their computer, this seems to prevent the problem from occurring as well.
    Hope that is at least a little bit helpful.

  • How to save Fillable PDF form created in XI - So Acrobat Reader can fill out and send back

    Hi, Im extremely hopeful someone can help me with this question, Ive had extreme luck with this question site, you have all been amazing.
    I have created a fillable form in Adobe Acrobat XI and I have saved my work and Im ready to send the form to my client.
    I have been told that I need to save my file in a manner that the general public that does not have Acrobat XI, and mainly has acrobat reader, will be able to open, fill my form out, and send back to me completed.
    How do I do this.
    Ive run a couple tests with coworker and its not allowing the saving of the information that she filled out.
    Does anyone know how I need to save and distribute this form so I get it back filled out from my clients? that probably have only reader?
    thanks in advance for your help.
    Amy

    I think I figured this out???? My pdf tester has gone to bed, so hopefully I will know by morning if this is my solution......
    Open the PDF in Acrobat XI (the form you have saved that is ready to be filled out to whoever you distribute the form to).
    Choose Advanced > Enable Usage Rights in Adobe Reader (Acrobat 8/9) (if you have XI do not do this step, but do step 4 for XI)
    or
    File > Save As >Reader Extended PDF > Enable Additional Features (Acrobat X) (Its actually not in save as, but in save as other)
    Save the PDF using a different file name, you will be using this new file to be the file you will distribute.
    When you now open the PDF in Adobe Reader you will be able to fill the form and save the data and then send it back to the author that is requesting the form to be filled out.

Maybe you are looking for

  • Two ipads- one account or two?

    We have an iPad2, and I just got an ipad3 for me. Should we have separate accounts? I don't want his apps on mine, and he doesnt mine on his.  Will one of us lose all the apps we paid for if we separate the accounts?

  • How do I install the same e-mail address on my ipad as I have on my imac (snow leapord)

    How do I install the same e-mail address on my ipad mini as I have on my imac (snow leopard)

  • How to restore from playlists Time Machine?

    I replaced my hard drive and restored everything from Time Machine and now all my playlists are gone. How can I get tham back. All the music appears to be there still.

  • Graphic Problem

    I have Macpro Quadcore 2.93 With NVIDIA GeForce GT 120, With a dell U2711 connected to it, and I cant get it to work properly in max resolution 2560*1440, I can switch to the resolution but its all blurry. Max Resolution I get is 1920*1080. I guess t

  • Webservice invocation

    Need help in invoking these webservices.. There are two webservices that I am trying to invoke one after the other:- 1) first web service "setupwebsession" sets a session. Here I have setup the session.webuserUI to a component. 2) second service trie