Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CALL_NOT_FLUSHED error while opening word document proxy

Former Member
0 Kudos
723

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

4 REPLIES 4

Former Member
0 Kudos
245

tried passing no_flush = 'X' ?

0 Kudos
245

Yes, Tried with no_flush = 'X'.

Then also it is giving same error.

kesavadas_thekkillath
Active Contributor
0 Kudos
245

Just try with below before printing & opening the document. Refer to the examples SAPREDIT*


                 Call Method cl_gui_cfw=>Flush
                    Exceptions
                      Others = 0.

0 Kudos
245

Hello Keshav,

As per your suggestion i tried this also, But the same error is coming.