Application Development and Automation 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: 
Read only

SELECT - ENDSELECT RECORD

Former Member
0 Likes
577

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
Read only

Former Member
0 Likes
537

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
Read only

Former Member
0 Likes
538

Hi,

Why r u doing select and endselect?

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

Rhea.

Read only

Former Member
0 Likes
537

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

Read only

BH2408
Active Contributor
0 Likes
537

Hi ,

Fetch the all records and append to the internal table .

Regards,

Bharani

Read only

Former Member
0 Likes
537

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