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: 

LOOP AT Table FROM index / LOOP AT Table where using FOR Loop

shubham_banerjee
Participant
0 Kudos

I am trying to read a .csv file with more than 20K lines.

then I am executing function module KCD_CSV_FILE_TO_INTERN_CONVERT. However as KCDE_INTERN-ROW is 4 characters long, my data was eeroneous.

Instead of DO, I am using FOR loop to transform my data,

as we the first line of the imported file is a header/text line, I am deleting index 1 from my internal table gt_filedata. I want to know as we could as,

how can we write the same using FOR and avoid the DELETE statement ? I tried a few alternates but seems I am missing on something.

Can someone please help me here ?

4 REPLIES 4

Sandra_Rossi
Active Contributor

Please post the code as text instead of image, so that one can easily answer by testing your code.

Sandra_Rossi
Active Contributor
0 Kudos

Is it what you're looking for?

... FROM 2 ...

shubham_banerjee
Participant
0 Kudos

Hi sandrarossi,

Yes, I’m trying to start the loop from a particular value of sy-tabix, which in current scenario is 2 however unable to incorporate in the for loop. Also looking for how to use GT/E, LT/E in FOR loop.

joltdx
Active Contributor
0 Kudos

I'm sorry, this question is a bit messy and hard to read for me... But I believe you need the ABAP Documentation for FOR - cond.

You can use FROM and/or TO there just as in LOOP, and you can use logical expressions in WHERE, just put them between ( parenthesis )...

Was that your question?