‎2007 Apr 19 5:08 AM
Hi experts
is there any function module or procedre to convert a string with special characters to character format. Urgent issue. plz let me know the solution.
Thanks and regards,
alson
‎2007 Apr 19 5:10 AM
Hi,
Just declare one char field of length 500 and assign to that
data : v_str type string value 'aggf%@kkfak*',
v_char(500).
v_char = v_str.
write v_char.
‎2007 Apr 19 5:18 AM
alson,
You mean to say you want to remove special charectors form string or what?
If yesy...
REPORT ZTEST11 .
DATA : v_str type String,
V_len type i,
v_num type i,
V_TOT(60),
V_NUM2 TYPE I.
PARAMETERS : P_ID(30).
start-of-selection.
v_len = strlen( P_ID ).
v_tot = sy-abcde.
v_num = v_num + 1.
do V_LEN TIMES.
if P_ID+V_NUM2(v_num) na v_tot.
REPLACE P_ID+V_NUM2(v_num) WITH space INTO p_id.
endif.
v_num2 = v_num2 + 1.
enddo.
CONDENSE P_ID NO-GAPS.
write P_ID.
Don't forget ot reward if useful...
‎2007 Apr 19 5:28 AM