Skip to Content
1
Sep 10, 2019 at 08:39 PM

Any ideas on a Smart Splitter for Text fields

472 Views

I have an unusual issue that I am hoping someone may have ideas for, I have five legacy fields of 60 Character text each, that I need to migrate to eleven fields of 30 Characters each. The issue we are running into is that we have several instances where the 30th character is in the middle of a word so that the output in SAP looks like....

"The Quick brown fox jumped over the la

zy dog, and the dish ran away with the s

poon"

Does anyone have an idea for a "Smart Splitter" that will split these columns on the last space in the text field before the 30th character, but also adjust the additional lines of text after? Meaning, if the code splits on the 26th character in text field 1, then text field 2 would need to pick up at the 27th character, then look for a space before it reaches it max of 30 characters. This is for 20K records and I'm stuck.