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 syntax error

Former Member
0 Likes
751

Hi all,

i am getting a syntax error after activating the Unicode attribute of 1 program.

The error says - "Table KEN3 must have a character line type ( C, N, D, T or string).

The code extract is -

SEARCH ken3 FOR seek.

Variable seek is of type dd03l-fieldname and KEN3 is an int tab containing data.

Please let me know the fix for this error.

Points guaranteed...

Amogh

4 REPLIES 4
Read only

Former Member
0 Likes
695

Hi Amogh,

The SEARCH keyword for character operations only.you can convert ken3 Integer to Character by using Standrad FM's.

<b>CONVERT_STRING_TO_INTEGER</b>

I hope the above FM will works for you.

Regards

Bhupal Reddy

Read only

Former Member
0 Likes
695

Hello Amogh,

It owuld be immensely helpful to resolve this problem if you specify the data declaration for the internal table KEN3.

Regards,

Anand Mandalika.

Read only

Former Member
0 Likes
695

Hi,

Thank u for looking into the issue..

The data declaration for KEN3 is -

DATA: BEGIN OF ken3 OCCURS 10.

INCLUDE STRUCTURE mhk.

DATA: name1 LIKE lfa1-name1.

DATA: line .

DATA: stat .

DATA: zjda11 LIKE zmjmhk-zjda1.

DATA: zjda22 LIKE zmjmhk-zjda2.

DATA: zjda33 LIKE zmjmhk-zjda3.

DATA: zjda44 LIKE zmjmhk-zjda4.

DATA: zjda55 LIKE zmjmhk-zjda5.

DATA: zjda66 LIKE zmjmhk-zjda6.

DATA: zjqt12 LIKE zmjmhk-zjqt2.

DATA: zjtx11 LIKE zmjmhk-zjtx1.

DATA: zjflgx LIKE zmjmhk-zjflg.

DATA: cha6(6) TYPE c.

DATA: seq(10) TYPE n.

DATA: END OF ken3.

plz check if u get any solution.

Read only

0 Likes
695

Hello Amogh,

If your internal table contains fields with the data types other than C , N , D , T or X, you will get this error.

For example, the following code will give you the same error -

DATA : BEGIN OF ITAB OCCURS 0,
ABC TYPE I ,
XYZ TYPE STRING,
END OF ITAB.

SEARCH ITAB[] FOR 'TEST'.

To avoid this, you should create a structure with just character types.

Something like this -

DATA : BEGIN OF ITAB OCCURS 0,
ABC(8) TYPE N ,
XYZ TYPE STRING,
END OF ITAB.

SEARCH ITAB[] FOR 'TEST'.

Notice that, instead of an integer in the first declaration, I have created a numeric type of length 8. That is because "N" is a character based data-type.

Hope this is clear. If not, revert back.

Regards,

Anand Mandalika.