Skip to Content
0
Former Member
Jan 22, 2012 at 08:49 AM

CALL_NOT_FLUSHED error while opening word document proxy

470 Views

Hello Gurus,

We are using DMS application for uploading word documents in SAP system.

We are using the following code to open a document from SAP database

CALL METHOD CONTROL->GET_DOCUMENT_PROXY

EXPORTING

DOCUMENT_TYPE = '207'

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.

Above code open a document proxy and with help of macros we are changing some of the variables in the document.

Problem is when we are trying to print this proxy with help of below code.

CALL METHOD proxy->print_document

EXPORTING

  • NO_FLUSH = ''

prompt_user = 'X'

IMPORTING

error = error

retcode = retcode .

In the above code if prompt_user parameter is passed then while execution a new window session is opened for printer selection but this methods gives an error as CONTROL_INTERNAL_ERROR. when i debugged it , it was giving error as CALL_NOT_FLUSHED.

But when we are commenting prompt_user as below

CALL METHOD proxy->print_document

  • EXPORTING

  • NO_FLUSH = ''

  • prompt_user = 'X'

IMPORTING

error = error

retcode = retcode .

While execution printer selection window is open in the same window and nor error is passed by the method.

And print comes.

Kindly suggest how CALL_NOT_FLUSHED error can be eliminated.

Thanks in Advance

Sahadev Abhyankar