‎2021 Jan 18 10:29 AM
Hi All,
Is there any way, we can remove entries of one table comparing the entries from another?
For Example.
Table 1 (Ref)
DATA 1
DATA 2
DATA 3
DATA 4
Table 2 (Main)
DATA 2
DATA 3
My requirement is to remove the entry DATA 2 and DATA 3 from Table 1, with out using loop .
Is there any 7.4 based queries?
Thanks in Advance.
‎2021 Jan 18 10:40 AM
‎2021 Jan 18 10:40 AM
‎2021 Jan 18 10:47 AM
‎2021 Jan 18 10:52 AM
‎2021 Jan 18 11:12 AM
Thanks Andrea.
I think that will do the job.
Really appreciate your time.
‎2021 Jan 18 10:40 AM
‎2021 Jan 18 10:47 AM
‎2021 Jan 18 10:52 AM
table1 TYPE SORTED TABLE OF XXX WITH UNIQUE KEY key1 key2 ....
SORT table1 BY key1.LOOP AT table2 assigning field-symbol(<ls_table2>).
DELETE table1 WHERE key1 = <ls_table2>-key (key2 = <ls_table2>-key2) ....
ENDLOOP. why don't you go for that? Would it not be the quickest way and most performant one?
Correct me if I am wrong 🙂
did anyone tracked the performance of filter?
‎2021 Jan 18 10:57 AM
Thanks Igor, Agreed.
I was concerned about the performance, as we were querying on millions of data.
And am currently inside a child program -> loop -> perform - (here) - wanted to remove the loop here.
‎2021 Jan 18 11:02 AM
is it not possible to reduce outside the first loop?
For me, ofter it is tough to find the real root for the problem. Sometimes it can be already solved before it comes to the complicated, logical part 🙂
‎2021 Jan 18 11:04 AM
I will definitely try that.
Thanks for your time in helping.