07-20-2017 10:19 AM
Hi experts,
while transfering a file data from application server to .txt file for few materials text having specific characters like '?' as it is russian language, we are getting code page dump.Below is the code which we are using
OPEN DATASET lv_file FOR output IN legacy text mode code page '1504'
WITH native LINEFEED .
Could you please anyone help on this ..thanks in advance
Regards,
kranthi kumar
07-24-2017 6:17 AM
Hello!
Converting between codepages is always a little bit tricky. For character-replacement you could use SAP function module "SCP_REPLACE_STRANGE_CHARS" before you write the text file. If you know the "problematic" character(s) you also can use simple TRANSLATE - statement.
Regards
07-24-2017 7:06 AM
I guess the short dump is on the TRANSFER statement, and not on the OPEN DATASET.
It's what happens if you try to write characters to a given code page (1504) where some of those characters don't exist in this code page. Remember that in a SAP Unicode system (code page 4102 or 4103), there are about 100.000 characters, while in old code pages (1504, ASCII, and so on), there are a maximum of 256 characters.
To avoid this situation, you must define a REPLACEMENT CHARACTER in the OPEN DATASET statement. Please refer to the ABAP documentation of OPEN DATASET.