‎2006 Dec 04 6:57 AM
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
‎2006 Dec 04 7:08 AM
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
‎2006 Dec 04 7:13 AM
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.
‎2006 Dec 04 7:16 AM
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.
‎2006 Dec 04 7:37 AM
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.