on 11-27-2009 10:44 AM
Hi,
I need to open a word doc. in my webdynpro application. I have found few blogs here referring to MIMEs object but i couldn't get the complete process that need to be follow. I have imported MIME object in MIME repository and stuck at this point. Can anybody please tell me whole process in brief that is require in this issue.
Rgds
Sudhanshu
hi,
Refer this :
METHOD onactionopen_wordfile .
DATA : mime_repository TYPE REF TO if_mr_api,
content TYPE xstring,
url TYPE string VALUE 'SAP/BC/WebDynpro/SAP/ZTREE/s.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.
In URL , type in the Path where docoument is stored in Mime .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is this ZTREE/S.DOC about?
The URL of the doc would be:
http://your.server.com/sap/bc/webdynpro/sap/wdcompnent Name/template.doc
This is the place where Document gets stored if you import into Mime.
do i need to use OFFICE_CONTROL UI element in this.
For this you dont need any other UI.
ICF services must be activated.
There are some configuaration settings which you need to do to run wd abap application.
Refer this :
http://help.sap.com/saphelp_nw70/helpdata/en/43/e86de5008b4d9ae10000000a155369/content.htm
The MIME Repository is used to store all MIME objects (style sheets, graphics, icons and so on) in the SAP System. MIMEs are created as objects in the SAP database.
Refer SAP Online help on Mime :
http://help.sap.com/saphelp_erp2005/helpdata/en/46/bb182fab4811d4968100a0c94260a5/content.htm
Hello Sourav,
I have done it sucessfully but got another issue with look and feel im getting in this component. I actually wanted to open that document(.doc or .xls) within component itself (i.e., within browser). For your reference please have a look at the standard component IOS_TEST_SPREADSHEET_MS. I guess this kind of output is possible by using office control element only.
pleae advise.
Rgds
sudhanshu
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.