2005 Oct 15 7:56 AM
Hi guys,
anybody suggest me a better & effective way of checking a database table whether data exist in it or not?
ur help appericiated...
raja
2005 Oct 15 3:45 PM
In a program you can do something like
SELECT COUNT( * ) INTO v_count FROM dbatab.
In SE16, simply press the button 'Number Of Entries'.
Srinivas
In a program you can do something like
SELECT COUNT( * ) INTO v_count FROM dbatab.
In SE16, simply press the button 'Number Of Entries'.
Srinivas
2005 Oct 15 8:20 AM
2005 Oct 15 11:16 AM
thru program? what is the method you are currently using?
Regards
Raja
2005 Oct 15 3:45 PM
In a program you can do something like
SELECT COUNT( * ) INTO v_count FROM dbatab.
In SE16, simply press the button 'Number Of Entries'.
Srinivas
2005 Oct 15 3:46 PM
Looks like you have another post with the same question and marked it as answered. Can you please close this one too?
Srinivas
2005 Oct 17 12:59 PM
hi,
try with this
data : l_matnr like matnr.
select single matnr into l_matnr from mara.
if sy-subrc is initial
records exist
endif.
2005 Oct 17 1:02 PM
If these answers helped you, could you please reward and close the post?
2005 Oct 17 2:10 PM
Hi Raja,
So many people took their time and effort to understand your problem and try to give a solution. Don't you think, you should do more than just giving two points and closing the thread?
Regards
Raja
2005 Oct 17 2:14 PM
I would do.
data : l_mandt type mandt.
select single mandt
from db_tab
where db_field = user_val.
if sy-subrc eq 0.
"record has been found
else.
" record does not exists
endif.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |