2023 Apr 25 2:49 AM
LR_CONVERTER = CL_RSDA_CSV_CONVERTER=>CREATE(
I_DELIMITER = SPACE
I_SEPARATOR = CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB ).
LR_LINE = CL_RSDA_CSV_CONVERTER=>GET_CHAR_WORKAREA( <L_S_DATA> ).
ASSIGN LR_LINE->* TO <L_LINE>.
CLEAR L_ITEMS.
LR_CONVERTER->STRUCTURE_TO_CSV( EXPORTING I_S_DATA = <L_S_DATA>
IMPORTING E_DATA = <L_LINE> ).
In this case, the content of <L_LINE> is
" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "#" "
and double quotes.
What should I set to I_DELIMITER to convert without double quotes?
2023 Apr 25 9:46 AM
Beware the <BR> in your post.
Your code better formatted:
LR_CONVERTER = CL_RSDA_CSV_CONVERTER=>CREATE(
I_DELIMITER = SPACE
I_SEPARATOR = CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB ).
LR_LINE = CL_RSDA_CSV_CONVERTER=>GET_CHAR_WORKAREA( <L_S_DATA> ).
ASSIGN LR_LINE->* TO <L_LINE>.
CLEAR L_ITEMS.
LR_CONVERTER->STRUCTURE_TO_CSV( EXPORTING I_S_DATA = <L_S_DATA>
IMPORTING E_DATA = <L_LINE> ).
2023 Apr 26 11:41 AM
Run the program in debug. When you get to the CREATE method, that calls the constructor. In the constructor you'll see that if i_delimiter is initial (i.e. space), then the default delimiter " is used instead.
It looks like you're trying to create tab delimited output. The CL_RSDA_CSV_CONVERTER class is used to create CSV files, and you can't use space as a delimiter.