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 for write

Former Member
0 Likes
1,046

Hi,

I get the following unicode error for write statement.

"YMTIL_CONS_MTMS0" cannot be converted to a character-type field.

here YMTIL_CONS_MTMS0 is a custom table and

TABLES

*" Y_Z0SDS STRUCTURE Z0SDS ( declared in the function module)

WRITE YMTIL_CONS_MTMS0 TO Y_Z0SDS-IFOD.

Any help please?

Regards

Sachin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,008

Hi,

the problem is, that you try to move a table to a field.

That can´t go.

try this:

move-corresponding YMTIL_CONS_MTMS0 TO Y_Z0SDS.

regards

Nicole

7 REPLIES 7
Read only

Former Member
0 Likes
1,009

Hi,

the problem is, that you try to move a table to a field.

That can´t go.

try this:

move-corresponding YMTIL_CONS_MTMS0 TO Y_Z0SDS.

regards

Nicole

Read only

Former Member
0 Likes
1,008

Hi,

I hope Y_Z0SDS-IFOD is of CHAR type.

All fileds of Custom Table YMTIL_CONS_MTMS0 should be of type C,N,D or T, else below statement is invalid in Unicode environment.

Post the structure of table YMTIL_CONS_MTMS0 to have solution.

Regards,

Satya

Read only

0 Likes
1,008

the field IFOD is of type LCHR 2048 0.

What is the alternative method to use, if write to cannot be used in that way?

Regds

Sachin

Read only

0 Likes
1,008

try: Y_Z0SDS-IFOD = name of your structure.

But this can only work if the whole structure has character types (C,N,D,T and string).

Read only

Sm1tje
Active Contributor
0 Likes
1,008

In Unicode programs it is advised to do these kind of actions per component.

In unicode programs you must take into account the difference between character types and byte types. Therefore you can not just move the entire structure to a single field.

Read only

Former Member
0 Likes
1,008

Hi,

Try Using READ container and FILL Container method of Class

CL_ABAP_CONTAINER_UTILITIES

Reward if Helpful,

Gaurav J.

Read only

Former Member
0 Likes
1,008

hi,

first move entire structure using move-corresponding

and write the structure .that solves ur problem