2020 May 07 6:27 PM
Hi All,
I have a requirement that we need to save a CSV file into the application server in SAP 4.6c.
*This is for 4.6c so I don't have the encoding statement.
Below part of the code:
OPEN DATASET filepath FOR OUTPUT IN TEXT MODE.
LOOP AT lt_csv INTO ls_csv.
TRANSFER ls_csv2 to filepath.
ENDLOOP.
CLOSE DATASET filepath.
Every time I download this file the encoding is ANSI instead of UTF-8.
When I run the same program but for example, the company code is for USA the encoding automatically is UTF-8 instead of ANSI.
This change only happens for European/DACH company codes.
Thanks,
2020 May 07 7:00 PM
UTF-8 is code page 4110. Do you have it in transaction code SCP?
If yes then use:
OPEN DATASET filepath FOR OUTPUT IN BINARY MODE CODE PAGE '4110'.
(in TEXT MODE is also possible in 4.6C because characters and bytes could be used interchangeably; I think your 4.6C system is not a Unicode system, right? -is it even possible-)
Concerning the company codes/countries, you don't explain what you exactly do, and how you verify that it's UTF-8 instead of ANSI (because both are identical in old systems). Each character being non-Unicode, is encoded in one byte (you're talking about USA/Europe so I think you don't talk about CJK/DBCS), so there are 256 possible characters, the 128 first characters are identical to the 128 first characters of UTF-8, characters after 128 are rare in US ASCII (ANSI), but more frequent in Europe for encoding accentuated characters.
2020 May 07 8:12 PM
46C. Not in support.
Have you considered upgrading?
2020 May 08 1:02 AM
What is the name of the program that works fine for USA but not for Europe ?
How do you download the file from the application server (AL11) ?