There are different ways in creating a CSV file. The right way is to use the function SAP_CONVERT_TO_CSV_FORMAT. You can just go through the function, everything is clear. To complete, for every convert function there is an equal and opposite convert function, so is TEXT_CONVERT_CSV_TO_SAP.
Otherwise, you can create an internal table with one char field of size as required and try to concatenate all values with the required delimiters and so put into this internal table and download this table.
But the right way is to use the function. Hope this could help you. Take care.