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: 

Unicode Error - Read/Transfer dataset - Issue with decimal data type

Former Member
0 Kudos
205

Hi All,

I am getting an unicode error when using 'Read dataset' or 'Transfer dataset' statements if the field referred from the table has decimal data type.

Is it so that we have to type cast it in the ECC 6.0 version?

Could anybody pls help resolving this error?

Thanks in Advance,

Sushmitha

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos
90

Hi,

Can you give more details about your data types that your are moving values?

In Unicode while moving values the data type of variables are mutually convertable.

aRs

7 REPLIES 7

amit_khare
Active Contributor
0 Kudos
90

Welcome to SDN.

May be thi link will provide some help -

Regards,

Amit

Reward all helpful replies.

former_member194669
Active Contributor
0 Kudos
90

Hi,

use


open dataset fnam for input in legacy text mode code page '1100'.

aRs

0 Kudos
90

Hi,

Thanks for your reply.

But, still I have some problem.

Can we move values between 2 fields having different data types?

Thanks in advance.

Sushmitha

former_member194669
Active Contributor
0 Kudos
91

Hi,

Can you give more details about your data types that your are moving values?

In Unicode while moving values the data type of variables are mutually convertable.

aRs

0 Kudos
90

Hi,

I have two internal tables.One has similar structure to that of Std SAP table and a field in that has decimal data type according to the std defined.

I have to move this value to my internal table in which I have type casted the field having decimal datatype into char data type as decimal type is not supported in Unicode...

Again, I have to move the values in the internal table to another internal table having similar structure to that of std SAP table.

Will it work?

Thanks in advance,

Sushmitha

0 Kudos
90

Hi Sushmitha,

moving decimal (packed) values to CHAR field always works. Take care that the CHAR field is long enough so that value does not get truncated.

The way back from CHAR to decimal field works if the numbers are in numeric format. You can try with


TRY.
  <decimalfield> = <charfield>..
CATCH cx_sy_conversion_no_number CONVT_OVERFLOW.
ENDTRY.

Regards,

Clemens

0 Kudos
90

Thanks a lot.......