There are several use cases when you need to convert SOLIX table to XSTRING. For example, when you are using sap gateway for downloading files from SAP office, you will need to use conversion from solix to xstring.
You can use method cl_bcs_convert=>solix_to_xstring or FM SCMS_BINARY_TO_XSTRING for this conversion.
Now, the issue: SOLIX is a table of RAW 255, that means every line of this table has 255 raw bytes. When you don't specify output length of XSTRING variable, empty raw bytes from the last line are converted as well which means that you will supply corrupted file. It is be readable in most cases, but for example Microsoft Word will show warning message that the file is corrupted, though it can be opened afterwards.
Solution is to set number of bytes that needs to be converted (actual file size, not lines of table multiplied by size of line) as can be seen in following example:
lt_file TYPE solix_tab,
lv_length TYPE i,
ls_doc_data TYPE sofolenti1.