‎2008 Sep 10 11:32 AM
hi
in unicode system type x variables are giving syntax error: i have found replacements for few type x variable with value 09, 7c, od etc.. but i couldnt find replacements for the following
GCX_INTRO TYPE X VALUE '0D', " Enter
GCX_CR TYPE X VALUE '10', " Carriage return
GCX_VALIDATE(6) TYPE X VALUE '090D273B7C10'. " Invalid chars for field
kindly provide me with solutions
regards
mano
‎2008 Sep 10 11:37 AM
type x is binary data and vlaues enclosed in apostrophes are string or chars.
use the constants declared in CL_ABAP_CHAR_UTILITIES eg:
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
GCX_INTRO = CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
‎2008 Sep 10 11:56 AM
Hi,
CONSTANTS:
con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*"If you have Unicode check active in program attributes then declare *"constants as follows
CLASS cl_abap_char_utilities DEFINITION LOAD.
CONSTANTS:
con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
" Carriage Return and Line Feed
con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab, " tab
" Horizontal Tab Stop
Regards
Adil