2009 Mar 10 10:21 AM
Hello Experts,
r_nsize
is a range and I want to check whether a word is existing or not ?
READ TABLE r_nsize with key r_nsize -low = specialword is not possible.
How can I operate in this case
Regards
sas
2009 Mar 10 10:31 AM
> READ TABLE r_nsize with key r_nsize -low = specialword
Change the code like below..
READ TABLE r_nsize with keylow = specialword
2009 Mar 10 10:23 AM
Hi,
instead of read statement use loop at..
loop at r_nsize.
if r_nsize-low = 'specialword'.
"processing logic
endif.
endloop.
Regards,
Siddarth
2009 Mar 10 10:30 AM
no I need way on how to find out if the specialword is existing or not.
Because I want to output a message if the word is NOT existing
2009 Mar 10 10:31 AM
> READ TABLE r_nsize with key r_nsize -low = specialword
Change the code like below..
READ TABLE r_nsize with keylow = specialword
2009 Mar 10 10:36 AM
Try this.
TABLES : scustom.
RANGES : r_nsize FOR scustom-name.
r_nsize-low = 'AAAA'.
APPEND r_nsize.
r_nsize-low = 'BBBB'.
APPEND r_nsize.
READ TABLE r_nsize WITH KEY low = 'BBBB'.
IF sy-subrc EQ 0.
WRITE : r_nsize-low.
ENDIF.
Regards,
Roopa
2009 Mar 10 10:40 AM
Hi,
Try
READ TABLE r_nsize with key low = specialword
You can not use <tablename>-<fieldname> in the key parameter when reading a table. So replace r_nsize-low by low.
Check the value of sy-subrc if check if record with specialword exists.
Hope this helps.
Regards,
Sachin