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: 

SELECT - ENDSELECT RECORD

Former Member
0 Kudos

Hi guys , I´m doing a select endselect but i see only one record at the time , If wanted to process when I´m processing the last record , what I could do , for example is something similiar of waht you do loop at . endloop ' s at last , but here i dont have a internal table .

some code :



      SELECT extrow FROM esll INTO ti_esll-extrow
      WHERE packno = ti_eslh-packno
      AND  del   = ''.
 
    " if last register Perfom xxxxx. 


      endselect .



1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Why r u doing select and endselect?

Fetch all records into an internal table then loop that and use at last.

Rhea.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Why r u doing select and endselect?

Fetch all records into an internal table then loop that and use at last.

Rhea.

Former Member
0 Kudos

Hi,

Create an internal table like ti_esll-extrow with header line.

select into that internal table.

then loop at <int table>.

<use at last here>

endloop.

regards,

Amit

P561888
Active Contributor
0 Kudos

Hi ,

Fetch the all records and append to the internal table .

Regards,

Bharani

Former Member
0 Kudos

Hi,

You do one thing..

Declare an intermediate variable (work area) where you want to store the details.

Then continue like this.

Clear Variable(work area).

Select .....................

" assign value to the variable of work area usign which you want to perform your operions.

endselect.

After the final loop is over you will have your record in the variabl/work area.

Now perform your operation using that variable/work area.

Regards,

Pramod