Removing Invalid Characters using field routine
This Blog shows a simple way to remove the Invalid Characters in BW using a Field Routine.
We often face the issue of load failures due to Invalid characters in BW, Instead of Editing the data in PSA temporarily, we wrote a simple routine in Field level.
Load Failed Due to Invalid Chars
Info object ZSR_DEC contains Invalid Chars
Field Routine In Transformations
1) ‘,<>?/\:;””ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890’.
These are the Valid chars and numbers which will be accepted by BW system, System will throw an error only when load receives a char which is not there in the above. And that char will be treated as a Invalid Char.
2) IF A+l_time(1) CN ‘,<>?/\:;””ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890’.
A is a Char which contains the data .
I_time is used for iteration(it’ll check each char by char in a word/Sentence).
CN – Contains not
A+l_time(1) = ‘~’.
What ever the special/Invalid char appears in the load apart from the above mentioned, system will convert them to ‘~’
3) REPLACE ALL OCCURRENCES OF ‘~’ IN a WITH space.
System will replace all the ~ with space, then condenses the space.
Activate the transformation, Delete and Reload the data
load successful to Data target