How do  I add an attachment (xls file in my case) to the pdf

Hello,
I need to add a excel file as attachment in the generated PDF form.
Someone could tell me if this is possible and how to do it?
Thanks for the help

Hi,
I did little research and found that we can attach any attachment to Interactive form.
1.Get the XLS attachment(You can add File Upload UI Element(Say XLS) to your Application  and Bind  data,filename and mime Type  Properties)   with this , user can choose the XLS file to be attached from Desk top.
2. In the Interactive UI Element,bind the property "pdfsource" (Say PDF_SOURCE), this will  contains the PDF in xstring format.
3. Add a button (Say Attach XLS) on the application and add an Action Method.(Say ADD)
4.in the Action Method(ADD) of the Button, follow the Steps.
    1. Get the File(XLS File) Uploaded,Mimi Type  from File Uploade UI Element(Say lv_xls_data,lv_mimetype,lv_file_name)
     2. get the pdf source( PDF_SOURCE) from Interactive form.(Say lv_pdf_source)
     use the Following Code
DATA: l_fp           TYPE REF TO if_fp,
        l_pdfobj       TYPE REF TO if_fp_pdf_object,
        l_pdf          TYPE xstring,
        l_att          TYPE xstring,
        l_fpex         TYPE REF TO cx_fp_runtime,
        l_type         TYPE string,
        l_errmsg       TYPE string,
        l_short        TYPE sdba_actid,
        l_ext          TYPE sdba_funct,
        l_filename     TYPE skwf_filnm,
        l_mimetype     TYPE skwf_mime,
        l_attachment   TYPE sfpattachments,
        l_attachments  TYPE tfpattachments,
        l_len          TYPE i,
        l_tab          TYPE tsfixml,
        p_dest         TYPE rfcdest .
  MOVE cl_fp=>get_ads_connection( ) TO p_dest.
  l_mimetype   = lv_mimetype.
* Get FP reference.
  l_fp = cl_fp=>get_reference( ).
  TRY.
*     Create PDF Object.
      l_pdfobj = l_fp->create_pdf_object( connection = p_dest ).
*     Set document.
      l_pdfobj->set_document( pdfdata = lv_pdf_source ).
       l_attachment-FILENAME = lv_file_name."Name of the Attached File.
      l_attachment-mimetype    = lv_mimetype.
      l_attachment-description = 'XLS_Attachment'.   
     l_attachment-data        = lv_xls_data."XLS File to Be attached .
      INSERT l_attachment INTO TABLE l_attachments.
      l_pdfobj->set_attachments( attachments = l_attachments ).
*     Execute, call ADS.
      l_pdfobj->execute( ).
*     Get result.
      l_pdfobj->get_document( IMPORTING pdfdata = l_pdf ).
    CATCH cx_fp_runtime_internal INTO l_fpex.           "#EC NO_HANDLER
    CATCH cx_fp_runtime_system INTO l_fpex.             "#EC NO_HANDLER
    CATCH cx_fp_runtime_usage INTO l_fpex.              "#EC NO_HANDLER
  ENDTRY.
Finally "l_pdf" contains the PDF with Attached XLS and you can send this as PDF Document.
Thanks.
Uma

