Cl_gui_frontend_services= Gui_download __exclusive__ Append File
The following snippet demonstrates how to append data to a local .txt file:
DATA: lt_data TYPE TABLE OF string, lv_file TYPE string VALUE 'C:\temp\output.txt'. APPEND 'New record to append' TO lt_data. CALL METHOD cl_gui_frontend_services=>gui_download EXPORTING filename = lv_file filetype = 'ASC' " ASCII mode for text files append = 'X' " Enable append mode CHANGING data_tab = lt_data EXCEPTIONS file_write_error = 1 others = 2. Use code with caution. Critical Technical Considerations Append = 'X' issue in GUI_DOWNLOAD... - SAP Community cl_gui_frontend_services= gui_download append
The system creates a new file. If a file with the same name already exists, it is overwritten (unless CONFIRM_OVERWRITE is set). The following snippet demonstrates how to append data
When calling cl_gui_frontend_services=>gui_download , the APPEND parameter accepts a character value (typically 'X' or space ). Use code with caution
Download the header internal table with APPEND = space to create/clear the file.