‎2006 Jun 09 10:47 PM
I have 2 records in my file after uploading this file iam getting 3 records in my table .In last record some fileds filled with zeros.any one can guide how to resolve this one?
‎2006 Jun 09 10:50 PM
hi
this is due to the fact that your file may contain empty last record.so before appending the record into the table you just check
IF NOT wa IS INITIAL.
APPEND wa TO itab.
ENDIF.
Cheers,
Abdul Hakim
Mark all useful answers..
Close the thread if your question has been answered..
‎2006 Jun 15 8:27 AM
hi Priya,
sometimes in the which u r uploading file will have blank lines also(ex:- in d flat file 2lines r there and 3 line which is blank line). check d flat file.and delete 3rd line and save and then uplod and check..
and better to write incode
loop at itab.
IF NOT wa IS INITIAL.
APPEND wa TO itab1.
ENDIF.
endloop.
< itab[3xXX] after this loop itab[2xXX] (blank line r removed)>.
ok
Thanks,
Ramesh.
‎2006 Jun 09 10:51 PM
Before moving record to internal table check whether it is initial or not like i_tab ne space. before updating to internal table.
Regds
Manohar
‎2006 Jun 09 11:11 PM
Date and currency fields are taking as '0'.
for date filed its some thing like this 00/00/0000
and currency 0.00 ,but for sometimes iam getting date field as blank so i cannot compare with that.
‎2006 Jun 09 11:13 PM
In that case you need to compare field wise.
You convert your date format into into YYYYMMDD and compare the same.
Regds
Manohar
‎2006 Jun 09 11:18 PM
You can very well use my above syntax.
Have you tried it?
may i know which datatype you are using for date and time fields..
Cheers,
Abdul Hakim
Mark all useful answers..
‎2006 Jun 09 11:17 PM
Hi Priya
Your File has 2 records with data but also has one more empty record.
If your file is txt file.
1. Open your file
2. Put cursor on the second record, press END key. Cursor will go to end of 2nd record end.
3. Now Press SHIFT key, hold it, Press DOWN AERO key. Cursor will move down if any empty records found.
4. Now press DELETE key. Now your file is free of empty records. If you press DOWN AERO key now cursor will not go down beyond 2nd record.
If XL file make sure that no 3rd empty row is there.
In the program, after populating internal table with these records, check any null records are existing. If existing delete it.
Now your program will work.
Bala
Note: Award points if helpful.
‎2006 Jun 09 11:19 PM
hi,
try to remove the space after the 2nd record
that means sometimes even though u enter 2 records in to the flatfile after the 2nd record if u press enter or if u create some space then program will count it as the third record with no data so remove the space after 2nd record and try once again
Regards
Naveen
‎2006 Jun 10 9:24 AM
Open the file in MS excel. Choose the last row delete it,save it as tab delimited and upload it again!! Now you will see two records only!!
Regards,
Amiya Shrivastava
‎2006 Jun 10 9:44 AM
Hi Priya,
<b>There is a problem with your uploading file.If it is a text file then</b> there is an additional space after 2 records.For this just do as follows.At the end of 2nd record,use SHIFT+END then DEL and then run report once again. You will definitely get 2 records only.
<b>If it a excel file then</b> be cautious with empty lines after 2 records.If it an empty line, just delete the line and rerun report once.This may solve your problem.
Regards,
Vinay