on 10-13-2009 10:07 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for the quick replies!
Now I can open a Word file. But the content is not connected. Do you know what's the problem? The codes are as following:
*********************************************************************************
METHOD onactionopen_wordfile .
DATA : mime_repository TYPE REF TO if_mr_api,
content TYPE xstring,
url TYPE string VALUE 'D:\YWU\LernenMaterial\bingen\Web Dynpro\HelloWorld.doc',
lv_fnam TYPE string..
mime_repository = cl_mime_repository_api=>get_api( ).
get the content of the word file
CALL METHOD mime_repository->get
EXPORTING
i_url = url
i_check_authority = ' '
IMPORTING
e_content = content
EXCEPTIONS
parameter_missing = 1
error_occured = 2
not_found = 3
permission_failure = 4
OTHERS = 5.
cl_wd_runtime_services=>attach_file_to_response(
EXPORTING
i_filename = url
i_content = content
i_mime_type = 'APPLICATION/MSWORD').
ENDMETHOD.
hi,
You are directly picking the file from dekstop.
Try it importing into Mime .
1.uploade the word doc by importing a Mime into your Web
Dynpro component.
2.Right click your component->Create->Mime Object->Import.
3.Consider the name of your component 'ZWD_TEST' and the name of the word
doc 'template.doc'.
The URL of the doc would be:
http://your.server.com/sap/bc/webdynpro/sap/zwd_test/template.doc
Rest you have already done the coding.
Refer SAP Online help for Mime : http://help.sap.com/saphelp_erp2005/helpdata/en/46/bb182fab4811d4968100a0c94260a5/content.htm
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.