Skip to Content
0
Apr 27, 2009 at 12:34 PM

DOCUMENT_TYPE_NOT_REGISTERED error

300 Views

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.