2009 Apr 27 1:35 PM
Hi
I am using the following code to open a document from SAP database
It works fine for MS word 2003 documents but it is not working for MS word 2007 (*.docx) documents.
it gives error DOCUMENT_TYPE_NOT_REGISTERED for call open_document method.
CALL METHOD CONTROL->GET_DOCUMENT_PROXY
EXPORTING
DOCUMENT_TYPE = 'WWI'
DOCUMENT_FORMAT = ''
IMPORTING
DOCUMENT_PROXY = PROXY
RETCODE = RETCODE.
IF RETCODE NE C_OI_ERRORS=>RET_OK.
EXIT.
ENDIF.
CALL METHOD PROXY->OPEN_DOCUMENT
EXPORTING
DOCUMENT_URL = DOC_URL
OPEN_INPLACE = 'X'
open_readonly = 'X'
protect_document = 'X'
IMPORTING RETCODE = RETCODE.
IF RETCODE NE C_OI_ERRORS=>RET_OK.
EXIT.
ENDIF.
2009 Apr 27 1:59 PM
in MS word 2007 you have an option to always save in .doc rather than by default .docx
in MS word 2007 you have an option to always save in .doc rather than by default .docx
2009 Apr 27 1:55 PM
Hi,
open the .docx document and save it as .doc and use it.
Regards.
2009 Apr 27 1:59 PM
hello Dev
I m using the above code to open a document from Document management system ie SAP database and print. the code works fine for 2003 version but it gives error if 2007 documents are printed.
2009 Apr 27 1:59 PM
in MS word 2007 you have an option to always save in .doc rather than by default .docx
2009 Apr 27 2:06 PM
But i neeed to open and print documents uploaded in docx format.
I m using the above code to open a document from Document management system ie SAP database and print. the code works fine for 2003 version but it gives error if 2007 documents are printed.
2009 Apr 27 2:10 PM
2009 Apr 27 2:01 PM
try this:
Go to transaction smw0, press table ICON at top right, next press execute button.
Next screen via menu Settings->maintain mime types.
Here you can maintain all sorts of document types.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |