I am doing a select with a dynamic where condition but I only need to check a field value in database table if there is an entry. Is there any way to achieve this?
For example I have this DB table:
Group field value
1 field1 A
1 field2 B
2 field3 C
I need to get the 'Group field' and imagine that, in my condition tab for select, I have for example that field1 = B and field3 = C.
In this case, I need that select returns 'group 2', as for group 1 field1 is different from my field1 value and group2 does not care about the value of field1.
So it would be great that I could say in the where condition tab to check the field value only if in DB table the entry exists...
Do you know how to do it?
I think so. If my understanding is correct, you need to retrieve all the data first before checking if the data really exist in the database. From my knowledge (I am new to ABAP...), it seems there is no way to check the existence of a value without accessing the table.