‎2010 Nov 08 3:04 AM
Dear Expert,
I used OPEN DATASET to output data to file from SAP.
But the default encoding is UTF-8.
Is there any way i can convert the encoding to ANSI?
Regards
Here is part of my code below:
OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT gt_dfiebw.
CONCATENATE
gt_dfiebw-acc1
gt_dfiebw-acc2
gt_dfiebw-acc3
gt_dfiebw-vendor
gt_dfiebw-invre
gt_dfiebw-pdat
gt_dfiebw-curcy
gt_dfiebw-payat
gt_dfiebw-descp
gt_dfiebw-fax
gt_dfiebw-addr1
l_addr3 INTO o_string SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
TRANSFER o_string TO file.
ENDLOOP.
CLOSE DATASET file.
‎2010 Nov 08 3:10 AM
Hello,
What exactly do you mean by "encoding to ANSI"?
BR,
Suhas
‎2010 Nov 12 6:03 AM
Thanks.
I changed MODE ENCODING DEFAULT. to MODE ENCODING non-unicode.
then the encoding changed to ANSI.
‎2010 Nov 12 6:19 AM
Hi Lee,
Try this fm CALL FUNCTION 'EPS_OPEN_OUTPUT_FILE'
It has a text mode flag
I am not very clear of your requirement .
‎2010 Nov 12 8:14 AM
Hi Lee,
You can have a look into this module also
CONVERT_ITF_TO_ASCII
Thanks