cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Controlframework - CONTROL_FLUSH_ERROR in FM GUI_DOWNLOAD

despet
Explorer
0 Kudos

Hello experts,

I've an issue, that randomly files created with FM GUI_DOWNLOAD are truncated. As in LOOP there are around 50 files generated few of them are incomplete and after processing "Error in Controlframework" is stated. I've found out that this error occurs often when network destination is choosen. But also from time to time locally.

Any ideas what is causing this issue?

Thank you and best regards.

Pawel

despet
Explorer
0 Kudos

One more comment, generated files are maximun 600 KB each.

Sandra_Rossi
Active Contributor
0 Kudos

You should look at SAP notes, or contact SAP support.

mike_karman
Member
0 Kudos

Hi Pawel,

I have the same errors when downloading files with SAP GUI, when it's randomly interrupted before it's complete. It's for files >5MB.

Did you find a solution to the errors?

Regards

Michael

despet
Explorer
0 Kudos

Hi Michael,

for me adding two additional parameters: codepage and write_bom solved my issue.

Best regards.

Pawel

 CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
     filename                = lv_filename
     filetype                = lv_filetype
     append                  = lv_append
     write_field_separator   = 'X'
     codepage                = lv_encoding
     write_bom               = abap_true

Accepted Solutions (1)

Accepted Solutions (1)

despet
Explorer
0 Kudos

Hello Jude,

thank you for hint. I've created trace file, but please help me to interpret content:

<419=Automation                       :    elapsed time for call = 0.001 sec
<419=Automation                       :    SAPAWRFC VERBS =         4 SecureAppendToUrl                         C
<419=Automation                       :    SAPAWRFC VARS = _RESULT                         000000000O53                                                                                                                                                                                                                                                                                                     
<419=Automation                       :    SAPAWRFC PARAMS =   4  12 #1                                8 
<419=Automation                       :    SAPAWRFC VARS =                                 000000000 APPLICATION                                                                                                                                                                                                                                                                                            
<419=Automation                       :    SAPAWRFC PARAMS =   4  12 #2                                9 
<419=Automation                       :    SAPAWRFC VARS =                                 000000000 X-UNKNOWN                                                                                                                                                                                                                                                                                              
<419=Automation                       :    SAPAWRFC PARAMS =   4  12 #3                               10 
<419=Automation                       :    SAPAWRFC VARS =                                 000000000 file://H:\MARS\TB-B_W.20_21-25.dat                                                                                                                                                                                                                                                                     
<419=Automation                       :    SAPAWRFC PARAMS =   4  12 _RESULT                          11 
<419=Automation                       :    SAPAWRFC VARS = _RESULT                         000000000                                                                                                                                                                                                                                                                                                        
<419=Automation                       :    CALL METHOD "SecureAppendToUrl" OF [#53/0x13596BB8/303/SAP.DataProvider.1]
                    #0: STRING "APPLICATION"
                    #1: STRING "X-UNKNOWN"
                    #2: STRING "file://H:\MARS\TB-B_W.20_21-25.dat"
<419=(Error)(14.12.20 12:23:15.961)(166460/160672 KB):    CreateFile failed: hr=0x80070006, lastError=0(The handle is invalid.)
<419=(Error)                       :    ConvertStreamToFileNoPath failed: hr=0x80070006(The handle is invalid.)
<419=Automation(Error)                       :    CALL METHOD "SecureAppendToUrl"[DispID=1610743851] OF [#53/0x13596BB8/303/SAP.DataProvider.1]
                    #0: STRING "APPLICATION"
                    #1: STRING "X-UNKNOWN"
                    #2: STRING "file://H:\MARS\TB-B_W.20_21-25.dat"
IDispatch::Invoke raised exceptionException occurred
<419=Automation(Error)(14.12.20 12:23:15.977):    
<419=Automation(Error)                       :    *****************************ERROR OCCURED IN MODULE: [SAPDataProvider 1.0]*****************************************************************************************************************************
<419=Automation(Error)                       :    PROGRAM_ID             |MODULE_NAME             |METHOD_NAME           |ERROR DESCRIPTION            |VERSION          |GUI VERSION       |MODULE_PATH                                                 |
<419=Automation(Error)(14.12.20 12:23:15.992):    ********************************************************************************************************************************************************************************************************
<419=Automation(Error)(14.12.20 12:23:15.997):    SAP.DataProvider.1     |SAPDataProvider 1.0     |SecureAppendToUrl     |The handle is invalid.
     |7600.1.4.295     |7600.1.4.1159     |C:\Program Files (x86)\SAP\FrontEnd\SapGui\sapdatap.ocx     |
<419=Automation(Error)                       :    ********************************************************************************************************************************************************************************************************
<419=Automation(Error)                       :    
<419=Automation(Error)(14.12.20 12:23:16.013):    Exception fire by :
<419=Automation(Error)                       :    Exception info:The handle is invalid.

<419=Automation(Error)                       :    Exception code:0
<419=Automation                       :    Result: STRING ""
(166472/160672 KB)
*************** data to server ***************
(14.12.20 12:23:16.028)

Thank you and best regards.

Pawel

former_member413959
Participant
0 Kudos

Hi, I am facing the same problem. did you solve it ?

richard_silhan2
Discoverer
0 Kudos

Hi Pawel,

were you able to solve the problem? If so please share how.

Kind regards

Richard

despet
Explorer
0 Kudos

Hi Richard,

solution, that worked for me I've mentioned above in the post. Issue was solved by adding two additional parameters: codepage and write_bom to FM GUI_DOWNLOAD.

BR

Pawel

Answers (1)

Answers (1)

jude_bradley
Advisor
Advisor

Get an automation trace as per note Automation: How do I create an automation trace?