Upload / Open a Word Document from BDS with WebDynpro
Hello,
we use the BDS (Business Document Server) to storage our word files. Now we use WebDynpro with the UI OfficeControl.
Could any one tell me, how to open/upload my documents from BDS with the OfficeControl.
The UI FileUpload does not work, because it is not allowed to use specify URLs. link:[http://help.sap.com/saphelp_nw70/helpdata/EN/b3/be7941601b1d09e10000000a155106/frameset.htm]
For example that is the URL from the BDS: "SAPR3://SAPR3CMS/get/100/BDS_5FDB2_5FR/7B3AAF5B22AAD21197ED0060B0672A3C/Forminterface.doc"
I use the class "CL_BDS_DOCUMENT_SET" with the method "get_with_url". result is above.
Each example with the OfficeControl from SAP (Package SIOS) use the Mime Repository:
mime_repository = cl_mime_repository_api=>get_api( ).
CALL METHOD mime_repository->get
EXPORTING
i_url = url
IMPORTING
e_content = content.
wd_context->set_attribute( name = 'DATAS' value = content ).
Have any one an idea, how BDS and WebDynpro works together
What about getting the binary of the word document from BDS and download this?
Yes, it exist a method calls "get_with_table". This return the binary path from my url above.
Here is my source code:
public attributes
DATA oi_document TYPE REF TO if_ios_wordprocessing.
DATA oi_factory TYPE REF TO if_ios_factory.
METHOD wddomodifyview .
DATA ol_node TYPE REF TO if_wd_context_node.
DATA ol_office TYPE REF TO cl_wd_office_control.
DATA vl_document TYPE xstring.
short from
vl_document = myBDS->get_with_table( ).
Settings for UI OFFICE_CONTROL
ol_node = wd_context->get_child_node( 'OFFICE' ).
ol_node->set_attribute( name = 'DATASET' value = vl_document ).
get the office control
wd_this->oi_office ?= view->get_element( 'OFFICE_CONTROL' ).
get the IOS Factory
wd_this->oi_factory ?= ol_office->_method_handler.
get proxy document
wd_this->oi_factory->get_wordprocessing_proxy(
IMPORTING proxy = wd_this->oi_document ).
CALL METHOD wd_this->oi_document->if_ios_document~opendocument( ).
ENDMETHOD.
When I compile everything is ok. But when I run my application, it nothing happen. No word file is opening or no error message. I create a ALC trace (SAPNOTE 949770).
Each time when I try to open my word file comes a popup-window from the alc-trace:
ERRO|20081024143529|WD86_1300|CIOS_GeneralDocumentContainer_Acf::| STG_E_READFAULT : readaccess|HRESULT=-2147287010( A disk error occurred during a read operation)
ERRO|20081024143529|WD86_1300|CIOS_GeneralDocumentContainer_Acf::|Office version is lower than 12, only native office format supported|HRESULT=-2147467259(Unspecified error
ERRO|20081024143529|WD86_1300|CIOS_GeneralDocumentContainer_Acf::|loadOffice2007xml|HRESULT=-2147467259(Unspecified error )
But I have access to the BDS and to the document.
Can any one help me.....
Regards
Nils
Similar Messages
-
Open a word document from a Java Application
Hi,
Can I open a word document from a java GUI apllication and point to a bokkmark automatically in the word document when opened.See this thread:
http://forum.java.sun.com/thread.jspa?threadID=228332&messageID=810684 -
i install abode - it will download but not install and indicates i have to close firefox before it will download. Also, I try to open a word document from a website - it will download but not open.
You need to close Firefox to install many plugins, including those from Adobe.
As for the Word downloads, see the changing downloads action section of this link - https://support.mozilla.com/kb/Managing+file+types -
How can I open a word document in C++ with a CNiWordApplication object?
Hello,
For an application, i need to open a word document using VisualC++ and CNiWord classes (CNiWordApplication, CNiWordDocument...). I successed to create a new CNiWordDocument with the CNiWordApplication CreateDocument() function. But when using the OpenDocument() I have error message about violation error. Must I create another objet before calling the OpenDocument() function? Is it possible to have an example of code to open a word document?
Thank you for your help.I tried the following code to open a doc file in an MFC application.
CNiWordApplication word;
CNiWordDocument doc = word.OpenDocument("c:\\books.doc");
This worked fine for me. I tried this with Word 2003 and Measurement Studio 7.1
Try running one of the shipping examples. You can find examples for this under ..\MeasurementStudio\VCNET\Examples\Office\
Hope this helps.
Bilal Durrani
NI -
Opening a word document for editing with webdav
I'm not sure if this is the correct place for this question..
I am attempting to open a word document, which resides in a webdav folder from web app. I need IE to start word and open the original document from the webdav folder and allow the user to make changes to the document and save it back to the webserver.
Wep app this http://www.javatalks.ru/go.php?uri=http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
I've got it to open the document but it seemed to have copied the document to my temporary internet files folder and opened the copy from there. The original file name is "test.doc" but the opened temprary file is "test[1].doc" and so on. How can I get it to open the original document for editing?
Any help would be appreciated..Not sure about payment options but you can check for yourself at http://success.adobe.com/en/na/sem/products/acrobat/feature.html
-
How do I open a word document from a url?
We have a document server and I need to open a MSWord document that is a template for LabView to populate (using bookmarks and Connectivity Toolkit).
I have looked at the URL builder and I can't get that to work. The Get Document does open the document but it doesn't seam to give the correct path to the Word Get Report so it doesn't give a good link.
I can open it in the default browser which links to Word but again there isn't any link to feed to Word Get Report.
Am I even close?
Thank you,
Ben
Solved!
Go to Solution.Here's a code snippet that should help you:
It:
initializes a HTTP session with a username and password,
generates a random, non-existent filename with a doc extension
Get's a file on URL to the temporary filename
Closes the HTTP session
Starts the Report Generaton Toolkit, with the file from the web as the template
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
TO IMPORT AUTOMATICALLY WORD DOCUMENTS FROM INDESIGN WITH CHANGES
Who can help me?I need to update several indesign documents updating them from external words..is it possible?
InDesign, by default, links to placed Word document. Be aware that if you choose Edit Original (from the Links panel), that it will lose any formatting which you've applied to the text within InDesign.
-
How to open a Word Document from Developer Forms
Hi Buddies,
Can anybody help me out in this regard.
My requirement is like this.
In my developer Forms Screen i have one button named resume.
if i click that button then that particular persons resume has to be opened which is MsWord file(.DOC)located in server(Which is the database server).
So we have to launch the word with the required document using the Forms built-ins. The document path will be stored in my database.
Quick response will be appreciated.
Thanks in Anticipation
Regards
Kiran Kumar JastiHi Kiran,
host('winword.exe <pass ur resume path>');
hope this could work out....just try...good luck
Regards
Thobula Rakesh -
How to open a word document from OA page
Hi,
I have a requirement where in the file names are displayed in a table .When the user clicks on the file name the file should open .The docs are basically word docs.
Any idea how to implement this.
I saw a post related to this in which someone suggested to use symlinks in Apache.Not sure how to do that.
Thanks
AnnaHi Kiran,
host('winword.exe <pass ur resume path>');
hope this could work out....just try...good luck
Regards
Thobula Rakesh -
How to upload and down load Document from Server in Webdynpro Java
Hi,
I have to upload and download document to the server and from the server.
The examle and the sample application which is available in SDN is not helpful as its about uploading and downloading from the application context.Please let me know how to upload/download from teh server.
SandipHi sandip,
I have same requirement.If u get any source please let me know.
reagrds,
Anuradha -
Opening PC WORd documents with AW
I am new IMAC user. Unfortunately salesman (Best Buy) told me that a word processor and spread sheet were part of the software package! I want to buy AW (sounds like a great program and my son loves it), but need to know how to open PC Word documents from email. Will I be able to do this?
Thanks.As Roger said, AppleWorks may not open newer Word & Excel files, from a PC or Mac. In the past, AppleWorks 6 was able to open almost all Word & Excel documents, it is not able to open those saved with newer versions of either Mac or PC application. The Office translators in AppleWorks were introduced in late 2000 or early 2001 & have not been updated. In the meantime, Microsoft has made significant changes in the file formats in the last year or two that AppleWorks can't open them any more. AppleWorks 6 was released in March, 2000, & hasn't even had any kind of update since January, 2004.
-
Open word document from oracle forms 10g
Hi,
Could any one please guide me how to open a word document from forms 10g on client machine (windows). My word document resides on application server (unix).
Thanks for the help in advance.I tried that, but it doesn't work.
What I have done is, I have written a java code that has a function ope_word that opens up a word document. I have created jar out of it called wordbean.jar.
Add this wordbean.jar in $ORACLE_HOME/forms/java directory and also added in the formsweb.cfg file (archive_jini=wordbean.jar)
Then I created a form and usinf fbean.register and fbean.invoke functions of forms, I am trying to call wordbean.jar.
F.bean.register is registering all the components of wordbean.jar but it is not opening the word document.
Could you please help ?? -
How to open a word document in dynpro
Hi experts,
i am new to web dynpro, i have a problem that i need to open a word document from desktop in my screen. its not ALV or i dont have to upload the file but i have to OPEN the file..
plz help
Regards:
ParteekHi Manu,
Follow these steps:
1. Create CONTEXT with 2 attributes - UPLOAD & SHOW of type XSTRING.
2. Add a "UPLOAD" element on the layout of screen & map it with UPLOAD attribute of context.
3. Then Add a "OFFICE CONTROL" on the same screen & map it with the SHOW attribute of context..
4. Add a BUTTON for Show Document/Open Document.
5. Add 2 attrubutes in ATTRIBUTES tab of the dynpro application:
i) DOCUMENT type IF_IOS_DOCUMENT
ii) FACTORY type IF_IOS_FACTORY
6. On method of that button (SHOW)...enter the following code:
DATA : refexp TYPE REF TO cx_ios_exception.
IF wd_this->document IS INITIAL.
wd_this->factory->get_document_proxy( IMPORTING proxy = wd_this->document ).
ASSERT ID sios_demo CONDITION wd_this->document IS BOUND.
ENDIF.
wd_this->document->opendocument( ).
read context node
DATA:
node_file_upload TYPE REF TO if_wd_context_node,
elem_file_upload TYPE REF TO if_wd_context_element,
stru_file_upload TYPE if_second=>element_file_upload .
navigate from <CONTEXT> to <FILE_UPLOAD> via lead selection
node_file_upload = wd_context->get_child_node( name = if_second=>wdctx_file_upload ).
get element via lead selection
elem_file_upload = node_file_upload->get_element( ).
get all declared attributes
elem_file_upload->get_static_attributes(
IMPORTING
static_attributes = stru_file_upload ).
stru_file_upload-show = stru_file_upload-upload.
set all declared attributes
elem_file_upload->set_static_attributes(
EXPORTING
static_attributes = stru_file_upload ).
7. Now add the following code to the WDDOMODIFYVIEW method (default method)
DATA:
office TYPE REF TO cl_wd_view_element.
get the office control
office ?= view->get_element( 'OFFICE' ).
ASSERT ID sios_demo CONDITION office IS BOUND.
get the IOS interface
wd_this->factory ?= office->_method_handler.
ASSERT ID sios_demo CONDITION wd_this->factory IS BOUND.
8. Run the application & enter a text file of word format in the File Upload.
9. Press show button & it will display the code of that word file.
Plz ask any queries if you face any problem doing the above code.
& dont forget to mark Points.
Regards:
Parteek.
Edited by: Parteek Arora on Jan 23, 2008 9:05 AM -
Can you open a word document in pages 08
Quick question however stupid it is
can you open a word document from a pc in pages 08?
sorry in advance if i have posted this in the wrong discussion area
cheers
Message was edited by: Lama323The answer is as above wrote yes. Does it do it perfectly, the answer is no. Opening a .doc/.docx in Pages'08 will generate a frame warning message I find. I find text and symbols are preserved well, but formatting is not perfect. An example of my own is in the screenshot below. Same page 28 on a .docx but formatting of the document is not exactly preserved as you can clearly see. Where preservation of formatting is critical Pages is good, but not perfect alternative to Word '08.
http://img225.imageshack.us/img225/2461/docxcu2.png -
I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?
The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
Menu > Format > Import Styles
The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
Peter
Maybe you are looking for
-
Initial View using PDF Portfolio HELP
Using the new PDF Portfolio Feature. I went to file>portfolio properties and select initial view tab. I changed magnification level to "Actual Size", however when i open the pdf, the initial view is not 100%. Can anyone help me?
-
Where is the ibooks chapter in the iPad user guide?
This statement was on the web page Apple - Support - iOS apps - iBooks. Download the User Guide Download the User Guide for your device and view the iBooks chapter to learn more about iBooks and the iBooks Store. Select your device below: I could not
-
How to print the address(or handle) of an object
I wanna to know how variables and objects are stored in the memory. How can I print out the address of an object.
-
I allowed Firefox 3.6.15 to update my existing Firefox (3.6.13). After the upgrade, Firefox does not load (not in Task Manager). I removed it, downloaded and installed it by hand, and I get a 1.9.15 not compatible with 1.9.13 error message. When I re
-
Table maintenance by using module pool program
Hi Please give me step by step procedure to generate table maintenance by using module pool program