2008 May 06 9:49 AM
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
2008 May 06 9:52 AM
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
2008 May 06 9:52 AM
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
2008 May 06 9:54 AM
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
2008 May 06 10:06 AM
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
2008 May 06 10:10 AM
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).
2008 May 06 9:55 AM
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.
2008 May 06 10:15 AM
Hi,
Try Using READ container and FILL Container method of Class
CL_ABAP_CONTAINER_UTILITIES
Reward if Helpful,
Gaurav J.
2008 May 06 10:16 AM
hi,
first move entire structure using move-corresponding
and write the structure .that solves ur problem