Application Development and Automation 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 only

Open dataset with packed fields in a file - Unicode

Former Member
0 Likes
780

Hi

I am working on a upgrade project 4.7 to ECC6. There are programs importing files with packed fields. How do you manage open files with fields of type p. I read an SAP Note 65050 on this and they say - Don't go this route. The problem is we inherited this and are trying to solve it. Any tried and tested solutions?

Regards

Marius

1 ACCEPTED SOLUTION
Read only

hendrik_brandes
Contributor
0 Likes
719

Hello Marius,

try to convert your input file into unicode using the class CL_ABAP_CONV_IN_CE.

In my case, I had to read codepage ISO-8859-1 into utf-8. Within 7.30 there is another class CL_ABAP_CODEPAGE, which helps you, to perform those operations.

I would suggest, to read the values first, convert the string into the internal format and then convert it into my final destination structure.

Kind regards,

Hendrik

Hi

I am working on a upgrade project 4.7 to ECC6. There are programs importing files with packed fields. How do you manage open files with fields of type p. I read an SAP Note 65050 on this and they say - Don't go this route. The problem is we inherited this and are trying to solve it. Any tried and tested solutions?

Regards

Marius

3 REPLIES 3
Read only

hendrik_brandes
Contributor
0 Likes
720

Hello Marius,

try to convert your input file into unicode using the class CL_ABAP_CONV_IN_CE.

In my case, I had to read codepage ISO-8859-1 into utf-8. Within 7.30 there is another class CL_ABAP_CODEPAGE, which helps you, to perform those operations.

I would suggest, to read the values first, convert the string into the internal format and then convert it into my final destination structure.

Kind regards,

Hendrik

Read only

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Likes
719

Hi Marius,

in an upload of a file into a Unicode system you need to change the fields of type "packed" to fields of type "char" or "numchar".

Please also have a look at: http://scn.sap.com/thread/832616

Best regards,

Nils Buerckel

Read only

Former Member
0 Likes
719

Hi All

I manged to open the dataset with the following - It can be helpful to other members.

open dataset

fli for input in legacy text mode ignoring conversion errors

.