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: 

input required

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

after uploading to internal table just delete the first line

DELETE ITAB INDEX 1.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Use

LOOP AT itab INTO wa_itab FROM 2.

processing.....

endloop.

Regards

Kannaiah

Former Member
0 Kudos

after uploading to internal table just delete the first line

DELETE ITAB INDEX 1.

Former Member
0 Kudos

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

Former Member
0 Kudos

If you will always have the header line then you can

delete itab index 1.

Former Member
0 Kudos

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

Former Member
0 Kudos

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