Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

read tab delimited file on app.server

adel_adel
Participant
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

I think you can first Replace c_tab with a space or '/' or whatever and then split.

adel_adel
Participant
0 Kudos

Answered .. thanks a lot