04-08-2009 4:17 AM
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
04-08-2009 4:19 AM
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,,,
04-08-2009 4:19 AM
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,,,
04-08-2009 4:21 AM
04-08-2009 4:24 AM
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.
04-08-2009 4:25 AM
04-08-2009 4:34 AM
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