Wednesday, December 30, 2009

Trim the New Line character

Recent hurdle faced in a task was about trimming a newline character while generating a CSV report. I thought it will take time to find a work around for the problem. Luckily my manager had the piece of code in his learning collection. The code is shown below. The new line character in peoplesoft is represented by Char(13)|Char(10).

&job_descr_cal = Substitute(&job_descr, Char(13) | Char(10), " ");

This will substitute the new line character with space and the issue is resolved

1 comment: