Provision to attach JPG, PDF or word file in module pool program

Hi All,
I am creating a Z-transaction with create, change and display options. The user needs 2 to 3 fields where he/she can attach a google map or a pdf or a word file. Could anyone please suggest how I can go about this such that during creation process the user can attach a file and then the same is displayed in the display screen and a click on that could lead to opening of the map or the pdf file stored on the system. If anyone has done the same, cud you please provide the code also.
Regards,
BP.

First of all you need to create a conatiner on screen then
for displaying word document you need to refer class CL_GUI_DOCUMENTS. 
Sample code :
data: custom_container type ref to cl_gui_custom_container,
      word_doc         type ref to cl_gui_documents.
*&&custom container--
  create object custom_container
                 exporting container_name = 'CUST_CONT'.
  create object word_doc
    exporting
      parent            = custom_container
   SHELLSTYPE        =
   LIFETIME          =
    exceptions
      cntl_error        = 1
      cntl_system_error = 2
      create_error      = 3
      lifetime_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.
call method word_doc->open_document
  exporting
   GUID                  =
   GUIDTOUSE             = SPACE
   DOCUMENT_ID           =
   CONTREP_ID            =
    document_class        = 'WORDPRO.APPLICATION'
   OBJECT_TYPE           =
   OBJECT_ID             =
   DOCUMENT_TYPE         = 'WORD.BASIC'
  exceptions
    implace_not_supported = 1
    others                = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
for PDF document you need to refer class  CL_GUI_PDFVIEWER
Sample code : refer to program SAP_PDF_VIEWER_DEMO

