function zbw_eliminate_invalid_chars.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_VALUE)
*" REFERENCE(I_INFOOBJECT) TYPE RSD_IOBJNM
*" EXPORTING
*" REFERENCE(O_VALUE)
*"----------------------------------------------------------------------
data:
length type i,
index type i,
current_char type c,
result(60) type c,
infoobject type rsd_iobjnm.
clear: result, infoobject.
move i_value to result.
move i_infoobject to infoobject.
translate result to upper case.
length = strlen( result ).
index = -1.
do length times.
index = index + 1.
current_char = result+index(1).
call function 'RSKC_CHAVL_OF_IOBJ_CHECK'
exporting
i_chavl = current_char
i_iobjnm = infoobject
* I_S_COB_PRO =
* I_T_COB_PRO_CMP =
exceptions
chavl_not_allowed = 1.
if sy-subrc <> 0.
move ' ' to result+index(1).
endif.
enddo.
move result to o_value.
endfunction.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_VALUE)
*" REFERENCE(I_INFOOBJECT) TYPE RSD_IOBJNM
*" EXPORTING
*" REFERENCE(O_VALUE)
*"----------------------------------------------------------------------
data:
length type i,
index type i,
current_char type c,
result(60) type c,
infoobject type rsd_iobjnm.
clear: result, infoobject.
move i_value to result.
move i_infoobject to infoobject.
translate result to upper case.
length = strlen( result ).
index = -1.
do length times.
index = index + 1.
current_char = result+index(1).
call function 'RSKC_CHAVL_OF_IOBJ_CHECK'
exporting
i_chavl = current_char
i_iobjnm = infoobject
* I_S_COB_PRO =
* I_T_COB_PRO_CMP =
exceptions
chavl_not_allowed = 1.
if sy-subrc <> 0.
move ' ' to result+index(1).
endif.
enddo.
move result to o_value.
endfunction.