ABAP Control Flow Statements ASSERT

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

ASSERT is used in sensitive areas where you want to be absolutely sure, that a variable has a specific value. If the logical condition after ASSERT turns out to be false, an unhandleable exception (ASSERTION_FAILED) is thrown.

ASSERT 1 = 1. "No Problem - Program continues

ASSERT 1 = 2. "ERROR


Got any ABAP Question?