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 Errors

Former Member
0 Likes
611

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

3 REPLIES 3
Read only

Former Member
0 Likes
569

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.

Read only

0 Likes
569

Hi Nikhat,

I am not getting as what i have to do to rectify this error.

Can u explain in detail?

Regards,

Rahul

Read only

Former Member
0 Likes
569

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