Similar Messages

  • How can I add a attachment field to my new form list

    I have the setting checked yes for attachments. Then I click on the edit tab above then attach file, once I attach the file, it disappears and I cant see it after the record is saved. So how would I add a attachment to a record?

    Hi Soupi,
    From your description, my understanding is that you want to show attachments in list view.
    By default, the list view only contain the Title column. If you want to show whether there is an attechment in an item, you can modify the view and show the Attachments column as Clicking List->Modify View, check "Attachments" in Columns section.
    After the above, the result is like:
    In the above image, test1 has an attachment, test1 doesn't have attachments.
    Thanks,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How do i add Edge animate .oam files to Fixed Layouts Epubs in Indesign cc 2014?

    How do i add Edge animate .oam files to Fixed Layouts Epubs in Indesign?

    Hi,
    There is a bug on iOS7 which does not let edge animate work correctly here. This issue will happen on iPad and not on Mac OS.
    There is a similar thread that explains in detail this issue you are facing:
    https://forums.adobe.com/thread/1513879
    Regards,
    Pooja

  • How to get Header in Downloaded .xls file using  GUI_Download function

    How to get Header in Downloaded .xls file using  GUI_Download function ???
    How to use the the Header parameter available in GUI_Download function .

    HI,
    see this sample code..
    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    DATA: v_pass_path TYPE string.
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
    Cheers,
    jose.

  • How can I add an attachment to an email without showing it in the body of the email?

    How can I add an attachment to an email without showing it in the body of the email?

    1. You must open attachment first
    2. Tap the square with arrow on top right and select mail
    3. Compose your email

  • How do I add an attachment to an email and not have it show up in the body of the email?

    How do I add an attachment to an email and not have it show up in the body of the email? 

    You can right click or command-click on the image in the email and select "view as icon".
    You can change the default behavior of Mail.app so that it always shows the attachment as the icon:
    open a Terminal window (Applications > Utilities > Terminal)
    at the prompt, type in this (it must be exact, or copy and paste it in if you have trouble typing things precisely):
    defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
    Then hit return.
    To revert to the previous default (where the attachment is visible in-line), you just enter the same command with "no" instead of "yes" at the end.
    In either case, however, how the viewer of the email sees the attachment (either as an icon or in-line) depends on how their email client is set up, not on how you send it.
    Message was edited by: arthur

  • How do I add an attachment to an email?

    How do I add an attachment to an email?

    You can attach some items in an email by tapping where you want to insert the item. A choice to attach a photo will come up along with Select, Cut, Paste, etc.
    Other items like PDFs or other documents can be attached by using the app that the document was created or edited with and using the share feature. The Share icon is a square with up pointing arrow.

  • How can I add an attachment to an aol email?

    How can I add an attachment to an aol email?  The compose window has no toolbar, thus no paperclip icon to add an attachment.

    1. You must open attachment first
    2. Tap the square with arrow on top right and select mail
    3. Compose your email

  • How can i add my report.rdf file in portal

    Hi,
    How can i add my report.rdf files in portal .. it's urgent and i have 30 report like to be executed based on user parameters....
    can anybody help me please... thanks in advance....
    vipin
    null

    hello,
    check the whitepapers on "security walkthrough" at http://otn.oracle.com/products/reports
    regards,
    the oracle reports team

  • I used to be able to attach a document to an iCal entry.   After the latest update, it appears this option has been removed.  How can I add an attachment now?  Thanks!

    I used to be able to attach a document to an iCal entry.   After the latest update, it appears this option has been removed.  How can I add an attachment now?  Thanks!

    Hi Dan,
    Yes, iCal 4.0.4 (1395.7). In edit mode, the 'attachments' option is between 'Invitees' and 'URL' (see below). As I said this is for calendars under On My Mac, I suspect you are not seeing this as your event is on MobileMe.
    Best wishes
    John M

  • How To Directly Add Attachments to E-Business Suite Entities Without Using The Managed Attachments Window

    How To Directly Add Attachments to E-Business Suite Entities Without Using The Managed Attachments Window? any option?

    user11016624 wrote:
    How To Directly Add Attachments to E-Business Suite Entities Without Using The Managed Attachments Window? any option?
    Please see:
    http://www.oraclebusinessapps.com/2008/04/28/load-pdf-file-attachment-using-api/
    http://www.oracleerpappsguide.com/2011/04/attachment-in-oracle-application.html
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_ATTACHED_DOCUMENTS_PKG&c_owner=APPS&c_type=PACKAGE
    Thanks,
    Hussein

  • How can I delete an attachment from a received email but save the message?

    Hi all, how can I delete an attachment from a received email but save the message?*

    Over the years this issue crops up again and again. Here are the cases I know about:
    Case 1 - it simply doesn't work
    I have a message in my inbox with a jpeg of about 300Mb. Select message, choose option "remove attachment" which is not greyed out, and it does not work.
    Case 2 - it works if you save the message first
    I move the message from the inbox to a mail box. Open the mailbox (select), select the message, choose option "remove attachment", result: the attachment is removed, a small text file is added and an error appears in the message "missing plug-in". The message size is reduced from 300Mb to a few bytes.
    Case 3 - the option "remove attachment" is greyed out.
    I've googled this at least 10 times and read all the advice about editing various files from the library and all the other hacks. The simple truth here is that the user should not be inconvenienced by such inappropriate behaviour. We're not used to this from Apple any more, not since OS X. Even Windows does this stuff painlessly. In fact this kind of function is something that Outlook and Exchange do incredibly well. If they didn't the corporate world would have ground to a halt.
    My point: the remove attachment option should work all the time and should be redesigned. Right-click + save as + delete in the message would be a hundred times easier.

  • Using iDVD, I've no problem creating a slideshow, but I want to add three seperate sound files, in this case speeches I've got in iTunes. I want to create three individual buttons/sub menu to access them individually from the photos. Can anyone help

    Using iDVD I've no problem creating a slideshow, but am having problems trying to add three seperate sound files in this case three speeches that I hold in iTunes. I want to be able to access them individually and seperately from the photo slideshow. Can anyone advise if this can be done and if it can, how I go about creating the seperate menu and buttons.

    If you'd like to integrate the speeches with the slideshow, I'd do that in iMovie where you'll have more control over the timing.  Use chapter markers at the beginning of each speech so the viewer can jump to a particular speech (note that chapter markers advance the viewer to a particular spot -- the viewer keeps watching the rest of the video until the end of everything or until they use the remote's menu button).
    If you're just wanting the speeches to be on the DVD so people can listen to the speeches after seeing your slideshow, you could:
    - use iDVD or iMovie to make a "slideshow" with just 1 image matching the length of a speech.
    - create three submenus and use the speeches as menu music.  Here's a (random) video on creating submenus:
    http://www.youtube.com/watch?v=DlhQSb_D5kc
    John

  • How can i add my outlook email to my ipad without useing the Exchange Service?

    Please help me in this, How can i add my outlook email to my ipad without useing the Exchange Service?

    I'm afraid you've posted in the wrong place. This is a technical forum around a particular product called 'SharePoint'. This does talk to Exchange and Outlook in places but we don't specialised in either of those. You should have a look for one of the
    generic Outlook support forums or contact your IT department if it's a work related account.

  • HT201317 How do I add existing photos and albumns on my iPhone to the photo stream?

    How do I add existing photos and albumns on my iPhone to the photo stream?

    Welcome to the Apple Community.
    The easiest method is to connect your device to iTunes, transfer the photos to your computer and add them to photostream from there. If you only have a few photos to add, you could take a screenshot of each one.

Maybe you are looking for

  • Problem with Payment Information

    Hello, there is some problems with my billing information i can't finish my Payment Method is decline. Please help me.

  • File extension default no longer enabled while saving

    Similar to Gregg Riley's StarOffice experience, I recently noticed that default saves for various (but not all) StarOffice "pulldown file type" selections no longer save with the correct-default extension. I now (sometimes) have to type in the correc

  • Duplicated tunes with iMatch icon

    On one complete CD and a single, all downloaded from the iTunes store recently, duplicate tunes appeared on my iPhone showing the iTunes Match icon. Obviously, my iPhone is displaying both the cloud instance and the 'resident' instance of the tunes.

  • Telephoto Zoom Lens for Canon SLR

    Want to know if the Canon EF 100-400mm f/4.5-5.6L IS USM Telephoto Zoom Lens for Canon SLR Cameras will fit and work with the EOS Rebel XTi camera.

  • Upgraded OS from Windows 2000 to XP, now my Registration Key won't work

    Any reason why my registration key won't work when I upgraded my OS from Windows 2000 to Windows XP? Oh, and I also upgraded the QuickTime application.