Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

program goes on Dump for Code page 4102 to Code page 1504

Former Member
0 Kudos

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

2 REPLIES 2

gm140784
Member
0 Kudos

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

Sandra_Rossi
Active Contributor
0 Kudos

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.