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

Problem with type X variable in ECC 6 version

Former Member
0 Likes
489

Hi All,

Curretly i am working with ECC6.0 version and getting some syntax errors when i copy an existing program from version 4.6C. The problem is like in 4.6C version i am declaring a variable DATA:c_tab TYPE x VALUE '09' for tab delimit and using in CONCATENATE statement like

CONCATENATE field1 c_tab

field2 c_tab

-


-


into v_line1.

But when i am using the same in ECC6 then getting syntax error like

"C_TAB" must be a character-type data object (data type C, N, D, T or STRING).

Could you please do help on this.

Cheers,

Bujji.

3 REPLIES 3
Read only

Former Member
0 Likes
446

well the concatenate statement works only for character type data-types.

make a character variable and put in your value to it. thne use the char field in your concantenate.

Read only

Clemenss
Active Contributor
0 Likes
446

Hi Bujji,

in ECC6.0 you should use the prededined attributes of class CL_ABAP_CHAR_UTILITIES.

You can concatenate ... CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB ... INTO ....

I think you won't need anything else except

CL_ABAP_CHAR_UTILITIES=>NEWLINE

CL_ABAP_CHAR_UTILITIES=>VERTICAL_TAB

CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

CL_ABAP_CHAR_UTILITIES=>FORM_FEED

CL_ABAP_CHAR_UTILITIES=>CR_LF

These atrributes will have the correct character size according to your system. Note:

ECC6.0 runs with unicode, in unicode the characters are represented by two bytes.

CONCATENATE in ECC6.0 wotks with characters only.

Regards,

Clemens

Read only

Former Member
0 Likes
446

Hi Bujji,

As ECC 6.0 is Unicode compatible, you are getting the error. you can execute the program by disabling the unicode check.

In Abap editor menu bar

GOTO -> Atributes -> uncheck the unicode checks active.

This will help you in getting the desired output.