‎2007 Apr 20 9:41 AM
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
‎2007 Apr 20 9:43 AM
What conditions have you specifed for the read? Please paste the code so the forum can help you better.
Sudha
‎2007 Apr 20 9:44 AM
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.
‎2007 Apr 20 9:44 AM
What is the code ? Without the code we cannot say that much.
Hans
‎2007 Apr 20 9:44 AM
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.
‎2007 Apr 20 9:45 AM
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
‎2007 Apr 20 9:51 AM
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