Application Development and Automation 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 only

error in the file

Former Member
0 Likes
724

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
Read only

former_member156446
Active Contributor
0 Likes
684

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
Read only

former_member156446
Active Contributor
0 Likes
685

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,,,

Read only

0 Likes
684

please suggest a way to crrect the error

Read only

0 Likes
684

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.

Read only

Former Member
0 Likes
684

Replace # by tab or space.

Read only

Former Member
0 Likes
684

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