2007 Dec 14 2:54 PM
2007 Dec 14 3:16 PM
Hi,
if you know all the primary field values of that table then go for
select single from table XXXX where "Conditions".
else if you know some fields (not all primary keys) go for
select upto 1 rows from table XXXX where "Conditions".
if the select statement selects the record, that is the confirmation.
Reward if useful.
Thanks,
Sreeram.
How can i test if a line exists in a table?
Greets Volker
2007 Dec 14 2:56 PM
hi Volker,
You can use Select single form database table with the where clause.
Eg : Select single form <DATABASETABLE> into <WORKAREA>
where <CONDITION>.
Regards
Sourabh Verma
2007 Dec 14 3:02 PM
hi Volker,
if you don't need the line, only the information if it is there, you can use:
SELECT COUNT( * ) FROM ... WHERE ...
IF sy-subrc EQ 0.
==> exists
ELSE.
==> does not exist
ENDIF.
the value in sy-dbcnt will show how many records were found.
hope this helps
ec
2007 Dec 14 3:16 PM
Hi,
if you know all the primary field values of that table then go for
select single from table XXXX where "Conditions".
else if you know some fields (not all primary keys) go for
select upto 1 rows from table XXXX where "Conditions".
if the select statement selects the record, that is the confirmation.
Reward if useful.
Thanks,
Sreeram.
2007 Dec 14 3:26 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |