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: 

error in the file

Former Member
0 Kudos

Hi I have an upload program whcih reads a file from server.

in the file iam getting the first record as

EXTRACT|2009-04-07|436|29036.11#

but actually there is no # in the file but while reading this record in debug mode iam finfing this # and

because of this it's going dump.though the # is not in file why iam getting this??please suggest

1 ACCEPTED SOLUTION

former_member156446
Active Contributor
0 Kudos

that is carriage return or line feed which is kept in the file some time automatically some times wantedly else the whole file will be in the single same line,,,

5 REPLIES 5

former_member156446
Active Contributor
0 Kudos

that is carriage return or line feed which is kept in the file some time automatically some times wantedly else the whole file will be in the single same line,,,

0 Kudos

please suggest a way to crrect the error

0 Kudos

data: c_val type c value CL_ABAP_CHAR_UTILITIES=>CR_LF.

replace all occurance of c_val from wa_itab with space.

This generally happens if the file is not writen in ASC format....

alternative:

find the string lenght of the wa_itab subract by 1 and use offset to move the wa_final.

Former Member
0 Kudos

Replace # by tab or space.

babu_kilari4
Active Contributor
0 Kudos

Hello Revanth,

As you are using reading the file you must be using DATASET Concept.

Then, you would have declared any string to read each line isnt it?

If you know the length of each field, fetch the field using offset concept and get it in to a work area field.

Now, do your manipulations on that.

This will completely solve your problem.

Hope you got my point.

Thanks,

Babu Kilari