hai
I need to remove bad characters from source system . For that im using client standard 'function module' and then im calling this funcation module at each Infoobject's transfer routine.
1)Function module is
FUNCTION zbw_remove_bad_characters .
*"----
-
""Local interface:
*" CHANGING
*" REFERENCE(STRING)
*"----
-
***********************************************************
Program Name: zbw_remove_bad_characters Create Date:06/12/2000
Author#s Name:Rohan Williams Last Update:
Program Title: Convert non-permittired BW chars to a '.'.
Development Request #: *
* *
***********************************************************
DATA: l_allowed_char LIKE rsallowedchar-allowchar.
DATA: wf_badchars TYPE i VALUE 1,
wa_strlen TYPE i,
wa_chklastchar.
DATA: l_bad_char_flag.
wa_strlen = strlen( string ).
CALL FUNCTION 'RSKC_ALLOWED_CHAR_GET'
IMPORTING
e_allowed_char = l_allowed_char.
*--- added 03/09/2004 Olu takes care of only one unallowed
*... char at first position.
if wa_strlen = 1.
wa_strlen = 2.
endif.
*...end.
WHILE wf_badchars NE wa_strlen.
IF string CN l_allowed_char.
IF sy-fdpos < wa_strlen.
MOVE '.' TO string+sy-fdpos(1).
wf_badchars = sy-fdpos.
ELSE.
wa_chklastchar = string+sy-fdpos.
IF wa_chklastchar CN l_allowed_char.
MOVE '.' TO string+sy-fdpos(1).
wf_badchars = sy-fdpos.
ENDIF.
ENDIF.
ELSE.
wf_badchars = wa_strlen.
ENDIF.
ENDWHILE.
replace bad character '#' with 'X'
CLEAR l_bad_char_flag.
WHILE l_bad_char_flag NE 'X'.
SEARCH string FOR '#'.
IF sy-subrc EQ 0.
REPLACE '#' WITH 'X' INTO string.
ELSE.
l_bad_char_flag = 'X'.
ENDIF.
ENDWHILE.
replace bad character '!' with 'X'
CLEAR l_bad_char_flag.
WHILE l_bad_char_flag NE 'X'.
SEARCH string FOR '!'.
IF sy-subrc EQ 0.
REPLACE '!' WITH 'X' INTO string.
ELSE.
l_bad_char_flag = 'X'.
ENDIF.
ENDWHILE.
*---- ??1234112AR
CLEAR l_bad_char_flag.
WHILE l_bad_char_flag NE '·'.
SEARCH string FOR '·'.
IF sy-subrc EQ 0.
REPLACE '·' WITH '.' INTO string.
ELSE.
l_bad_char_flag = 'X'.
ENDIF.
ENDWHILE.
translate string to upper case.
ENDFUNCTION.
2)Funcation module calling routine at each Infoobject of Transfer Routine ...
RESULT = TRAN_STRUCTURE-
zzinputcal(source filed).
Is it possible to write in start rouinte.If possible pls given the code ..............
i ll assing the points
bye
rizwan