Similar Messages

  • TS3899 After upgrading to IOS 7, the only options Gmail gives using Safari or mail to attach files are attaching a camera roll file or  draw a scribble. How can I attach a PDF or word doc? I was able to do so using IOS 6.

    After upgrading to IOS 7, the only options Gmail gives using Safari or Mail app to attach a file are attaching a camera roll file or drawing a scribble. How can I attach a document such as a PDF or word file? I used to be able to do so using IOS 6.

    skinb wrote:
    Did  you solve the problem? I am a new iphone user. Mac is less intuitive than wished.
    You posted in the iPad forum instead of the iPhone forum. To get answers to your question, post in the proper forum. See https://discussions.apple.com/welcome
    You tagged onto an older post. If you want an answer to your specific question, you need to create a new post. By creating a new post, you will receive emails when helpers post responses.
     Cheers, Tom

  • How do I upload my resume when it's saved in Pages but needs to be send as a PDF or word file?

    How do I upload a document that has been created using pages as a PDF or Word file? When I attempt to upload it, the only choices I get are choices from my camera!!

    Tap on the wrench/spanner in the upper right of the document & then "Share & Print." You can then e-mail the document but I'm not sure how to upload to a web site from an iPad.

  • PDFs and Word Files open on iMac but not Macbook Pro

    I own an iMac and a MacBook Pro. Recently, I've been having an issue with some PDFs and Word files that have been emailed to me from different contacts. All open—and can be seen using Quick Look—on the iMac. However, on the MacBook Pro it's a different story. When I try Quick Look all I see are the icons. When I try to open the PDFs in Preview (default app for me) I get an error message saying the file could not be opened and might be damaged. When I try to open the Word doc in Word, Pages or Bean I see all of the extraneous header information etc and the text is all mixed up in that formatting junk. I have repaired permissions, cleared out my user cache, restarted—pretty much everything I can think of. But no luck. Thought?

    Brilliant suggestion! I checked all the display settings on my iMac 27" and confirmed they were the same settings as my MacBook -- until I checked the Window 7 screen resolution. Because of its size, I had expanded the screen across most of the monitor. When I changed the resolution to one suggested or configured by Windows, Approach worked fine. I've now tested it on quite a few of the settings, and as long as I let Windows determine the best resolution (on my iMac 27" it seems to be 2043 x 1276), Approach works like it should. Thank you!

  • How to attach a excel or word file when replying to a mail ?

    Hi,
    I am having problem while using safari app.
    When i am to reply to a mail and while replying i am to attach an excel or word file, how should i do it ?

    Doesn't matter what mail it is.  You cannot actually do this on an iPhone.  It is a bit frustrating. The only thing you can attach to a mail message (from within the message itself) is a photo or video.
    You can email all sorts of things from within lots of apps, but you cannot add something to a message.

  • Why can I not convert pdf into word file?

    why can I not convert pdf into word file?

    This is not a feature of Adobe Reader. You'll need either Acrobat or a subscription to one of the web-based services that Adobe offers (like PDF Pack) to do it.

  • How do I copy and paste text from a pdf file and paste it into a new pdf or word file?

    I have a very large pdf file (500 pages) comprised of 200 letters.  How do I copy individual letters (copy and paste sections of the file) and put them in a new pdf or word file?
    Thank you

    Hi drredwood,
    When you open your PDF file a yellow bar will appear on the top of the screen.
    Click on 'Enable All Features'.
    Then you will be able to copy the content from your pdf and to paste in any of the file.
    Regards,
    Florence

  • View PDF and Word file

    Post Author: vcharles
    CA Forum: Crystal Reports
    Hello,
    I am using crystal report XI with ACCESS 2003, I would like to create a field in my ACCESS table to insert the path of the PDF or word files I would like to view when I click on the report. Is there a way to do this? Whic is the best approach to view a PDF or Word document from the crytal report viewer?

    Post Author: pvierheilig
    CA Forum: Crystal Reports
    Just so I get the first part correct - this is what I understand you to want to do:Add column to Access db, say something like 'FILE_LINK'Have a field on your report that displays the value of the FILE_LINK data for either PDF or DOC's. To do this:Populate the Access db as you'd like, including the file extension.Add the database field to the report.Right-click the field and 'Format Field'.Select the 'A File' radio button.Select the Hyperlink tab.Select the 'X-2' button in the 'Hyperlink Information' area of that same tabbed window.Enter a formula for what you want to be shown.  To show 'somefilename.pdf' on a shared drive, for example, enter this formula:"
    x\" & {database.column}Click the 'X-2' icon with the green checkmark, near the top-left of the window.  Fix any errors reported.Click 'Save & Close' and then 'Ok' on the 'Format Editor' window.Drop/drag the field where you'd like it and you should be good to go. 

  • Cannot convert pdf to word file

    i cannot convert pdfs to word files using either Adobe Reader or ExportPDF website.  Using Adobe Reader, I get "an error occurred while trying to access the service" and for ExportPDDF website, I get an "internal server error" message. I have the most recent version of Adobe and checked for recent updates  Anything else I can try?

    [topic moved to Acrobat.com Services forum]

  • Is asha 311 reads pdf n word files?

    hey how can i read pdf and word files.I need it pls.....

    armagon wrote:
    The eZReader on Nokia Store is not a demo version, it's the full version and free of charge to download. But it is a bit  limited. I just gave it a try with few different .pdf files myself and it was not able to display e.g images at all, just text.
    I know next to nothing about Java ME development, but it seems to me that you should be able to work around the memory constraints. It would probably not be pretty or easy, though.
    If the memory constraints are really too severe, Nokia should consider writing a native Series 40 app for PDF and doc/docx reading. Both are pretty essential functions today, even for a budget phone.
    Mobile phones: 3310, 3510i¹
    Smartphones: N70¹, N82, E50¹, 6220 Classic¹, 6710s Navigator¹, X6-00, N97 mini¹, 700¹, Asha 311¹, Lumia 710¹, Asha 503¹
    In the family: C2-01¹, Asha 303¹, 301¹
    ¹ Still in working condition

  • If I buy Pages, will I be able I upload pdf and word files to websites?

    If I buy Pages, will I be able I upload pdf and word files to websites?

    Pages can export to PDF and .doc formats and send those via email, but it has no "upload" function.  That is something you normally do with a browser or an ftp app.

  • I have convert pdf to word file , how I CAN OPEN IT?

    i HAVE CONVERT PDF TO WORD FILE AND I CAN NOT OPEN IT , PLEASE TELL ME HOW CAN I OPEN A WORD FILE?

    Or if you don't have Word, you can use the free Microsoft Word Viewer.

  • When i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program

    when i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program.
    i am using office2007  with windows7 premium home edition.  i have checked file associations., all DDE settings. i have even tried this in safe mode. the same thing happens. please note once i see the error. i can then go back to the file click on
    it a second time and it WILL open. AND i can open any file if i open excel and and find the file from there. i uninstalled and re-installed office 2007 from scratch. And i checked the compatibility mode (all un-checked) still the problem persisits. this is
    a real PITA.   anyone have any solution for this? Thanks 
    ken yanow

    Hi,
    Have you try to un-select the Ignore other applications that use Dynamic Data Exchange (DDE) setting?
    Click the Microsoft Office Button, and then click Excel Options.
    Click Advanced, and then click to clear the Ignore other applications that use Dynamic Data Exchange (DDE)
    check box in the General area.
    Click OK.
    If the problem cannot resolve, the Run as administrator may selected.
    Go to Office default install location: C:\Program Files\Microsoft Office\Office12.
    Right-click EXCEL.EXE > Properties >
    Compatibility tab.
    Under Privilege Level, uncheck Run this program as an administrator
    check box.
    Best regards.
    William Zhou
    TechNet Community Support

  • How to give the application server file path in the module pool programming

    Hi,
         Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
      For eg I have imported a logo name ‘owens’ into sap system by using transaction ‘se78’; now I need to call the path in the below url,
    if container2 is initial.
    CREATE OBJECT CONTAINER2
      EXPORTING
        CONTAINER_NAME              = 'PICTURE_CONTAINER2'.
    CREATE OBJECT PICTURE2
      EXPORTING
        PARENT = CONTAINER2.
    CALL METHOD PICTURE2->SET_DISPLAY_MODE
      EXPORTING
        DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
      EXCEPTIONS
        ERROR        = 1.
    CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
      EXPORTING
        URL    = " ? "
      EXCEPTIONS
        ERROR  = 1
        Others = 2.
    endif.
    Thanks in advance
    Deepu

    hi Deepu,
    Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
    Regards,
    Santosh

  • Generate PDF for pie graph generated by module pool program

    Hi Experts,
                     I have created a module pool program which generates a pie graph.I want to get the pdf output for the graph. please help me.
    Regrds,
    Rao

    Hi K A Rao,
    I think CONVERT_ABAPSPOOLJOB_2_PDF can help you solve the issue.

