2012 Jan 22 8:49 AM
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
2012 Jan 22 9:10 AM
2012 Jan 23 9:25 AM
Yes, Tried with no_flush = 'X'.
Then also it is giving same error.
2012 Jan 23 9:49 AM
Just try with below before printing & opening the document. Refer to the examples SAPREDIT*
Call Method cl_gui_cfw=>Flush
Exceptions
Others = 0.
2012 Jan 30 5:22 AM
Hello Keshav,
As per your suggestion i tried this also, But the same error is coming.