hi Gurus,
i have a question:
wich one is best to eliminate invalid characters when loading :
1)using a routine in transfer rules
2)using a routine in update rules
also i have found those two piece of code in the forum:
1)
DATA: l_d_length like sy-index,
l_d_char type c,
l_d_index type sy-index.
l_d_length = strlen( RESULT ).
RESULT = COMM_STRUCTURE-/BIC/ZTXTSH.
DO l_d_length times.
l_d_index = sy-index - 1.
l_d_char = RESULT+l_d_index(1).
CALL FUNCTION 'RSKC_CHAVL_OF_IOBJ_CHECK'
IMPORTING
I_CHAVL = l_d_char
I_IOBJNM = 'ZTXTSH'
*" I_S_COB_PRO =
*" I_T_COB_PRO_CMP =
EXCEPTIONS
CHAVL_NOT_ALLOWED = 1.
IF SY-SUBRC 0.
RESULT+l_d_index(1) = ' '.
ENDIF.
ENDDO.
2)
data: g_allowed_char(200) type c.
if g_allowed_char is initial.
call function 'RSKC_ALLOWED_CHAR_GET'
IMPORTING
e_allowed_char = g_allowed_char.
endif.
result = COMM_STRUCTURE-/BIC/ZTXTSH.
check g_allowed_char ne 'ALL_CAPITAL'.
do.
if not result co g_allowed_char.
result+sy-fdpos(1) = space.
else.
exit.
endif.
enddo.
wich one is best ?
thank you.