cancel
Showing results for 
Search instead for 
Did you mean: 

Upload / Open a Word Document from BDS with WebDynpro

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The word document does not need to be stored in the mime-repository. What about getting the binary of the word document from BDS and download this?

Regards, Silke

Former Member
0 Kudos

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

Former Member
0 Kudos

Can you please let me know, if you were able to get the above issue resolved. Its would be a great help to know , more on what was the planned action.

Thanks in advance.