I have a set of values: "foo", "bar", "blue".
I have a table which looks like this:
ID | my_col
-----------
1 | foo
2 | bar
I want the set values minus all available my_col values.
[foo, bar, blue] minus [foo, bar]
The result should be "blue".
How to do this in ABAP?
Here you are...
Works however only with
HASHED
andSORTED
tables.a couple of additional examples with standard tables:
Option 1: assuming initial set and tab are standard table you can simply loop for the initial set, and then look into your table values
In this case a full table search is done in tab table -> O(n) for tab search
Option 2: you can use a temporary hashed table as described in
SE38 -> Environment -> Performace examples (Intersection of internal tables)
Best regards !