Function Download a table as a .csv file
Example  <button  type="button"
         
class="toolbarbutton"
          onclick="S10DownloadTable(document.getElementById('orders'));">
    Download
</button>
Parameters
Nr Description
1
HTML element of the table
(<form class='table' ..>)
2
Column separator
For example "," or ";" or "\t".
If not specified, an element with the id "DownloadTableColumnDelimiter" is searched for in the HTML document and its value is taken. In this way, the column separator can also be set from ABAP. If this element is still found, a semicolon is used as the column separator.
Description  The function is called internally by the S10 Framework when the download icon in the expanded table filter is clicked.

You can also use the function yourself and, for example, not display a table with <form class='table' ... style='display:none'> to the user, but only offer the download.
Components S10 Framework