05-08-2007 10:32 AM
Hi All,
My upload file format is as follows...
*Customer Number Name City Country Phone -> This is the format
123 Maheed Hyd India 12344
when i am uploading i dont have any issues. in debug mode i saw it is inserting header also. this is i dont want. so what i did is i keep * before customer number
then how to write the logic to delete the header. i want only line items need to upload. this is my flat file format .
thanks,
maheedhar.t
05-08-2007 10:37 AM
after uploading to internal table just delete the first line
DELETE ITAB INDEX 1.
05-08-2007 10:36 AM
Hi,
Use
LOOP AT itab INTO wa_itab FROM 2.
processing.....
endloop.
Regards
Kannaiah
05-08-2007 10:37 AM
after uploading to internal table just delete the first line
DELETE ITAB INDEX 1.
05-08-2007 10:38 AM
Hi,
You need not keep a start in the file..coz it will not be considered as a comment instead
I assume you are having your header as the first record..
then..
Read table itab into wa index 1.
delete table itab from wa.
this will delete the first row..and so you will not have the data any more
santhosh
05-08-2007 10:38 AM
If you will always have the header line then you can
delete itab index 1.
05-08-2007 10:39 AM
hi
u read the contents of the file into some variable v_rec(30)
then check the condition.
if v_rec(1) <> '*'.
then split the v_rec into itab fields....
05-08-2007 10:40 AM
After uploading the data into the internal table....itab1
Check the number of records in ITAB1.
If it is 1. ---> Then it has only the header information.
if it is > 2 ---> Then the table have header and some detailed information.
Use DELETE ITAB1 INDEX 1. This will delete the first record in the internal table.
- Raj