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

Syntax Check Error

Former Member
0 Likes
509

I am having a syntax check problem in my program.

Code for the same,

constants: c_tab type x value '09'.      "tab character!!!
 field-symbols: <f_separator>.

assign c_tab to <f_separator> type 'C'.

The Error is ,

The length of "C_TAB" in bytes must be a multiple of the size of a Unicode character (regardless of the size of the Unicode character).

1 ACCEPTED SOLUTION
Read only

former_member182670
Contributor
0 Likes
485

Use

CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

in Unicode systems

3 REPLIES 3
Read only

former_member182670
Contributor
0 Likes
486

Use

CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

in Unicode systems

Read only

0 Likes
485

can you please elaborate about the correction.

Are you suggesting to change the declaration.

Raju.

Read only

0 Likes
485

Will try to explain what Tomasz what advicing you:

Current Declaration:

>constants: c_tab type x value '09'. "tab character!!!

In Unicode enabled systems or Unicode Check active programs, we have few stricter syntax checks which result if errors compared to earlier mechanisms.

So for above declaration, you can define the same as a character field as below:

Change to:

>constants: c_tab type C value cl_abap_char_utilities=>horizontal_tab.

Now you can use the same. Value of both definitions is same.

Regards

Eswar