‎2009 May 22 8:34 AM
Hi ABAPpers,
I am getting following Unicode errors.
1. "CPREL" must be a character-type data object (data type C, N, D, T or STRING).
field string).
for
tabix1 = strlen( cprel ).
Here cprel is a structure defined as
DATA: BEGIN OF cprel OCCURS 5000.
INCLUDE STRUCTURE pcl1.
DATA: sgart(2),
pernr LIKE pernr-pernr,
END OF cprel.
Please rectify.
Regards,
Rahul
‎2009 May 22 8:50 AM
hi
You can find out the length of a single data object and not of the structure.
Error is in : tabix1 = strlen(cprel).
In place of cprel, you will have to use a data object.
Hope you found out the solution to your problem.
‎2009 May 22 10:00 AM
Hi Nikhat,
I am not getting as what i have to do to rectify this error.
Can u explain in detail?
Regards,
Rahul
‎2009 May 22 9:05 AM
Hi Rahul,
Make sure that the datatypes of the structure fields are of the type C, N, D, T or String. The assignment to check the length of the fields in the structure will work if the fields are character-type. In this case the character type values are concatenated and length can be returned, but if we have a non-character type fields this will result in error .
Regards,
George