11-07-2006 9:55 AM
Can i have a Syntax like
Read Table itab into wa_tab with Key lifnr ne wa_final-lifnr.
Is this possible.
Thanx in Advance,
Murthy
11-07-2006 9:57 AM
Hi ramana,
u can't do like this.it won't allow u to compare NE ...
regards,
Nagaraj
11-07-2006 9:57 AM
Hi ramana,
u can't do like this.it won't allow u to compare NE ...
regards,
Nagaraj
11-07-2006 9:59 AM
Hi Ramana,
Read Statement only allows '=' logical operation.
Hope this helps.
Manish
11-07-2006 9:59 AM
No u can not do that inequality check in READ statement.
Regards
- Gopi
11-07-2006 9:59 AM
11-07-2006 10:16 AM
Hi,
adding to above.
Read table doesn't allow ne operator.
It reads only one record...Either by index or key.
READ TABLE MY_TAB INDEX 1.
READ TABLE MY_TAB WITH KEY CODE = 'ATG'.
these are the results for SY-SUBRC checks after read table
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.
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.
Reading records with keys
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
Reading lines with Index
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3730358411d1829f0000e829fbfe/content.htm
rgds
Anver
if hlped pls mark points
11-07-2006 10:18 AM
hi ramana
try like this
loop at itab into wa_itab where lifnr ne ...
iam not sure...but i hope it works
11-07-2006 12:28 PM
use looping insted of read .
loop at itab where lifnr ne '01' .
endloop .