2008 Feb 18 5:35 PM
Hi experts, I have a READ TABLE ... WITH key ... FOR ALL Entries.
What is the meaning of sy-subrc 4 and sy-subrc 8, in this case. What is the difference beetwen them?
Hi experts, I have a READ TABLE ... WITH key ... FOR ALL Entries.
What is the meaning of sy-subrc 4 and sy-subrc 8, in this case. What is the difference beetwen them?
2008 Feb 18 5:49 PM
hi,
If this is the case tht means the condition is true and sy-tabix will be set .
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
If this is the case the entry it will be checked and tht value while comparing with some other vale is not exactly comparabe thn such situation occurs we should thnk tht the value comparision is not done properly but the some wrong value is present.
______________________--
SY-SUBRC = 8:
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.
siva
2008 Feb 18 5:50 PM
hi,
If this is the case tht means the condition is true and sy-tabix will be set .
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
If this is the case the entry it will be checked and tht value while comparing with some other vale is not exactly comparabe thn such situation occurs we should thnk tht the value comparision is not done properly but the some wrong value is present.
______________________--
SY-SUBRC = 8:
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.
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.
siva
2008 Feb 18 5:50 PM
Hi,
SY_SUBRC = 4 SY-TABIX points to the next largest entry.
SY-SUBRC = 8 The key sought is greater than that of the last table entry.
May be check this link
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/read_t01.htm
a®
2008 Feb 18 5:51 PM
Reads an entry from an DS:ABEN.ITAB>internal table, using either its key or its index. The return code SY-SUBRC specifies whether an entry could be read. If you specify a non-unique key (the table must have a NON-UNIQUE key for this to be valid) , the system returns the entry with the lowest index from the set of entries that meet the condition.
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 STANDARD TABLE with the BINARY SEARCH addition, SY-TABIX refers to the next-highest index.
Otherwise, SY-TABIX is undefined.
SY-SUBRC = 8:
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.
I hope this helps.
<REMOVED BY MODERATOR>
Regards
Sujay
Edited by: Alvaro Tejada Galindo on Feb 18, 2008 12:54 PM
2008 Feb 18 5:55 PM
READ TABLE ... WITH key ... FOR ALL EntriesNever heard of it - what version are you on?
In any event, simply pressing F1 on READ (like most of the other responders did for you) will get you the answer more quickly.
Rob
2008 Feb 19 9:25 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |