Wednesday, July 9, 2014

ABAP - Solving the problem of field splitting its contents into two columns in Excel

Have you coded a report program that is supposed to populate a field into 1 specific column of an *.CSV or Excel file output but found that the field has split itself into two different columns?

To make matters worst, all the fields or columns in the Excel file appear to shift to the right from this incorrect column onwards.

For my case, the problem lies in the data where there exist a comma.

For example "Project Manager, Water Industry"

Thus the "Project Manager" stays in the expected column but the "Water Industry" appears in the next column.

To solve this problem, I use the REPLACE keyword and replace the comma with SPACE.


No comments:

Post a Comment