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

reading

Former Member
0 Likes
570

while iam reading a internal table to work area i am getting sy-subrc as 4

note: iam not clearing the work area any more and i am getting data into internal table while i debug the select statement

plz say me the reasons

Regards

Rashaeed

6 REPLIES 6
Read only

Former Member
0 Likes
550

What conditions have you specifed for the read? Please paste the code so the forum can help you better.

Sudha

Read only

Former Member
0 Likes
550

can u post the code??

If u r using READ inside a loop then the key fields may not be satisfied , like

loop at itab.
  read table itab1 with key field1 eq itab-field1. "<--condition may not be satisfied
endloop.

Read only

h_senden2
Active Contributor
0 Likes
550

What is the code ? Without the code we cannot say that much.

Hans

Read only

Former Member
0 Likes
550

Hi,

How r u reading the internal table??r u having some condition then that condition would not be satisfying..

Use these

Loop at itab inti wa_itab.

or read table itab inti wa_utab

Hope it helps else post ur code here

Regards,

Santosh.

Read only

Former Member
0 Likes
550

Hi rasheed,

the sy-subrc will be set to 0 only if there is a match found for the condition you have specified.

If your internal table has the following values

1

2

4

and you read that internal table with key value = 3, then the sy-subrc will be set to a non zero value as you do not have a value 3 in your table.

Regards,

ravi

Read only

Former Member
0 Likes
550

Hi

1 If you have put any condtion with key then it may not getting satisfied.

2 There may not be records in the itab.

Thanks

Sandeep

Reward if helpful