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: 

CONTROL_FLUSH_ERROR when using 'GUI_DOWNLOAD' Function Module in foreground

Former Member
0 Kudos

Hello,

I am using function module 'GUI_DOWNLOAD' in foreground mode with APPEND = 'X' ( I need to add Header details to file ).

In most of the cases it works good but in some cases ( which I cannot isolate ) - I am getting CONTROL_FLUSH_ERROR exception. Do you have any ideas where can be the problem?

Thanks,

Balu B

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Balu,

Check out this thread

https://forums.sdn.sap.com/click.jspa?searchID=875715&messageID=2952760

You will get "CONTROL_FLUSH_ERROR " error when there is some problem with SAP GUI. Check your Gui installation and if possible uninstall the exixting GUI and reinstall the new GUI from fresh.

or use

or use

   CALL METHOD cl_gui_frontend_services=>gui_download

      EXPORTING

        bin_filesize = l_xml_size

        filename     = 'c:tempflights.xml'

        filetype     = 'BIN'

      CHANGING

        data_tab     = l_xml_table

      EXCEPTIONS

        OTHERS       = 24.

    IF sy-subrc <> 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

4 REPLIES 4

Former Member
0 Kudos

Hi Balu,

Check out this thread

https://forums.sdn.sap.com/click.jspa?searchID=875715&messageID=2952760

You will get "CONTROL_FLUSH_ERROR " error when there is some problem with SAP GUI. Check your Gui installation and if possible uninstall the exixting GUI and reinstall the new GUI from fresh.

or use

or use

   CALL METHOD cl_gui_frontend_services=>gui_download

      EXPORTING

        bin_filesize = l_xml_size

        filename     = 'c:tempflights.xml'

        filetype     = 'BIN'

      CHANGING

        data_tab     = l_xml_table

      EXCEPTIONS

        OTHERS       = 24.

    IF sy-subrc <> 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

0 Kudos

Thanks Osman Pasha, you are rt but for file type = ASC with  field separator it is giving the error like 'Error in control frame work'..

As you mentioned it might be the SAP GUI issue..

Thanks,

Balu B

0 Kudos

Balu Try to remove Append = 'X'. may be your problem will get solve.try it.

Former Member
0 Kudos

Thanks Osman, As you said if i remove the Append = 'X' i am not getting the header details in the file .

Actually in my case i am using the FM GUI_Download  for Header first and  then using the same FM for data in that case i need to append both Header and data in the same file..

As i observed that the only way we can use FM (GUI_DOWNLOAD) for header and data  without passing Append = 'x'.

Thanks,

Balu