Maybe you are looking for

  • Same Business Partner as Customer and vendor

    Hi All    I have a scenerio where same BP is both my customer and vendor . I make purchases and sales both with the same. I want to have single account for the BP ie All transactions should reflect in the same BP card. How can I achieve this thing in

  • Java Newbie Question - the import statement

    Hi Geeks, I have a problem for importing a java .class in my project. This latter is named "Tedetis_New". Inside it, I created a "src" folder containing all the source code of the application. I import a jar file inside the parent directory of "src"

  • MuseJsAssert:ErrorCallingSelectorFunction:Error:InvalidArgument

    Hi I've developed a site for a client and once launched they received this error in IE 7 and IE 8: MuseJsAssert:ErrorCallingSelectorFunction:Error:InvalidArgument Hoping someone else has had this issue and it's an easy work-around. Thanks

  • Insert column head continued by script

    Hi, I have to insert the continued text on every column top if any heading level text continued on next column. For instance my 'H1','H2','H3','H4' these are the index column head levels, if my 'H3' head level text continued on next column, 'H1','H2'

  • Running AW7 on Windows 7

    Hi I hear the window 7 beta is now available. Has anyone had a chance to test it out and see if Authorware runs ok on it. I use Authorware 7. I would be nice to hear that the compiled files run smoothly on windows 7 cheers Jon