2008 Feb 18 8:02 PM
I am facing an problem when I check the unicode on in the attributes of the program.
The error is,
"C_TAB_CHAR" must be a character-type data object (data type C, N, D, T or STRING) .
code for the error,
DATA: BEGIN OF ht,
x(1) TYPE x VALUE '09',
END OF ht.
SPLIT fieldy AT ht INTO
itab1x-condition_id
itab1x-change_date.Any Suggestions,
Raju
2008 Feb 18 8:33 PM
Hi,
Please check the constant C_TAB_CHAR whether it is Character type or Not. If it is not declare that as character type.
If you are splitting the data, then all the variables should be declared as character types or string.
Regards
Kannaiah
2008 Feb 18 8:33 PM
Hi,
Please check the constant C_TAB_CHAR whether it is Character type or Not. If it is not declare that as character type.
If you are splitting the data, then all the variables should be declared as character types or string.
Regards
Kannaiah
2008 Feb 18 8:39 PM
Thanks for the reply,
I guess I had posted the wrong error message,
The error message is,
"HT" must be a character-type data object (data type C, N, D, T or string,
and the declearation and code is,
DATA: BEGIN OF ht,
x(1) TYPE x VALUE '09',
END OF ht.
SPLIT fieldy AT ht INTO
itab1x-condition_id
itab1x-change_date.Thanks,
Raju
2008 Feb 18 8:46 PM
Try this way.
split fieldy at cl_abap_char_utilities=>horizontal_tab into itab1x-condition_id itab1x-change_date.
a®
2008 Feb 18 9:02 PM
Hi Raju,
You are getting a error because of the TYPE X u are using.
Using CL_ABAP_CHAR_UTILITIES->HORIZONTAL_TAB makes your variable of type C.
try Mandeep's solution, it should work.
Even ARS's solution is correct.
Cheers
~goldie.
2008 Feb 18 9:07 PM
Or:
SPLIT fieldy AT ht-x INTO "<====
itab1x-condition_id
itab1x-change_date.
Rob
2008 Feb 18 9:10 PM
Thanks Rob,
I have tried the way you have specified and the error message is
"HT-X" must be a character-type data object (data type C, N, D, T or string.
DATA: BEGIN OF ht,
x(1) TYPE x VALUE '09',
END OF ht.
SPLIT fieldy AT ht-x INTO
itab1x-condition_id
itab1x-change_date.
I am facing this problem after I made the program Unicode enable.
Raju.
2008 Feb 18 8:35 PM
use this code :
class CL_ABAP_CHAR_UTILITIES definition load.
DATA: BEGIN OF ht,
x(1) TYPE x VALUE '09',
x(1) type c value CL_ABAP_CHAR_UTILITIES->HORIZONTAL_TAB,
END OF ht.
horizontal_tab is equivalent to 09 in hexa.
In commands like split, concatenate u can't use type x values
in unicode enabled program..
rest of code remain same.
With regards
Mandeep