checking if a value exists in a standard table
Hi everyone, a simple question. Can anyone show me an code example for reading a standard table while checking if a certain value exists in a field of the table?
Hi wuyia nata,
You can use where condition to understand this.
Select single * from Pa0002
WHERE NACHN EQ 'wuyia'.
if sy-subrc eq 0.
Write: 'Value found'.
Write: 'No such data'.
Of course you firstly should provide key fields at where.