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

getting a particular record-regarding

Former Member
0 Likes
898

consider i am having an internal table consisting of100 records.is there any options in ABAP to get a particular record with index value of say 40.

thanks in advance

consider i am having an internal table consisting of100 records.is there any options in ABAP to get a particular record with index value of say 40.

thanks in advance

8 REPLIES 8
Read only

Former Member
0 Likes
877

Hi

READ TABLE ITAB INDEX 40

Max

Read only

Former Member
0 Likes
877

yes

read table itab index 40.

regards

shiba dutta

Read only

Former Member
0 Likes
877

hi,

do this way

READ TABLE IT_MARA INDEX 40.

Regards,

Santosh

Read only

0 Likes
877

i want to use it in a select query

Read only

0 Likes
877

read table itab index 40.

if sy-subrc = 0.

select * from where field = itab-field.

endif.

Read only

0 Likes
877

read table itab index 40.

if sy-subrc = 0.

select * from where field = itab-field.

endif.

Read only

Former Member
0 Likes
877

sorrry i m not enough clear abt your requirement..

you can use it like this..

suppose your itab contains field matnr.

read table itab index 40.

select single matnr into mara-matnr from mara where matnr = itab-matnr.

pls clearly say abt your requirement..

regards

shiba dutta

Read only

Former Member
0 Likes
877

Follow the following steps:

Step 1: Sort itab by key-fields.

Step 2: Read table itab index 40.

Step 3: Now your 40th record is in the header line.

So you can use it now like below:

if sy-subrc = 0.

select * from where field = itab-field.

endif.

Message was edited by:

RAMA PAMMI