11-20-2007 4:25 PM
Hi all,
I am facing a problem to read the data from the tab delimited file from the application server.
When i am reading a file i am getting a # symbol instead of tab.
i opend the data set as open dataset in text mode encoding default.
i defined the constant as c_tab type x value '09'.
when i am trying to split the line by using
split l_line at c_tab into field1 field2 field3
i am getting the error as c_tab is not a type of c or n or d or t or string.
how can i rectify this problem.
if i am trying to move the constant to some local variable type c it is not giving the error and the data is not getting populate properly. means it is not spliting at #,
can you pls give me some tips to resolve this problem.
Thanks
11-20-2007 4:28 PM
You can use the CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB attribute.
so use
split l_lint at CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB into field1 field2 field3.
Albert
11-20-2007 4:37 PM
I think you can first Replace c_tab with a space or '/' or whatever and then split.
11-20-2007 4:43 PM