Skip to Content

read tab delimited file on app.server

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 04: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 04:37 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 20, 2007 at 04:43 PM

    Answered .. thanks a lot

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.