Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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?

Thanks!

Tags:
Former Member
Former Member replied

Hi wuyia nata,

You can use where condition to understand this.

For example;

Select single * from Pa0002

WHERE NACHN EQ 'wuyia'.

if sy-subrc eq 0.

Write: 'Value found'.

else.

Write: 'No such data'.

endif.

Of course you firstly should provide key fields at where.

Hope helps.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question