on 03-22-2010 3:02 PM
Hello community,
we're facing not allowed special characters in a unicode-BI 7.0 when extracting data via 0FI_GL_4. In the "freetext"-fields (e.g. reference key). Especially we face carriage return/line feed encoded as a square-symbol.
How could we filter this symbol out as we could not copy and paste it to a formula rule in the transformation.
Any ideas?
manuel
use this FM in your field routine. This will solve your problem.
SCP_REPLACE_STRANGE_CHARS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manuel,
The following code should replace any char that has an ascii value < 32 with a ' ' (space).
Obviously please test this code and ensure it meets your requirements before implementing.
Regards, Robin
data: lv_length LIKE sy-index,
lv_index TYPE sy-index,
lv_decnum TYPE i,
lv_char(1) TYPE c,
lv_vstr(60) TYPE c. "character string to validate
FIELD-SYMBOLS: <n> TYPE x.
lv_vstr = 'string to valid'.
* Obtain length of character string
lv_length = STRLEN( lv_vstr ).
* For each character in the string, perform the validation
DO lv_length TIMES.
lv_index = sy-index - 1.
lv_char = lv_vstr+lv_index(1).
ASSIGN lv_char TO <n> CASTING.
MOVE <n> TO lv_decnum.
IF lv_decnum < 32.
lv_vstr+lv_index(1) = ' '.
ENDIF.
ENDDO.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.