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: 

Read Dataset encoding problem on unicode programs

kadir_ozgur
Explorer
0 Kudos
273

Dear all,

I have a file handling problem on ECC 6.04 upgrade from ECC 5.00. The 'Read Dataset' statements on 6.04 system are not working which are working properly on 5.00 system. I need to read text files. The packed numbers on these files are coming as #. When I check them on AL11 transaction I see them # again. When I debug the programs on non-unicode(5.00) system, I saw that the packed numbers are coming as # again but when I assign them to a variable which type is packed, they became 1.500 for example. I need to use character type variables on unicode(6.04) system, otherwise I get syntax error. Thats why I could not use a packed number to convert # character to real numbers. I have tried all Read Dataset additions(legacy, code pages, non-unicode, utf-8 etc.) but every time I got dump on assigning # variables to a character field. I think I need to get values from file as real numbers like 1.500. I tried the same programs with a unicode converted files but still not working. I need to see the file content as real numbers I think, or find a way to convert these # characters to a numbers wtihout getting dump.

All suggestions will be welcomed.

Thanks.

3 REPLIES 3

Former Member
0 Kudos
73

Can u tell whats the code you have written.

Also tell me one line of data in your file.

0 Kudos
73

open dataset file for input in text mode encoding non-unicode message mess.

The code above is an example that I have used. I already used 'encoding utf-8, default' and 'legacy text mode' also.

K1056-15 and #####P# is an example line of my file.

K1056-15 is type afpo-aufnr

######P# is type mbew-lbkum.

I can get the afpo-aufnr type value correctly but mbew-lbkum type value come as ######P# and I can not assign this value to another structure or internal table field which has type mbew-lbkum. I got syntax error when I try that. But in non-unicode systems, when I assign value '######P#' to a field that has type mbew-lbkum, #####P# transforms to 1.500.

Thanks for your help Manjunath.

0 Kudos
73

Sorry, i am not very sure what your issue is.

On your SAP Logon PAD , click on Change Item --> Go to Code Page tab

Check the Encoding details over there : try using 'DEFAULT - ANSI for UNICODE system'

see if this works