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

internal table

Former Member
0 Likes
786

In an internal table if I have 2 records and I try to execute the following read statement wht will be the result??

READ TABLE <tabname> INDEX 5.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
771

Hi,

Just write and try

Sy-subrc will be 4 after READ thats it.

Regards,

Atish

9 REPLIES 9
Read only

Former Member
0 Likes
772

Hi,

Just write and try

Sy-subrc will be 4 after READ thats it.

Regards,

Atish

Read only

gopi_narendra
Active Contributor
0 Likes
771

It will end with SY_SUBRC = 4.

The read statement fails here

Regards

Gopi

Read only

Former Member
0 Likes
771

Hi Srinivas,

The Read Stmt would fail here giving the SY-SUBRC = 4: No entry was read.

Reward if Useful.

Regards,

Chitra

Read only

Former Member
0 Likes
771

Srini,

You should first check the no of records and then issue the read as:

Describe table <itab> lines <line No>.

if <line no> GE 5.

READ TABLE <itab> INDEX 5.

endif.

Read only

Former Member
0 Likes
771

hi,

the fith record inthe internal table will b fetched.

Read only

Former Member
0 Likes
771

sorry fifth record

Read only

0 Likes
771

hello srinivass.

<b>why don't u try this kind of small issue..</b> u can find the solution with littile effort... u no need post this question in SDN this kind questio0n.. by doing so. there are some importtant thread goes unseeen by the respondes..

sorry for this.

Arun once agin go throung the Question...

Read only

Former Member
0 Likes
771

Hi,

In READ TABLE <tabname> INDEX 5,Into some work area should be there.

So empty space you will get.

Regards,

Rama.Pammi

Read only

Former Member
0 Likes
771

Hi

<b>READ statement will execute and return the SY_SUBRC value as not ZERO

that means READ condition fails to find that INDEX

it won't give any values</b>

<b>REward if usefull</b>