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

Unicode error in type conversion

Former Member
0 Likes
1,721

Hi all,

In ECC6.0 while running uccheck for my program i get an error "internal table cannot be converted to a character type field".

The internal table declaration has fields with data types Quantity and Unit.Unicode supports on C,N,D,T and string data types.

Can you tell me how the data types like quantity,unit,FLTP,Xstring etc be used in unicode environment.

5 REPLIES 5
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,031

Hello,

You get this type of error when you directly assign values (e.g., WRITE: workarea or workarea2 = workarea1 etc). In Unicode systems CHAR & NUMC values are interconvertible, but for TYPE p, n, d & t you have to do individual assignment.

Can you please elaborate at which point you are getting this error?

BR,

Suhas

Read only

Former Member
0 Likes
1,031

the error is at the following statement :

MODIFY LINE l1 INDEX G_LISTI

FIELD VALUE itab1.

itab1 is of following structure :

begin of itab1

some fields with character data type

some fields with numc data type

2 fields with quantity data type

1 field with unit data type

end of itab1.

the error is : itab1 cannot be converted to a character type field.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,031

Hello,

You are getting this error because of the quantity fields in the structure. If you don an F1 on this statement you can see that with FIELD VALUE you have to give character-type fields only.

Either you can explicitly mention the fields or try to move the quantity fields to some character variables and try.

BR,

Suhas

Read only

Former Member
0 Likes
1,031

so whenever i have quantity field can i convert it to character data type or is there any standard class or function modules available for data type conversion in unicode

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,031

Hello,

There is no need of any FM or Class for this purpose. You can use MOVE or WRITE TO stmt for this.

BR,

Suhas