‎2005 Jun 30 8:05 AM
hi,
while reading the internal table, if the subrc value is 8 .
what does it mean.
any help will be appreciated.
‎2005 Jun 30 8:09 AM
SY-SUBRC = 0:
An entry was read.
SY-TABIX is set to the index of the entry.
SY-SUBRC = 2:
An entry was read.
SY-TABIX is set to the index of the entry. This return code can only occur when you use the COMPARING addition. For further detauls, refer to the COMPARING section of the additions
SY-SUBRC = 4:
No entry was read.
The value of SY-TABIX depends on the table type and whether the BINARY SEARCH addition was specified.
If the table is a SORTED TABLE or a table sorted in ascending order of the type STANDARD TABLE with the BINARY SEARCH addition, SY-TABIX refers to the next-highest index.
Otherwise, SY-TABIX is undefined.
<b><i>SY-SUBRC = 8:</i></b>
No entry was read.
This return code only occurs with a SORTED TABLE or a STANDARD TABLE with the BINARY SEARCH addition. SY-TABIX is set to the number of all entries plus 1.
‎2005 Jun 30 8:46 AM
Hi rajkumar,
here's an example :
*in progtab are 2 entries
*now entry is'nt found:
sy-subrc = <b>8</b> , sy-tabix = number of entries + 1 = <b>3</b>.
DATA: BEGIN OF PROGTAB OCCURS 10,
NAME LIKE TRDIR-NAME,
END OF PROGTAB.
MOVE TRDIR-NAME TO PROGTAB-NAME.
READ TABLE PROGTAB WITH KEY PROGTAB BINARY SEARCH.
IF SY-SUBRC <> 0.
INSERT PROGTAB INDEX SY-TABIX.
ENDIF.
regards Andreas
*
‎2015 Nov 03 10:55 AM
‎2015 Nov 03 11:55 AM