Skip to Content
-2
Sep 12, 2023 at 01:35 PM

Which is a better performing DELETE method for code optimization?

73 Views Last edit Sep 13, 2023 at 05:54 AM 4 rev

Hello Experts,

I am new to the SAP ABAP programming language and I am confused on DELETE query used with databases, both the below mentioned methods performs the same action of deleting the mentioned records but are written differently.

Which of the below mentioned method has better performance and why? Are there any more alternatives to do the same thing (deleting directly from database using SE16 is not an option).


DELETE z_vp_temp FROM TABLE @( VALUE #( ( cusid = '109') ( cusid = '106' ) ( cusid = '12' ) ) ). "Method 1

DELETE FROM z_vp_temp WHERE cusid IN ('106' , '109', '12').

"Method 2